diff options
| author | Enji Cooper <ngie@FreeBSD.org> | 2026-06-11 03:59:58 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2026-06-11 04:07:34 +0000 |
| commit | ca66129a2c8ace5af1b76b24f48e27ba5c9eac8b (patch) | |
| tree | 8a32f83d7363c7a8d87e23b869dde19cc59d3b0d /crypto | |
| parent | 4df539cc3864f45e980774ac77238e0781b930d7 (diff) | |
openssl: update to 3.0.21
This change is a security release which resolves several issues with OpenSSL 3.0,
the highest severity issue being ranked "High". Users are strongly encouraged to
update to this release.
More information about the release (from a high level) can be found in
the release notes [1].
Tested with: (make tinderbox; spotchecks on dev hosts)
1. https://github.com/openssl/openssl/blob/openssl-3.0.21/NEWS.md
- :main and :stable/15 run OpenSSL 3.5 and :stable/14, et al runs
OpenSSL 3.0.
- This is not a merge commit because our pre-receive checkers still
don't allow direct MFVs without going through :main first.
- This is a direct commit to stable/14.
Diffstat (limited to 'crypto')
119 files changed, 4370 insertions, 21689 deletions
diff --git a/crypto/openssl/CHANGES.md b/crypto/openssl/CHANGES.md index 5d99e5fecdd7..6cf7fa7636a9 100644 --- a/crypto/openssl/CHANGES.md +++ b/crypto/openssl/CHANGES.md @@ -28,6 +28,186 @@ breaking changes, and mappings for the large list of deprecated functions. [Migration guide]: https://github.com/openssl/openssl/tree/master/doc/man7/migration_guide.pod +### Changes between 3.0.20 and 3.0.21 [9 Jun 2026] + + * Fixed heap use-after-free in `PKCS7_verify()`. + + Severity: High + + Issue summary: A specially crafted PKCS#7 or S/MIME signed message could + trigger a use-after-free during PKCS#7 signature verification. + + Impact summary: A use-after-free may result in process crashes, heap + corruption, or, potentially, remote code execution. + + Reported by: Thai Duong (Calif.io in collaboration with Claude + and Anthropic Research). + + ([CVE-2026-45447]) + + *Igor Ustinov* + + * Fixed CMS `AuthEnvelopedData` processing may accept forged messages. + + Severity: Moderate + + Issue Summary: Cryptographic Message Services (CMS) processing fails + to perform sufficient input validation on the cipher and tag length fields + of `AuthEnvelopedData` containers, leading to various potential compromises. + + Impact Summary: Attackers making use of these vulnerabilities may achieve + key-equivalent functionality for a given CMS recipient and/or bypass + integrity validation for a given message. + + Reported by: Asim Viladi Oglu Manizada, Alex Gaynor (Anthropic), + Ying Dong, and Haiyang Huang. + + ([CVE-2026-34182]) + + *Neil Horman* + + * Fixed AES-OCB IV ignored on `EVP_Cipher()` path. + + Severity: Moderate + + Issue summary: When an application drives an AES-OCB context through + the public `EVP_Cipher()` one-shot interface, the application-supplied + initialisation vector (IV) is silently discarded. + + Impact summary: Every message encrypted under the same key uses the same + effective nonce regardless of the IV supplied by the caller, resulting + in `(key, nonce)` reuse and loss of confidentiality. If the same code path + is used to compute the authentication tag, the tag depends only + on the `(key, IV)` pair and not on the plaintext or ciphertext, allowing + universal forgery of arbitrary ciphertext from a single captured message. + + Reported by: Alex Gaynor (Anthropic). + + ([CVE-2026-45445]) + + *Viktor Dukhovni* + + * Fixed possible heap buffer overflow in ASN.1 multibyte string conversion. + + Severity: Low + + Issue summary: A signed integer overflow when sizing the destination + buffer for Unicode output in `ASN1_mbstring_ncopy()` can lead to a heap + buffer overflow. + + Impact summary: A heap buffer overflow may lead to a crash or possibly + attacker controlled code execution or other undefined behaviour. + + Reported by: Zehua Qiao and Jinwen He. + + ([CVE-2026-7383]) + + *Viktor Dukhovni* + + * Fixed out-of-bounds read in CMS password-based decryption. + + Severity: Low + + Issue summary: When CMS password-based decryption ([RFC 3211]/PWRI key + unwrap) processes attacker-supplied CMS data, an attacker-chosen stream-mode + KEK cipher can trigger a heap out-of-bounds read in `kek_unwrap_key()`. + + Impact summary: A heap buffer over-read may trigger a crash, which leads + to Denial of Service for an application if the input buffer ends at a memory + page boundary and the following page is unmapped. There is no information + disclosure, as the over-read bytes are not revealed to the attacker. + + Reported by: Bhabani Sankar Das and Haruki Oyama (Waseda University). + + ([CVE-2026-9076]) + + *Nikola Pajkovský* + + * Fixed heap buffer over-read in ASN.1 content parsing. + + Severity: Low + + Issue summary: Parsing a crafted DER-encoded ASN.1 structure with a primitive + element whose content exceeds 2 gigabytes in length may cause a heap buffer + over-read on 64-bit Unix and Unix-like platforms. + + Impact summary: The heap buffer over-read may crash the application (Denial + of Service) or to load into the decoded ASN.1 object contents of memory + beyond the end of the input buffer. More typically, such ASN.1 elements + would instead be truncated. + + Reported by: Frank Buss. + + ([CVE-2026-34180]) + + *Viktor Dukhovni* + + * Fixed possible NULL dereference in password-dased CMS decryption. + + Severity: Low + + Issue summary: A specially crafted password-encrypted CMS message + could trigger a NULL pointer dereference during CMS decryption. + + Impact summary: This NULL pointer dereference could lead to an application + crash and a Denial of Service. + + Reported by: Mayank Jangid, Kushal Khemka, Hari Priandana, + Bhabani Sankar Das, and Qifan Zhang (Palo Alto Networks). + + ([CVE-2026-42766]) + + *Igor Ustinov* + + * Fixed FFC-DH peer validation uses attacker-supplied `q`. + + Severity: Low + + Issue summary: When `EVP_PKEY_derive_set_peer()` is called with a DHX (X9.42) + peer key, the peer key is not properly checked for the subgroup membership. + + Impact summary: A malicious peer which presents an X9.42 key carrying + the victim's `p` and `g` parameters, a forged `q = r` (a small prime factor + of the cofactor `(p − 1)/q_local`), and a public value `Y` of order `r` can + recover the victim's private key after a small number of key exchange + attempts. + + Reported by: Alex Gaynor (Anthropic). + + ([CVE-2026-42770]) + + *Alex Gaynor (Anthropic), Viktor Dukhovni, and Norbert Pócs* + + * Fixed incorrect tag processing for empty messages in AES-GCM-SIV + and AES-SIV modes. + + Severity: Low + + Issue summary: The implementations of AES-SIV ([RFC 5297]) and AES-GCM-SIV + ([RFC 8452]) mishandle the authentication of AAD (Additional Authenticated + Data) with an empty ciphertext, allowing forgery of such messages. + + Impact summary: An attacker can forge empty messages with arbitrary AAD + to the victim's application using these ciphers. + + Reported by: Alex Gaynor (Anthropic). + + ([CVE-2026-45446]) + + *Dmitry Belyavskiy (Red Hat)* + + * Fixed TLS 1.3 server not sending `NewSessionTicket` message + after ciphersuite mismatch. + <!-- https://github.com/openssl/openssl/pull/30626 --> + + *Daniel Kubec* + + * Implemented validation of the minimal length of PSK identity + being of at least one byte long, as required per [RFC 8446]. + <!-- https://github.com/openssl/openssl/pull/31058 --> + + *Matt Caswell* + ### Changes between 3.0.19 and 3.0.20 [7 Apr 2026] * Fixed incorrect failure handling in RSA KEM RSASVE encapsulation. @@ -20526,6 +20706,8 @@ ndif [CVE-2025-69419]: https://openssl-library.org/news/vulnerabilities/#CVE-2025-69419 [CVE-2025-69420]: https://openssl-library.org/news/vulnerabilities/#CVE-2025-69420 [CVE-2025-69421]: https://openssl-library.org/news/vulnerabilities/#CVE-2025-69421 +[CVE-2026-7383]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-7383 +[CVE-2026-9076]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-9076 [CVE-2026-22795]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-22795 [CVE-2026-22796]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-22796 [CVE-2026-28387]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-28387 @@ -20534,4 +20716,15 @@ ndif [CVE-2026-28390]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-28390 [CVE-2026-31789]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-31789 [CVE-2026-31790]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-31790 +[CVE-2026-34180]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-34180 +[CVE-2026-34182]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-34182 +[CVE-2026-42766]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-42766 +[CVE-2026-42770]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-42770 +[CVE-2026-45445]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-45445 +[CVE-2026-45446]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-45446 +[CVE-2026-45447]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-45447 [RFC 2578 (STD 58), section 3.5]: https://datatracker.ietf.org/doc/html/rfc2578#section-3.5 +[RFC 3211]: https://datatracker.ietf.org/doc/html/rfc3211 +[RFC 5297]: https://datatracker.ietf.org/doc/html/rfc5297 +[RFC 8446]: https://datatracker.ietf.org/doc/html/rfc8446 +[RFC 8452]: https://datatracker.ietf.org/doc/html/rfc8452 diff --git a/crypto/openssl/NEWS.md b/crypto/openssl/NEWS.md index e7507e3dac4a..91277dc055a0 100644 --- a/crypto/openssl/NEWS.md +++ b/crypto/openssl/NEWS.md @@ -18,10 +18,45 @@ OpenSSL Releases OpenSSL 3.0 ----------- +### Major changes between OpenSSL 3.0.20 and OpenSSL 3.0.21 [9 Jun 2026] + +OpenSSL 3.0.21 is a security patch release. The most severe CVE fixed +in this release is High. + +This release incorporates the following bug fixes and mitigations: + + * Fixed heap use-after-free in `PKCS7_verify()`. + ([CVE-2026-45447]) + + * Fixed CMS `AuthEnvelopedData` processing may accept forged messages. + ([CVE-2026-34182]) + + * Fixed AES-OCB IV ignored on `EVP_Cipher()` path. + ([CVE-2026-45445]) + + * Fixed possible heap buffer overflow in ASN.1 multibyte string conversion. + ([CVE-2026-7383]) + + * Fixed out-of-bounds read in CMS password-based decryption. + ([CVE-2026-9076]) + + * Fixed heap buffer over-read in ASN.1 content parsing. + ([CVE-2026-34180]) + + * Fixed possible NULL dereference in password-dased CMS decryption. + ([CVE-2026-42766]) + + * Fixed FFC-DH peer validation uses attacker-supplied `q`. + ([CVE-2026-42770]) + + * Fixed incorrect tag processing for empty messages in AES-GCM-SIV + and AES-SIV modes. + ([CVE-2026-45446]) + ### Major changes between OpenSSL 3.0.19 and OpenSSL 3.0.20 [7 Apr 2026] OpenSSL 3.0.20 is a security patch release. The most severe CVE fixed in this -release is Medium. +release is Moderate. This release incorporates the following bug fixes and mitigations: @@ -1774,6 +1809,8 @@ OpenSSL 0.9.x [CVE-2025-69419]: https://openssl-library.org/news/vulnerabilities/#CVE-2025-69419 [CVE-2025-69420]: https://openssl-library.org/news/vulnerabilities/#CVE-2025-69420 [CVE-2025-69421]: https://openssl-library.org/news/vulnerabilities/#CVE-2025-69421 +[CVE-2026-7383]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-7383 +[CVE-2026-9076]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-9076 [CVE-2026-22795]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-22795 [CVE-2026-22796]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-22796 [CVE-2026-28387]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-28387 @@ -1782,3 +1819,12 @@ OpenSSL 0.9.x [CVE-2026-28390]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-28390 [CVE-2026-31789]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-31789 [CVE-2026-31790]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-31790 +[CVE-2026-34180]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-34180 +[CVE-2026-34182]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-34182 +[CVE-2026-42766]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-42766 +[CVE-2026-42768]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-42768 +[CVE-2026-42769]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-42769 +[CVE-2026-42770]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-42770 +[CVE-2026-45445]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-45445 +[CVE-2026-45446]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-45446 +[CVE-2026-45447]: https://openssl-library.org/news/vulnerabilities/#CVE-2026-45447 diff --git a/crypto/openssl/VERSION.dat b/crypto/openssl/VERSION.dat index 6a053f134de1..340461aaba64 100644 --- a/crypto/openssl/VERSION.dat +++ b/crypto/openssl/VERSION.dat @@ -1,7 +1,7 @@ MAJOR=3 MINOR=0 -PATCH=20 +PATCH=21 PRE_RELEASE_TAG= BUILD_METADATA= -RELEASE_DATE="7 Apr 2026" +RELEASE_DATE="9 Jun 2026" SHLIB_VERSION=3 diff --git a/crypto/openssl/apps/list.c b/crypto/openssl/apps/list.c index c6f92aecb603..298d20c41158 100644 --- a/crypto/openssl/apps/list.c +++ b/crypto/openssl/apps/list.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -1330,6 +1330,9 @@ static void list_disabled(void) #ifdef OPENSSL_NO_DSA BIO_puts(bio_out, "DSA\n"); #endif +#ifdef OPENSSL_NO_SIPHASH + BIO_puts(bio_out, "SIPHASH\n"); +#endif #if defined(OPENSSL_NO_DTLS) BIO_puts(bio_out, "DTLS\n"); #endif diff --git a/crypto/openssl/apps/s_client.c b/crypto/openssl/apps/s_client.c index cff00dcecbf2..529a536ff4d5 100644 --- a/crypto/openssl/apps/s_client.c +++ b/crypto/openssl/apps/s_client.c @@ -2363,7 +2363,7 @@ re_start: "xmlns='jabber:%s' to='%s' version='1.0'>", starttls_proto == PROTO_XMPP ? "client" : "server", protohost ? protohost : host); - seen = BIO_read(sbio, mbuf, BUFSIZZ); + seen = BIO_read(sbio, mbuf, BUFSIZZ - 1); if (seen < 0) { BIO_printf(bio_err, "BIO_read failed\n"); goto end; @@ -2372,7 +2372,7 @@ re_start: while (!strstr(mbuf, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'") && !strstr(mbuf, "<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"")) { - seen = BIO_read(sbio, mbuf, BUFSIZZ); + seen = BIO_read(sbio, mbuf, BUFSIZZ - 1); if (seen <= 0) goto shut; @@ -2381,7 +2381,7 @@ re_start: } BIO_printf(sbio, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>"); - seen = BIO_read(sbio, sbuf, BUFSIZZ); + seen = BIO_read(sbio, sbuf, BUFSIZZ - 1); if (seen < 0) { BIO_printf(bio_err, "BIO_read failed\n"); goto shut; @@ -2607,7 +2607,7 @@ re_start: "Didn't find STARTTLS in server response," " trying anyway...\n"); BIO_printf(sbio, "STARTTLS\r\n"); - mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ); + mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ - 1); if (mbuf_len < 0) { BIO_printf(bio_err, "BIO_read failed\n"); goto end; @@ -2648,7 +2648,7 @@ re_start: "Didn't find STARTTLS in server response," " trying anyway...\n"); BIO_printf(sbio, "STARTTLS\r\n"); - mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ); + mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ - 1); if (mbuf_len < 0) { BIO_printf(bio_err, "BIO_read failed\n"); goto end; diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c index 17b652bcdaeb..6d9810ea23d7 100644 --- a/crypto/openssl/apps/speed.c +++ b/crypto/openssl/apps/speed.c @@ -2518,9 +2518,10 @@ skip_hmac: exit(1); } - if (!EVP_CIPHER_CTX_ctrl(loopargs[k].ctx, + if (EVP_CIPHER_CTX_ctrl(loopargs[k].ctx, EVP_CTRL_AEAD_GET_TAG, - TAG_LEN, &loopargs[k].tag)) { + TAG_LEN, &loopargs[k].tag) + <= 0) { BIO_printf(bio_err, "\nFailed to get the tag\n"); ERR_print_errors(bio_err); exit(1); diff --git a/crypto/openssl/apps/testdsa.h b/crypto/openssl/apps/testdsa.h index e8d04bb31e8a..31f8e74a9cfb 100644 --- a/crypto/openssl/apps/testdsa.h +++ b/crypto/openssl/apps/testdsa.h @@ -1,5 +1,5 @@ /* - * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -13,274 +13,48 @@ EVP_PKEY *get_dsa(int); static unsigned char dsa512_priv[] = { - 0x65, - 0xe5, - 0xc7, - 0x38, - 0x60, - 0x24, - 0xb5, - 0x89, - 0xd4, - 0x9c, - 0xeb, - 0x4c, - 0x9c, - 0x1d, - 0x7a, - 0x22, - 0xbd, - 0xd1, - 0xc2, - 0xd2, + 0x65, 0xe5, 0xc7, 0x38, 0x60, 0x24, 0xb5, 0x89, 0xd4, 0x9c, + 0xeb, 0x4c, 0x9c, 0x1d, 0x7a, 0x22, 0xbd, 0xd1, 0xc2, 0xd2 }; static unsigned char dsa512_pub[] = { - 0x00, - 0x95, - 0xa7, - 0x0d, - 0xec, - 0x93, - 0x68, - 0xba, - 0x5f, - 0xf7, - 0x5f, - 0x07, - 0xf2, - 0x3b, - 0xad, - 0x6b, - 0x01, - 0xdc, - 0xbe, - 0xec, - 0xde, - 0x04, - 0x7a, - 0x3a, - 0x27, - 0xb3, - 0xec, - 0x49, - 0xfd, - 0x08, - 0x43, - 0x3d, - 0x7e, - 0xa8, - 0x2c, - 0x5e, - 0x7b, - 0xbb, - 0xfc, - 0xf4, - 0x6e, - 0xeb, - 0x6c, - 0xb0, - 0x6e, - 0xf8, - 0x02, - 0x12, - 0x8c, - 0x38, - 0x5d, - 0x83, - 0x56, - 0x7d, - 0xee, - 0x53, - 0x05, - 0x3e, - 0x24, - 0x84, - 0xbe, - 0xba, - 0x0a, - 0x6b, - 0xc8, + 0x00, 0x95, 0xa7, 0x0d, 0xec, 0x93, 0x68, 0xba, 0x5f, 0xf7, + 0x5f, 0x07, 0xf2, 0x3b, 0xad, 0x6b, 0x01, 0xdc, 0xbe, 0xec, + 0xde, 0x04, 0x7a, 0x3a, 0x27, 0xb3, 0xec, 0x49, 0xfd, 0x08, + 0x43, 0x3d, 0x7e, 0xa8, 0x2c, 0x5e, 0x7b, 0xbb, 0xfc, 0xf4, + 0x6e, 0xeb, 0x6c, 0xb0, 0x6e, 0xf8, 0x02, 0x12, 0x8c, 0x38, + 0x5d, 0x83, 0x56, 0x7d, 0xee, 0x53, 0x05, 0x3e, 0x24, 0x84, + 0xbe, 0xba, 0x0a, 0x6b, 0xc8 }; static unsigned char dsa512_p[] = { - 0x9D, - 0x1B, - 0x69, - 0x8E, - 0x26, - 0xDB, - 0xF2, - 0x2B, - 0x11, - 0x70, - 0x19, - 0x86, - 0xF6, - 0x19, - 0xC8, - 0xF8, - 0x19, - 0xF2, - 0x18, - 0x53, - 0x94, - 0x46, - 0x06, - 0xD0, - 0x62, - 0x50, - 0x33, - 0x4B, - 0x02, - 0x3C, - 0x52, - 0x30, - 0x03, - 0x8B, - 0x3B, - 0xF9, - 0x5F, - 0xD1, - 0x24, - 0x06, - 0x4F, - 0x7B, - 0x4C, - 0xBA, - 0xAA, - 0x40, - 0x9B, - 0xFD, - 0x96, - 0xE4, - 0x37, - 0x33, - 0xBB, - 0x2D, - 0x5A, - 0xD7, - 0x5A, - 0x11, - 0x40, - 0x66, - 0xA2, - 0x76, - 0x7D, - 0x31, + 0x9D, 0x1B, 0x69, 0x8E, 0x26, 0xDB, 0xF2, 0x2B, 0x11, 0x70, + 0x19, 0x86, 0xF6, 0x19, 0xC8, 0xF8, 0x19, 0xF2, 0x18, 0x53, + 0x94, 0x46, 0x06, 0xD0, 0x62, 0x50, 0x33, 0x4B, 0x02, 0x3C, + 0x52, 0x30, 0x03, 0x8B, 0x3B, 0xF9, 0x5F, 0xD1, 0x24, 0x06, + 0x4F, 0x7B, 0x4C, 0xBA, 0xAA, 0x40, 0x9B, 0xFD, 0x96, 0xE4, + 0x37, 0x33, 0xBB, 0x2D, 0x5A, 0xD7, 0x5A, 0x11, 0x40, 0x66, + 0xA2, 0x76, 0x7D, 0x31 }; static unsigned char dsa512_q[] = { - 0xFB, - 0x53, - 0xEF, - 0x50, - 0xB4, - 0x40, - 0x92, - 0x31, - 0x56, - 0x86, - 0x53, - 0x7A, - 0xE8, - 0x8B, - 0x22, - 0x9A, - 0x49, - 0xFB, - 0x71, - 0x8F, + 0xFB, 0x53, 0xEF, 0x50, 0xB4, 0x40, 0x92, 0x31, 0x56, 0x86, + 0x53, 0x7A, 0xE8, 0x8B, 0x22, 0x9A, 0x49, 0xFB, 0x71, 0x8F }; static unsigned char dsa512_g[] = { - 0x83, - 0x3E, - 0x88, - 0xE5, - 0xC5, - 0x89, - 0x73, - 0xCE, - 0x3B, - 0x6C, - 0x01, - 0x49, - 0xBF, - 0xB3, - 0xC7, - 0x9F, - 0x0A, - 0xEA, - 0x44, - 0x91, - 0xE5, - 0x30, - 0xAA, - 0xD9, - 0xBE, - 0x5B, - 0x5F, - 0xB7, - 0x10, - 0xD7, - 0x89, - 0xB7, - 0x8E, - 0x74, - 0xFB, - 0xCF, - 0x29, - 0x1E, - 0xEB, - 0xA8, - 0x2C, - 0x54, - 0x51, - 0xB8, - 0x10, - 0xDE, - 0xA0, - 0xCE, - 0x2F, - 0xCC, - 0x24, - 0x6B, - 0x90, - 0x77, - 0xDE, - 0xA2, - 0x68, - 0xA6, - 0x52, - 0x12, - 0xA2, - 0x03, - 0x9D, - 0x20, + 0x83, 0x3E, 0x88, 0xE5, 0xC5, 0x89, 0x73, 0xCE, 0x3B, 0x6C, + 0x01, 0x49, 0xBF, 0xB3, 0xC7, 0x9F, 0x0A, 0xEA, 0x44, 0x91, + 0xE5, 0x30, 0xAA, 0xD9, 0xBE, 0x5B, 0x5F, 0xB7, 0x10, 0xD7, + 0x89, 0xB7, 0x8E, 0x74, 0xFB, 0xCF, 0x29, 0x1E, 0xEB, 0xA8, + 0x2C, 0x54, 0x51, 0xB8, 0x10, 0xDE, 0xA0, 0xCE, 0x2F, 0xCC, + 0x24, 0x6B, 0x90, 0x77, 0xDE, 0xA2, 0x68, 0xA6, 0x52, 0x12, + 0xA2, 0x03, 0x9D, 0x20 }; static unsigned char dsa1024_priv[] = { - 0x7d, - 0x21, - 0xda, - 0xbb, - 0x62, - 0x15, - 0x47, - 0x36, - 0x07, - 0x67, - 0x12, - 0xe8, - 0x8c, - 0xaa, - 0x1c, - 0xcd, - 0x38, - 0x12, - 0x61, - 0x18, + 0x7d, 0x21, 0xda, 0xbb, 0x62, 0x15, 0x47, 0x36, 0x07, 0x67, + 0x12, 0xe8, 0x8c, 0xaa, 0x1c, 0xcd, 0x38, 0x12, 0x61, 0x18 }; static unsigned char dsa1024_pub[] = { @@ -298,1111 +72,137 @@ static unsigned char dsa1024_pub[] = { }; static unsigned char dsa1024_p[] = { - 0xA7, - 0x3F, - 0x6E, - 0x85, - 0xBF, - 0x41, - 0x6A, - 0x29, - 0x7D, - 0xF0, - 0x9F, - 0x47, - 0x19, - 0x30, - 0x90, - 0x9A, - 0x09, - 0x1D, - 0xDA, - 0x6A, - 0x33, - 0x1E, - 0xC5, - 0x3D, - 0x86, - 0x96, - 0xB3, - 0x15, - 0xE0, - 0x53, - 0x2E, - 0x8F, - 0xE0, - 0x59, - 0x82, - 0x73, - 0x90, - 0x3E, - 0x75, - 0x31, - 0x99, - 0x47, - 0x7A, - 0x52, - 0xFB, - 0x85, - 0xE4, - 0xD9, - 0xA6, - 0x7B, - 0x38, - 0x9B, - 0x68, - 0x8A, - 0x84, - 0x9B, - 0x87, - 0xC6, - 0x1E, - 0xB5, - 0x7E, - 0x86, - 0x4B, - 0x53, - 0x5B, - 0x59, - 0xCF, - 0x71, - 0x65, - 0x19, - 0x88, - 0x6E, - 0xCE, - 0x66, - 0xAE, - 0x6B, - 0x88, - 0x36, - 0xFB, - 0xEC, - 0x28, - 0xDC, - 0xC2, - 0xD7, - 0xA5, - 0xBB, - 0xE5, - 0x2C, - 0x39, - 0x26, - 0x4B, - 0xDA, - 0x9A, - 0x70, - 0x18, - 0x95, - 0x37, - 0x95, - 0x10, - 0x56, - 0x23, - 0xF6, - 0x15, - 0xED, - 0xBA, - 0x04, - 0x5E, - 0xDE, - 0x39, - 0x4F, - 0xFD, - 0xB7, - 0x43, - 0x1F, - 0xB5, - 0xA4, - 0x65, - 0x6F, - 0xCD, - 0x80, - 0x11, - 0xE4, - 0x70, - 0x95, - 0x5B, - 0x50, - 0xCD, - 0x49, + 0xA7, 0x3F, 0x6E, 0x85, 0xBF, 0x41, 0x6A, 0x29, 0x7D, 0xF0, + 0x9F, 0x47, 0x19, 0x30, 0x90, 0x9A, 0x09, 0x1D, 0xDA, 0x6A, + 0x33, 0x1E, 0xC5, 0x3D, 0x86, 0x96, 0xB3, 0x15, 0xE0, 0x53, + 0x2E, 0x8F, 0xE0, 0x59, 0x82, 0x73, 0x90, 0x3E, 0x75, 0x31, + 0x99, 0x47, 0x7A, 0x52, 0xFB, 0x85, 0xE4, 0xD9, 0xA6, 0x7B, + 0x38, 0x9B, 0x68, 0x8A, 0x84, 0x9B, 0x87, 0xC6, 0x1E, 0xB5, + 0x7E, 0x86, 0x4B, 0x53, 0x5B, 0x59, 0xCF, 0x71, 0x65, 0x19, + 0x88, 0x6E, 0xCE, 0x66, 0xAE, 0x6B, 0x88, 0x36, 0xFB, 0xEC, + 0x28, 0xDC, 0xC2, 0xD7, 0xA5, 0xBB, 0xE5, 0x2C, 0x39, 0x26, + 0x4B, 0xDA, 0x9A, 0x70, 0x18, 0x95, 0x37, 0x95, 0x10, 0x56, + 0x23, 0xF6, 0x15, 0xED, 0xBA, 0x04, 0x5E, 0xDE, 0x39, 0x4F, + 0xFD, 0xB7, 0x43, 0x1F, 0xB5, 0xA4, 0x65, 0x6F, 0xCD, 0x80, + 0x11, 0xE4, 0x70, 0x95, 0x5B, 0x50, 0xCD, 0x49 }; static unsigned char dsa1024_q[] = { - 0xF7, - 0x07, - 0x31, - 0xED, - 0xFA, - 0x6C, - 0x06, - 0x03, - 0xD5, - 0x85, - 0x8A, - 0x1C, - 0xAC, - 0x9C, - 0x65, - 0xE7, - 0x50, - 0x66, - 0x65, - 0x6F, + 0xF7, 0x07, 0x31, 0xED, 0xFA, 0x6C, 0x06, 0x03, 0xD5, 0x85, + 0x8A, 0x1C, 0xAC, 0x9C, 0x65, 0xE7, 0x50, 0x66, 0x65, 0x6F }; static unsigned char dsa1024_g[] = { - 0x4D, - 0xDF, - 0x4C, - 0x03, - 0xA6, - 0x91, - 0x8A, - 0xF5, - 0x19, - 0x6F, - 0x50, - 0x46, - 0x25, - 0x99, - 0xE5, - 0x68, - 0x6F, - 0x30, - 0xE3, - 0x69, - 0xE1, - 0xE5, - 0xB3, - 0x5D, - 0x98, - 0xBB, - 0x28, - 0x86, - 0x48, - 0xFC, - 0xDE, - 0x99, - 0x04, - 0x3F, - 0x5F, - 0x88, - 0x0C, - 0x9C, - 0x73, - 0x24, - 0x0D, - 0x20, - 0x5D, - 0xB9, - 0x2A, - 0x9A, - 0x3F, - 0x18, - 0x96, - 0x27, - 0xE4, - 0x62, - 0x87, - 0xC1, - 0x7B, - 0x74, - 0x62, - 0x53, - 0xFC, - 0x61, - 0x27, - 0xA8, - 0x7A, - 0x91, - 0x09, - 0x9D, - 0xB6, - 0xF1, - 0x4D, - 0x9C, - 0x54, - 0x0F, - 0x58, - 0x06, - 0xEE, - 0x49, - 0x74, - 0x07, - 0xCE, - 0x55, - 0x7E, - 0x23, - 0xCE, - 0x16, - 0xF6, - 0xCA, - 0xDC, - 0x5A, - 0x61, - 0x01, - 0x7E, - 0xC9, - 0x71, - 0xB5, - 0x4D, - 0xF6, - 0xDC, - 0x34, - 0x29, - 0x87, - 0x68, - 0xF6, - 0x5E, - 0x20, - 0x93, - 0xB3, - 0xDB, - 0xF5, - 0xE4, - 0x09, - 0x6C, - 0x41, - 0x17, - 0x95, - 0x92, - 0xEB, - 0x01, - 0xB5, - 0x73, - 0xA5, - 0x6A, - 0x7E, - 0xD8, - 0x32, - 0xED, - 0x0E, - 0x02, - 0xB8, + 0x4D, 0xDF, 0x4C, 0x03, 0xA6, 0x91, 0x8A, 0xF5, 0x19, 0x6F, + 0x50, 0x46, 0x25, 0x99, 0xE5, 0x68, 0x6F, 0x30, 0xE3, 0x69, + 0xE1, 0xE5, 0xB3, 0x5D, 0x98, 0xBB, 0x28, 0x86, 0x48, 0xFC, + 0xDE, 0x99, 0x04, 0x3F, 0x5F, 0x88, 0x0C, 0x9C, 0x73, 0x24, + 0x0D, 0x20, 0x5D, 0xB9, 0x2A, 0x9A, 0x3F, 0x18, 0x96, 0x27, + 0xE4, 0x62, 0x87, 0xC1, 0x7B, 0x74, 0x62, 0x53, 0xFC, 0x61, + 0x27, 0xA8, 0x7A, 0x91, 0x09, 0x9D, 0xB6, 0xF1, 0x4D, 0x9C, + 0x54, 0x0F, 0x58, 0x06, 0xEE, 0x49, 0x74, 0x07, 0xCE, 0x55, + 0x7E, 0x23, 0xCE, 0x16, 0xF6, 0xCA, 0xDC, 0x5A, 0x61, 0x01, + 0x7E, 0xC9, 0x71, 0xB5, 0x4D, 0xF6, 0xDC, 0x34, 0x29, 0x87, + 0x68, 0xF6, 0x5E, 0x20, 0x93, 0xB3, 0xDB, 0xF5, 0xE4, 0x09, + 0x6C, 0x41, 0x17, 0x95, 0x92, 0xEB, 0x01, 0xB5, 0x73, 0xA5, + 0x6A, 0x7E, 0xD8, 0x32, 0xED, 0x0E, 0x02, 0xB8 }; static unsigned char dsa2048_priv[] = { - 0x32, - 0x67, - 0x92, - 0xf6, - 0xc4, - 0xe2, - 0xe2, - 0xe8, - 0xa0, - 0x8b, - 0x6b, - 0x45, - 0x0c, - 0x8a, - 0x76, - 0xb0, - 0xee, - 0xcf, - 0x91, - 0xa7, + 0x32, 0x67, 0x92, 0xf6, 0xc4, 0xe2, 0xe2, 0xe8, 0xa0, 0x8b, + 0x6b, 0x45, 0x0c, 0x8a, 0x76, 0xb0, 0xee, 0xcf, 0x91, 0xa7 }; static unsigned char dsa2048_pub[] = { - 0x17, - 0x8f, - 0xa8, - 0x11, - 0x84, - 0x92, - 0xec, - 0x83, - 0x47, - 0xc7, - 0x6a, - 0xb0, - 0x92, - 0xaf, - 0x5a, - 0x20, - 0x37, - 0xa3, - 0x64, - 0x79, - 0xd2, - 0xd0, - 0x3d, - 0xcd, - 0xe0, - 0x61, - 0x88, - 0x88, - 0x21, - 0xcc, - 0x74, - 0x5d, - 0xce, - 0x4c, - 0x51, - 0x47, - 0xf0, - 0xc5, - 0x5c, - 0x4c, - 0x82, - 0x7a, - 0xaf, - 0x72, - 0xad, - 0xb9, - 0xe0, - 0x53, - 0xf2, - 0x78, - 0xb7, - 0xf0, - 0xb5, - 0x48, - 0x7f, - 0x8a, - 0x3a, - 0x18, - 0xd1, - 0x9f, - 0x8b, - 0x7d, - 0xa5, - 0x47, - 0xb7, - 0x95, - 0xab, - 0x98, - 0xf8, - 0x7b, - 0x74, - 0x50, - 0x56, - 0x8e, - 0x57, - 0xf0, - 0xee, - 0xf5, - 0xb7, - 0xba, - 0xab, - 0x85, - 0x86, - 0xf9, - 0x2b, - 0xef, - 0x41, - 0x56, - 0xa0, - 0xa4, - 0x9f, - 0xb7, - 0x38, - 0x00, - 0x46, - 0x0a, - 0xa6, - 0xf1, - 0xfc, - 0x1f, - 0xd8, - 0x4e, - 0x85, - 0x44, - 0x92, - 0x43, - 0x21, - 0x5d, - 0x6e, - 0xcc, - 0xc2, - 0xcb, - 0x26, - 0x31, - 0x0d, - 0x21, - 0xc4, - 0xbd, - 0x8d, - 0x24, - 0xbc, - 0xd9, - 0x18, - 0x19, - 0xd7, - 0xdc, - 0xf1, - 0xe7, - 0x93, - 0x50, - 0x48, - 0x03, - 0x2c, - 0xae, - 0x2e, - 0xe7, - 0x49, - 0x88, - 0x5f, - 0x93, - 0x57, - 0x27, - 0x99, - 0x36, - 0xb4, - 0x20, - 0xab, - 0xfc, - 0xa7, - 0x2b, - 0xf2, - 0xd9, - 0x98, - 0xd7, - 0xd4, - 0x34, - 0x9d, - 0x96, - 0x50, - 0x58, - 0x9a, - 0xea, - 0x54, - 0xf3, - 0xee, - 0xf5, - 0x63, - 0x14, - 0xee, - 0x85, - 0x83, - 0x74, - 0x76, - 0xe1, - 0x52, - 0x95, - 0xc3, - 0xf7, - 0xeb, - 0x04, - 0x04, - 0x7b, - 0xa7, - 0x28, - 0x1b, - 0xcc, - 0xea, - 0x4a, - 0x4e, - 0x84, - 0xda, - 0xd8, - 0x9c, - 0x79, - 0xd8, - 0x9b, - 0x66, - 0x89, - 0x2f, - 0xcf, - 0xac, - 0xd7, - 0x79, - 0xf9, - 0xa9, - 0xd8, - 0x45, - 0x13, - 0x78, - 0xb9, - 0x00, - 0x14, - 0xc9, - 0x7e, - 0x22, - 0x51, - 0x86, - 0x67, - 0xb0, - 0x9f, - 0x26, - 0x11, - 0x23, - 0xc8, - 0x38, - 0xd7, - 0x70, - 0x1d, - 0x15, - 0x8e, - 0x4d, - 0x4f, - 0x95, - 0x97, - 0x40, - 0xa1, - 0xc2, - 0x7e, - 0x01, - 0x18, - 0x72, - 0xf4, - 0x10, - 0xe6, - 0x8d, - 0x52, - 0x16, - 0x7f, - 0xf2, - 0xc9, - 0xf8, - 0x33, - 0x8b, - 0x33, - 0xb7, - 0xce, + 0x17, 0x8f, 0xa8, 0x11, 0x84, 0x92, 0xec, 0x83, 0x47, 0xc7, + 0x6a, 0xb0, 0x92, 0xaf, 0x5a, 0x20, 0x37, 0xa3, 0x64, 0x79, + 0xd2, 0xd0, 0x3d, 0xcd, 0xe0, 0x61, 0x88, 0x88, 0x21, 0xcc, + 0x74, 0x5d, 0xce, 0x4c, 0x51, 0x47, 0xf0, 0xc5, 0x5c, 0x4c, + 0x82, 0x7a, 0xaf, 0x72, 0xad, 0xb9, 0xe0, 0x53, 0xf2, 0x78, + 0xb7, 0xf0, 0xb5, 0x48, 0x7f, 0x8a, 0x3a, 0x18, 0xd1, 0x9f, + 0x8b, 0x7d, 0xa5, 0x47, 0xb7, 0x95, 0xab, 0x98, 0xf8, 0x7b, + 0x74, 0x50, 0x56, 0x8e, 0x57, 0xf0, 0xee, 0xf5, 0xb7, 0xba, + 0xab, 0x85, 0x86, 0xf9, 0x2b, 0xef, 0x41, 0x56, 0xa0, 0xa4, + 0x9f, 0xb7, 0x38, 0x00, 0x46, 0x0a, 0xa6, 0xf1, 0xfc, 0x1f, + 0xd8, 0x4e, 0x85, 0x44, 0x92, 0x43, 0x21, 0x5d, 0x6e, 0xcc, + 0xc2, 0xcb, 0x26, 0x31, 0x0d, 0x21, 0xc4, 0xbd, 0x8d, 0x24, + 0xbc, 0xd9, 0x18, 0x19, 0xd7, 0xdc, 0xf1, 0xe7, 0x93, 0x50, + 0x48, 0x03, 0x2c, 0xae, 0x2e, 0xe7, 0x49, 0x88, 0x5f, 0x93, + 0x57, 0x27, 0x99, 0x36, 0xb4, 0x20, 0xab, 0xfc, 0xa7, 0x2b, + 0xf2, 0xd9, 0x98, 0xd7, 0xd4, 0x34, 0x9d, 0x96, 0x50, 0x58, + 0x9a, 0xea, 0x54, 0xf3, 0xee, 0xf5, 0x63, 0x14, 0xee, 0x85, + 0x83, 0x74, 0x76, 0xe1, 0x52, 0x95, 0xc3, 0xf7, 0xeb, 0x04, + 0x04, 0x7b, 0xa7, 0x28, 0x1b, 0xcc, 0xea, 0x4a, 0x4e, 0x84, + 0xda, 0xd8, 0x9c, 0x79, 0xd8, 0x9b, 0x66, 0x89, 0x2f, 0xcf, + 0xac, 0xd7, 0x79, 0xf9, 0xa9, 0xd8, 0x45, 0x13, 0x78, 0xb9, + 0x00, 0x14, 0xc9, 0x7e, 0x22, 0x51, 0x86, 0x67, 0xb0, 0x9f, + 0x26, 0x11, 0x23, 0xc8, 0x38, 0xd7, 0x70, 0x1d, 0x15, 0x8e, + 0x4d, 0x4f, 0x95, 0x97, 0x40, 0xa1, 0xc2, 0x7e, 0x01, 0x18, + 0x72, 0xf4, 0x10, 0xe6, 0x8d, 0x52, 0x16, 0x7f, 0xf2, 0xc9, + 0xf8, 0x33, 0x8b, 0x33, 0xb7, 0xce }; static unsigned char dsa2048_p[] = { - 0xA0, - 0x25, - 0xFA, - 0xAD, - 0xF4, - 0x8E, - 0xB9, - 0xE5, - 0x99, - 0xF3, - 0x5D, - 0x6F, - 0x4F, - 0x83, - 0x34, - 0xE2, - 0x7E, - 0xCF, - 0x6F, - 0xBF, - 0x30, - 0xAF, - 0x6F, - 0x81, - 0xEB, - 0xF8, - 0xC4, - 0x13, - 0xD9, - 0xA0, - 0x5D, - 0x8B, - 0x5C, - 0x8E, - 0xDC, - 0xC2, - 0x1D, - 0x0B, - 0x41, - 0x32, - 0xB0, - 0x1F, - 0xFE, - 0xEF, - 0x0C, - 0xC2, - 0xA2, - 0x7E, - 0x68, - 0x5C, - 0x28, - 0x21, - 0xE9, - 0xF5, - 0xB1, - 0x58, - 0x12, - 0x63, - 0x4C, - 0x19, - 0x4E, - 0xFF, - 0x02, - 0x4B, - 0x92, - 0xED, - 0xD2, - 0x07, - 0x11, - 0x4D, - 0x8C, - 0x58, - 0x16, - 0x5C, - 0x55, - 0x8E, - 0xAD, - 0xA3, - 0x67, - 0x7D, - 0xB9, - 0x86, - 0x6E, - 0x0B, - 0xE6, - 0x54, - 0x6F, - 0x40, - 0xAE, - 0x0E, - 0x67, - 0x4C, - 0xF9, - 0x12, - 0x5B, - 0x3C, - 0x08, - 0x7A, - 0xF7, - 0xFC, - 0x67, - 0x86, - 0x69, - 0xE7, - 0x0A, - 0x94, - 0x40, - 0xBF, - 0x8B, - 0x76, - 0xFE, - 0x26, - 0xD1, - 0xF2, - 0xA1, - 0x1A, - 0x84, - 0xA1, - 0x43, - 0x56, - 0x28, - 0xBC, - 0x9A, - 0x5F, - 0xD7, - 0x3B, - 0x69, - 0x89, - 0x8A, - 0x36, - 0x2C, - 0x51, - 0xDF, - 0x12, - 0x77, - 0x2F, - 0x57, - 0x7B, - 0xA0, - 0xAA, - 0xDD, - 0x7F, - 0xA1, - 0x62, - 0x3B, - 0x40, - 0x7B, - 0x68, - 0x1A, - 0x8F, - 0x0D, - 0x38, - 0xBB, - 0x21, - 0x5D, - 0x18, - 0xFC, - 0x0F, - 0x46, - 0xF7, - 0xA3, - 0xB0, - 0x1D, - 0x23, - 0xC3, - 0xD2, - 0xC7, - 0x72, - 0x51, - 0x18, - 0xDF, - 0x46, - 0x95, - 0x79, - 0xD9, - 0xBD, - 0xB5, - 0x19, - 0x02, - 0x2C, - 0x87, - 0xDC, - 0xE7, - 0x57, - 0x82, - 0x7E, - 0xF1, - 0x8B, - 0x06, - 0x3D, - 0x00, - 0xA5, - 0x7B, - 0x6B, - 0x26, - 0x27, - 0x91, - 0x0F, - 0x6A, - 0x77, - 0xE4, - 0xD5, - 0x04, - 0xE4, - 0x12, - 0x2C, - 0x42, - 0xFF, - 0xD2, - 0x88, - 0xBB, - 0xD3, - 0x92, - 0xA0, - 0xF9, - 0xC8, - 0x51, - 0x64, - 0x14, - 0x5C, - 0xD8, - 0xF9, - 0x6C, - 0x47, - 0x82, - 0xB4, - 0x1C, - 0x7F, - 0x09, - 0xB8, - 0xF0, - 0x25, - 0x83, - 0x1D, - 0x3F, - 0x3F, - 0x05, - 0xB3, - 0x21, - 0x0A, - 0x5D, - 0xA7, - 0xD8, - 0x54, - 0xC3, - 0x65, - 0x7D, - 0xC3, - 0xB0, - 0x1D, - 0xBF, - 0xAE, - 0xF8, - 0x68, - 0xCF, - 0x9B, + 0xA0, 0x25, 0xFA, 0xAD, 0xF4, 0x8E, 0xB9, 0xE5, 0x99, 0xF3, + 0x5D, 0x6F, 0x4F, 0x83, 0x34, 0xE2, 0x7E, 0xCF, 0x6F, 0xBF, + 0x30, 0xAF, 0x6F, 0x81, 0xEB, 0xF8, 0xC4, 0x13, 0xD9, 0xA0, + 0x5D, 0x8B, 0x5C, 0x8E, 0xDC, 0xC2, 0x1D, 0x0B, 0x41, 0x32, + 0xB0, 0x1F, 0xFE, 0xEF, 0x0C, 0xC2, 0xA2, 0x7E, 0x68, 0x5C, + 0x28, 0x21, 0xE9, 0xF5, 0xB1, 0x58, 0x12, 0x63, 0x4C, 0x19, + 0x4E, 0xFF, 0x02, 0x4B, 0x92, 0xED, 0xD2, 0x07, 0x11, 0x4D, + 0x8C, 0x58, 0x16, 0x5C, 0x55, 0x8E, 0xAD, 0xA3, 0x67, 0x7D, + 0xB9, 0x86, 0x6E, 0x0B, 0xE6, 0x54, 0x6F, 0x40, 0xAE, 0x0E, + 0x67, 0x4C, 0xF9, 0x12, 0x5B, 0x3C, 0x08, 0x7A, 0xF7, 0xFC, + 0x67, 0x86, 0x69, 0xE7, 0x0A, 0x94, 0x40, 0xBF, 0x8B, 0x76, + 0xFE, 0x26, 0xD1, 0xF2, 0xA1, 0x1A, 0x84, 0xA1, 0x43, 0x56, + 0x28, 0xBC, 0x9A, 0x5F, 0xD7, 0x3B, 0x69, 0x89, 0x8A, 0x36, + 0x2C, 0x51, 0xDF, 0x12, 0x77, 0x2F, 0x57, 0x7B, 0xA0, 0xAA, + 0xDD, 0x7F, 0xA1, 0x62, 0x3B, 0x40, 0x7B, 0x68, 0x1A, 0x8F, + 0x0D, 0x38, 0xBB, 0x21, 0x5D, 0x18, 0xFC, 0x0F, 0x46, 0xF7, + 0xA3, 0xB0, 0x1D, 0x23, 0xC3, 0xD2, 0xC7, 0x72, 0x51, 0x18, + 0xDF, 0x46, 0x95, 0x79, 0xD9, 0xBD, 0xB5, 0x19, 0x02, 0x2C, + 0x87, 0xDC, 0xE7, 0x57, 0x82, 0x7E, 0xF1, 0x8B, 0x06, 0x3D, + 0x00, 0xA5, 0x7B, 0x6B, 0x26, 0x27, 0x91, 0x0F, 0x6A, 0x77, + 0xE4, 0xD5, 0x04, 0xE4, 0x12, 0x2C, 0x42, 0xFF, 0xD2, 0x88, + 0xBB, 0xD3, 0x92, 0xA0, 0xF9, 0xC8, 0x51, 0x64, 0x14, 0x5C, + 0xD8, 0xF9, 0x6C, 0x47, 0x82, 0xB4, 0x1C, 0x7F, 0x09, 0xB8, + 0xF0, 0x25, 0x83, 0x1D, 0x3F, 0x3F, 0x05, 0xB3, 0x21, 0x0A, + 0x5D, 0xA7, 0xD8, 0x54, 0xC3, 0x65, 0x7D, 0xC3, 0xB0, 0x1D, + 0xBF, 0xAE, 0xF8, 0x68, 0xCF, 0x9B }; static unsigned char dsa2048_q[] = { - 0x97, - 0xE7, - 0x33, - 0x4D, - 0xD3, - 0x94, - 0x3E, - 0x0B, - 0xDB, - 0x62, - 0x74, - 0xC6, - 0xA1, - 0x08, - 0xDD, - 0x19, - 0xA3, - 0x75, - 0x17, - 0x1B, + 0x97, 0xE7, 0x33, 0x4D, 0xD3, 0x94, 0x3E, 0x0B, 0xDB, 0x62, + 0x74, 0xC6, 0xA1, 0x08, 0xDD, 0x19, 0xA3, 0x75, 0x17, 0x1B }; static unsigned char dsa2048_g[] = { - 0x2C, - 0x78, - 0x16, - 0x59, - 0x34, - 0x63, - 0xF4, - 0xF3, - 0x92, - 0xFC, - 0xB5, - 0xA5, - 0x4F, - 0x13, - 0xDE, - 0x2F, - 0x1C, - 0xA4, - 0x3C, - 0xAE, - 0xAD, - 0x38, - 0x3F, - 0x7E, - 0x90, - 0xBF, - 0x96, - 0xA6, - 0xAE, - 0x25, - 0x90, - 0x72, - 0xF5, - 0x8E, - 0x80, - 0x0C, - 0x39, - 0x1C, - 0xD9, - 0xEC, - 0xBA, - 0x90, - 0x5B, - 0x3A, - 0xE8, - 0x58, - 0x6C, - 0x9E, - 0x30, - 0x42, - 0x37, - 0x02, - 0x31, - 0x82, - 0xBC, - 0x6A, - 0xDF, - 0x6A, - 0x09, - 0x29, - 0xE3, - 0xC0, - 0x46, - 0xD1, - 0xCB, - 0x85, - 0xEC, - 0x0C, - 0x30, - 0x5E, - 0xEA, - 0xC8, - 0x39, - 0x8E, - 0x22, - 0x9F, - 0x22, - 0x10, - 0xD2, - 0x34, - 0x61, - 0x68, - 0x37, - 0x3D, - 0x2E, - 0x4A, - 0x5B, - 0x9A, - 0xF5, - 0xC1, - 0x48, - 0xC6, - 0xF6, - 0xDC, - 0x63, - 0x1A, - 0xD3, - 0x96, - 0x64, - 0xBA, - 0x34, - 0xC9, - 0xD1, - 0xA0, - 0xD1, - 0xAE, - 0x6C, - 0x2F, - 0x48, - 0x17, - 0x93, - 0x14, - 0x43, - 0xED, - 0xF0, - 0x21, - 0x30, - 0x19, - 0xC3, - 0x1B, - 0x5F, - 0xDE, - 0xA3, - 0xF0, - 0x70, - 0x78, - 0x18, - 0xE1, - 0xA8, - 0xE4, - 0xEE, - 0x2E, - 0x00, - 0xA5, - 0xE4, - 0xB3, - 0x17, - 0xC8, - 0x0C, - 0x7D, - 0x6E, - 0x42, - 0xDC, - 0xB7, - 0x46, - 0x00, - 0x36, - 0x4D, - 0xD4, - 0x46, - 0xAA, - 0x3D, - 0x3C, - 0x46, - 0x89, - 0x40, - 0xBF, - 0x1D, - 0x84, - 0x77, - 0x0A, - 0x75, - 0xF3, - 0x87, - 0x1D, - 0x08, - 0x4C, - 0xA6, - 0xD1, - 0xA9, - 0x1C, - 0x1E, - 0x12, - 0x1E, - 0xE1, - 0xC7, - 0x30, - 0x28, - 0x76, - 0xA5, - 0x7F, - 0x6C, - 0x85, - 0x96, - 0x2B, - 0x6F, - 0xDB, - 0x80, - 0x66, - 0x26, - 0xAE, - 0xF5, - 0x93, - 0xC7, - 0x8E, - 0xAE, - 0x9A, - 0xED, - 0xE4, - 0xCA, - 0x04, - 0xEA, - 0x3B, - 0x72, - 0xEF, - 0xDC, - 0x87, - 0xED, - 0x0D, - 0xA5, - 0x4C, - 0x4A, - 0xDD, - 0x71, - 0x22, - 0x64, - 0x59, - 0x69, - 0x4E, - 0x8E, - 0xBF, - 0x43, - 0xDC, - 0xAB, - 0x8E, - 0x66, - 0xBB, - 0x01, - 0xB6, - 0xF4, - 0xE7, - 0xFD, - 0xD2, - 0xAD, - 0x9F, - 0x36, - 0xC1, - 0xA0, - 0x29, - 0x99, - 0xD1, - 0x96, - 0x70, - 0x59, - 0x06, - 0x78, - 0x35, - 0xBD, - 0x65, - 0x55, - 0x52, - 0x9E, - 0xF8, - 0xB2, - 0xE5, - 0x38, + 0x2C, 0x78, 0x16, 0x59, 0x34, 0x63, 0xF4, 0xF3, 0x92, 0xFC, + 0xB5, 0xA5, 0x4F, 0x13, 0xDE, 0x2F, 0x1C, 0xA4, 0x3C, 0xAE, + 0xAD, 0x38, 0x3F, 0x7E, 0x90, 0xBF, 0x96, 0xA6, 0xAE, 0x25, + 0x90, 0x72, 0xF5, 0x8E, 0x80, 0x0C, 0x39, 0x1C, 0xD9, 0xEC, + 0xBA, 0x90, 0x5B, 0x3A, 0xE8, 0x58, 0x6C, 0x9E, 0x30, 0x42, + 0x37, 0x02, 0x31, 0x82, 0xBC, 0x6A, 0xDF, 0x6A, 0x09, 0x29, + 0xE3, 0xC0, 0x46, 0xD1, 0xCB, 0x85, 0xEC, 0x0C, 0x30, 0x5E, + 0xEA, 0xC8, 0x39, 0x8E, 0x22, 0x9F, 0x22, 0x10, 0xD2, 0x34, + 0x61, 0x68, 0x37, 0x3D, 0x2E, 0x4A, 0x5B, 0x9A, 0xF5, 0xC1, + 0x48, 0xC6, 0xF6, 0xDC, 0x63, 0x1A, 0xD3, 0x96, 0x64, 0xBA, + 0x34, 0xC9, 0xD1, 0xA0, 0xD1, 0xAE, 0x6C, 0x2F, 0x48, 0x17, + 0x93, 0x14, 0x43, 0xED, 0xF0, 0x21, 0x30, 0x19, 0xC3, 0x1B, + 0x5F, 0xDE, 0xA3, 0xF0, 0x70, 0x78, 0x18, 0xE1, 0xA8, 0xE4, + 0xEE, 0x2E, 0x00, 0xA5, 0xE4, 0xB3, 0x17, 0xC8, 0x0C, 0x7D, + 0x6E, 0x42, 0xDC, 0xB7, 0x46, 0x00, 0x36, 0x4D, 0xD4, 0x46, + 0xAA, 0x3D, 0x3C, 0x46, 0x89, 0x40, 0xBF, 0x1D, 0x84, 0x77, + 0x0A, 0x75, 0xF3, 0x87, 0x1D, 0x08, 0x4C, 0xA6, 0xD1, 0xA9, + 0x1C, 0x1E, 0x12, 0x1E, 0xE1, 0xC7, 0x30, 0x28, 0x76, 0xA5, + 0x7F, 0x6C, 0x85, 0x96, 0x2B, 0x6F, 0xDB, 0x80, 0x66, 0x26, + 0xAE, 0xF5, 0x93, 0xC7, 0x8E, 0xAE, 0x9A, 0xED, 0xE4, 0xCA, + 0x04, 0xEA, 0x3B, 0x72, 0xEF, 0xDC, 0x87, 0xED, 0x0D, 0xA5, + 0x4C, 0x4A, 0xDD, 0x71, 0x22, 0x64, 0x59, 0x69, 0x4E, 0x8E, + 0xBF, 0x43, 0xDC, 0xAB, 0x8E, 0x66, 0xBB, 0x01, 0xB6, 0xF4, + 0xE7, 0xFD, 0xD2, 0xAD, 0x9F, 0x36, 0xC1, 0xA0, 0x29, 0x99, + 0xD1, 0x96, 0x70, 0x59, 0x06, 0x78, 0x35, 0xBD, 0x65, 0x55, + 0x52, 0x9E, 0xF8, 0xB2, 0xE5, 0x38 }; typedef struct testdsa_st { diff --git a/crypto/openssl/apps/testrsa.h b/crypto/openssl/apps/testrsa.h index db9221e8aaa4..5117bc175eb6 100644 --- a/crypto/openssl/apps/testrsa.h +++ b/crypto/openssl/apps/testrsa.h @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,2129 +8,225 @@ */ static unsigned char test512[] = { - 0x30, - 0x82, - 0x01, - 0x3a, - 0x02, - 0x01, - 0x00, - 0x02, - 0x41, - 0x00, - 0xd6, - 0x33, - 0xb9, - 0xc8, - 0xfb, - 0x4f, - 0x3c, - 0x7d, - 0xc0, - 0x01, - 0x86, - 0xd0, - 0xe7, - 0xa0, - 0x55, - 0xf2, - 0x95, - 0x93, - 0xcc, - 0x4f, - 0xb7, - 0x5b, - 0x67, - 0x5b, - 0x94, - 0x68, - 0xc9, - 0x34, - 0x15, - 0xde, - 0xa5, - 0x2e, - 0x1c, - 0x33, - 0xc2, - 0x6e, - 0xfc, - 0x34, - 0x5e, - 0x71, - 0x13, - 0xb7, - 0xd6, - 0xee, - 0xd8, - 0xa5, - 0x65, - 0x05, - 0x72, - 0x87, - 0xa8, - 0xb0, - 0x77, - 0xfe, - 0x57, - 0xf5, - 0xfc, - 0x5f, - 0x55, - 0x83, - 0x87, - 0xdd, - 0x57, - 0x49, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x41, - 0x00, - 0xa7, - 0xf7, - 0x91, - 0xc5, - 0x0f, - 0x84, - 0x57, - 0xdc, - 0x07, - 0xf7, - 0x6a, - 0x7f, - 0x60, - 0x52, - 0xb3, - 0x72, - 0xf1, - 0x66, - 0x1f, - 0x7d, - 0x97, - 0x3b, - 0x9e, - 0xb6, - 0x0a, - 0x8f, - 0x8c, - 0xcf, - 0x42, - 0x23, - 0x00, - 0x04, - 0xd4, - 0x28, - 0x0e, - 0x1c, - 0x90, - 0xc4, - 0x11, - 0x25, - 0x25, - 0xa5, - 0x93, - 0xa5, - 0x2f, - 0x70, - 0x02, - 0xdf, - 0x81, - 0x9c, - 0x49, - 0x03, - 0xa0, - 0xf8, - 0x6d, - 0x54, - 0x2e, - 0x26, - 0xde, - 0xaa, - 0x85, - 0x59, - 0xa8, - 0x31, - 0x02, - 0x21, - 0x00, - 0xeb, - 0x47, - 0xd7, - 0x3b, - 0xf6, - 0xc3, - 0xdd, - 0x5a, - 0x46, - 0xc5, - 0xb9, - 0x2b, - 0x9a, - 0xa0, - 0x09, - 0x8f, - 0xa6, - 0xfb, - 0xf3, - 0x78, - 0x7a, - 0x33, - 0x70, - 0x9d, - 0x0f, - 0x42, - 0x6b, - 0x13, - 0x68, - 0x24, - 0xd3, - 0x15, - 0x02, - 0x21, - 0x00, - 0xe9, - 0x10, - 0xb0, - 0xb3, - 0x0d, - 0xe2, - 0x82, - 0x68, - 0x77, - 0x8a, - 0x6e, - 0x7c, - 0xda, - 0xbc, - 0x3e, - 0x53, - 0x83, - 0xfb, - 0xd6, - 0x22, - 0xe7, - 0xb5, - 0xae, - 0x6e, - 0x80, - 0xda, - 0x00, - 0x55, - 0x97, - 0xc1, - 0xd0, - 0x65, - 0x02, - 0x20, - 0x4c, - 0xf8, - 0x73, - 0xb1, - 0x6a, - 0x49, - 0x29, - 0x61, - 0x1f, - 0x46, - 0x10, - 0x0d, - 0xf3, - 0xc7, - 0xe7, - 0x58, - 0xd7, - 0x88, - 0x15, - 0x5e, - 0x94, - 0x9b, - 0xbf, - 0x7b, - 0xa2, - 0x42, - 0x58, - 0x45, - 0x41, - 0x0c, - 0xcb, - 0x01, - 0x02, - 0x20, - 0x12, - 0x11, - 0xba, - 0x31, - 0x57, - 0x9d, - 0x3d, - 0x11, - 0x0e, - 0x5b, - 0x8c, - 0x2f, - 0x5f, - 0xe2, - 0x02, - 0x4f, - 0x05, - 0x47, - 0x8c, - 0x15, - 0x8e, - 0xb3, - 0x56, - 0x3f, - 0xb8, - 0xfb, - 0xad, - 0xd4, - 0xf4, - 0xfc, - 0x10, - 0xc5, - 0x02, - 0x20, - 0x18, - 0xa1, - 0x29, - 0x99, - 0x5b, - 0xd9, - 0xc8, - 0xd4, - 0xfc, - 0x49, - 0x7a, - 0x2a, - 0x21, - 0x2c, - 0x49, - 0xe4, - 0x4f, - 0xeb, - 0xef, - 0x51, - 0xf1, - 0xab, - 0x6d, - 0xfb, - 0x4b, - 0x14, - 0xe9, - 0x4b, - 0x52, - 0xb5, - 0x82, - 0x2c, + 0x30, 0x82, 0x01, 0x3a, 0x02, 0x01, 0x00, 0x02, 0x41, 0x00, + 0xd6, 0x33, 0xb9, 0xc8, 0xfb, 0x4f, 0x3c, 0x7d, 0xc0, 0x01, + 0x86, 0xd0, 0xe7, 0xa0, 0x55, 0xf2, 0x95, 0x93, 0xcc, 0x4f, + 0xb7, 0x5b, 0x67, 0x5b, 0x94, 0x68, 0xc9, 0x34, 0x15, 0xde, + 0xa5, 0x2e, 0x1c, 0x33, 0xc2, 0x6e, 0xfc, 0x34, 0x5e, 0x71, + 0x13, 0xb7, 0xd6, 0xee, 0xd8, 0xa5, 0x65, 0x05, 0x72, 0x87, + 0xa8, 0xb0, 0x77, 0xfe, 0x57, 0xf5, 0xfc, 0x5f, 0x55, 0x83, + 0x87, 0xdd, 0x57, 0x49, 0x02, 0x03, 0x01, 0x00, 0x01, 0x02, + 0x41, 0x00, 0xa7, 0xf7, 0x91, 0xc5, 0x0f, 0x84, 0x57, 0xdc, + 0x07, 0xf7, 0x6a, 0x7f, 0x60, 0x52, 0xb3, 0x72, 0xf1, 0x66, + 0x1f, 0x7d, 0x97, 0x3b, 0x9e, 0xb6, 0x0a, 0x8f, 0x8c, 0xcf, + 0x42, 0x23, 0x00, 0x04, 0xd4, 0x28, 0x0e, 0x1c, 0x90, 0xc4, + 0x11, 0x25, 0x25, 0xa5, 0x93, 0xa5, 0x2f, 0x70, 0x02, 0xdf, + 0x81, 0x9c, 0x49, 0x03, 0xa0, 0xf8, 0x6d, 0x54, 0x2e, 0x26, + 0xde, 0xaa, 0x85, 0x59, 0xa8, 0x31, 0x02, 0x21, 0x00, 0xeb, + 0x47, 0xd7, 0x3b, 0xf6, 0xc3, 0xdd, 0x5a, 0x46, 0xc5, 0xb9, + 0x2b, 0x9a, 0xa0, 0x09, 0x8f, 0xa6, 0xfb, 0xf3, 0x78, 0x7a, + 0x33, 0x70, 0x9d, 0x0f, 0x42, 0x6b, 0x13, 0x68, 0x24, 0xd3, + 0x15, 0x02, 0x21, 0x00, 0xe9, 0x10, 0xb0, 0xb3, 0x0d, 0xe2, + 0x82, 0x68, 0x77, 0x8a, 0x6e, 0x7c, 0xda, 0xbc, 0x3e, 0x53, + 0x83, 0xfb, 0xd6, 0x22, 0xe7, 0xb5, 0xae, 0x6e, 0x80, 0xda, + 0x00, 0x55, 0x97, 0xc1, 0xd0, 0x65, 0x02, 0x20, 0x4c, 0xf8, + 0x73, 0xb1, 0x6a, 0x49, 0x29, 0x61, 0x1f, 0x46, 0x10, 0x0d, + 0xf3, 0xc7, 0xe7, 0x58, 0xd7, 0x88, 0x15, 0x5e, 0x94, 0x9b, + 0xbf, 0x7b, 0xa2, 0x42, 0x58, 0x45, 0x41, 0x0c, 0xcb, 0x01, + 0x02, 0x20, 0x12, 0x11, 0xba, 0x31, 0x57, 0x9d, 0x3d, 0x11, + 0x0e, 0x5b, 0x8c, 0x2f, 0x5f, 0xe2, 0x02, 0x4f, 0x05, 0x47, + 0x8c, 0x15, 0x8e, 0xb3, 0x56, 0x3f, 0xb8, 0xfb, 0xad, 0xd4, + 0xf4, 0xfc, 0x10, 0xc5, 0x02, 0x20, 0x18, 0xa1, 0x29, 0x99, + 0x5b, 0xd9, 0xc8, 0xd4, 0xfc, 0x49, 0x7a, 0x2a, 0x21, 0x2c, + 0x49, 0xe4, 0x4f, 0xeb, 0xef, 0x51, 0xf1, 0xab, 0x6d, 0xfb, + 0x4b, 0x14, 0xe9, 0x4b, 0x52, 0xb5, 0x82, 0x2c }; static unsigned char test1024[] = { - 0x30, - 0x82, - 0x02, - 0x5c, - 0x02, - 0x01, - 0x00, - 0x02, - 0x81, - 0x81, - 0x00, - 0xdc, - 0x98, - 0x43, - 0xe8, - 0x3d, - 0x43, - 0x5b, - 0xe4, - 0x05, - 0xcd, - 0xd0, - 0xa9, - 0x3e, - 0xcb, - 0x83, - 0x75, - 0xf6, - 0xb5, - 0xa5, - 0x9f, - 0x6b, - 0xe9, - 0x34, - 0x41, - 0x29, - 0x18, - 0xfa, - 0x6a, - 0x55, - 0x4d, - 0x70, - 0xfc, - 0xec, - 0xae, - 0x87, - 0x38, - 0x0a, - 0x20, - 0xa9, - 0xc0, - 0x45, - 0x77, - 0x6e, - 0x57, - 0x60, - 0x57, - 0xf4, - 0xed, - 0x96, - 0x22, - 0xcb, - 0x8f, - 0xe1, - 0x33, - 0x3a, - 0x17, - 0x1f, - 0xed, - 0x37, - 0xa5, - 0x6f, - 0xeb, - 0xa6, - 0xbc, - 0x12, - 0x80, - 0x1d, - 0x53, - 0xbd, - 0x70, - 0xeb, - 0x21, - 0x76, - 0x3e, - 0xc9, - 0x2f, - 0x1a, - 0x45, - 0x24, - 0x82, - 0xff, - 0xcd, - 0x59, - 0x32, - 0x06, - 0x2e, - 0x12, - 0x3b, - 0x23, - 0x78, - 0xed, - 0x12, - 0x3d, - 0xe0, - 0x8d, - 0xf9, - 0x67, - 0x4f, - 0x37, - 0x4e, - 0x47, - 0x02, - 0x4c, - 0x2d, - 0xc0, - 0x4f, - 0x1f, - 0xb3, - 0x94, - 0xe1, - 0x41, - 0x2e, - 0x2d, - 0x90, - 0x10, - 0xfc, - 0x82, - 0x91, - 0x8b, - 0x0f, - 0x22, - 0xd4, - 0xf2, - 0xfc, - 0x2c, - 0xab, - 0x53, - 0x55, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x81, - 0x80, - 0x2b, - 0xcc, - 0x3f, - 0x8f, - 0x58, - 0xba, - 0x8b, - 0x00, - 0x16, - 0xf6, - 0xea, - 0x3a, - 0xf0, - 0x30, - 0xd0, - 0x05, - 0x17, - 0xda, - 0xb0, - 0xeb, - 0x9a, - 0x2d, - 0x4f, - 0x26, - 0xb0, - 0xd6, - 0x38, - 0xc1, - 0xeb, - 0xf5, - 0xd8, - 0x3d, - 0x1f, - 0x70, - 0xf7, - 0x7f, - 0xf4, - 0xe2, - 0xcf, - 0x51, - 0x51, - 0x79, - 0x88, - 0xfa, - 0xe8, - 0x32, - 0x0e, - 0x7b, - 0x2d, - 0x97, - 0xf2, - 0xfa, - 0xba, - 0x27, - 0xc5, - 0x9c, - 0xd9, - 0xc5, - 0xeb, - 0x8a, - 0x79, - 0x52, - 0x3c, - 0x64, - 0x34, - 0x7d, - 0xc2, - 0xcf, - 0x28, - 0xc7, - 0x4e, - 0xd5, - 0x43, - 0x0b, - 0xd1, - 0xa6, - 0xca, - 0x6d, - 0x03, - 0x2d, - 0x72, - 0x23, - 0xbc, - 0x6d, - 0x05, - 0xfa, - 0x16, - 0x09, - 0x2f, - 0x2e, - 0x5c, - 0xb6, - 0xee, - 0x74, - 0xdd, - 0xd2, - 0x48, - 0x8e, - 0x36, - 0x0c, - 0x06, - 0x3d, - 0x4d, - 0xe5, - 0x10, - 0x82, - 0xeb, - 0x6a, - 0xf3, - 0x4b, - 0x9f, - 0xd6, - 0xed, - 0x11, - 0xb1, - 0x6e, - 0xec, - 0xf4, - 0xfe, - 0x8e, - 0x75, - 0x94, - 0x20, - 0x2f, - 0xcb, - 0xac, - 0x46, - 0xf1, - 0x02, - 0x41, - 0x00, - 0xf9, - 0x8c, - 0xa3, - 0x85, - 0xb1, - 0xdd, - 0x29, - 0xaf, - 0x65, - 0xc1, - 0x33, - 0xf3, - 0x95, - 0xc5, - 0x52, - 0x68, - 0x0b, - 0xd4, - 0xf1, - 0xe5, - 0x0e, - 0x02, - 0x9f, - 0x4f, - 0xfa, - 0x77, - 0xdc, - 0x46, - 0x9e, - 0xc7, - 0xa6, - 0xe4, - 0x16, - 0x29, - 0xda, - 0xb0, - 0x07, - 0xcf, - 0x5b, - 0xa9, - 0x12, - 0x8a, - 0xdd, - 0x63, - 0x0a, - 0xde, - 0x2e, - 0x8c, - 0x66, - 0x8b, - 0x8c, - 0xdc, - 0x19, - 0xa3, - 0x7e, - 0xf4, - 0x3b, - 0xd0, - 0x1a, - 0x8c, - 0xa4, - 0xc2, - 0xe1, - 0xd3, - 0x02, - 0x41, - 0x00, - 0xe2, - 0x4c, - 0x05, - 0xf2, - 0x04, - 0x86, - 0x4e, - 0x61, - 0x43, - 0xdb, - 0xb0, - 0xb9, - 0x96, - 0x86, - 0x52, - 0x2c, - 0xca, - 0x8d, - 0x7b, - 0xab, - 0x0b, - 0x13, - 0x0d, - 0x7e, - 0x38, - 0x5b, - 0xe2, - 0x2e, - 0x7b, - 0x0e, - 0xe7, - 0x19, - 0x99, - 0x38, - 0xe7, - 0xf2, - 0x21, - 0xbd, - 0x85, - 0x85, - 0xe3, - 0xfd, - 0x28, - 0x77, - 0x20, - 0x31, - 0x71, - 0x2c, - 0xd0, - 0xff, - 0xfb, - 0x2e, - 0xaf, - 0x85, - 0xb4, - 0x86, - 0xca, - 0xf3, - 0xbb, - 0xca, - 0xaa, - 0x0f, - 0x95, - 0x37, - 0x02, - 0x40, - 0x0e, - 0x41, - 0x9a, - 0x95, - 0xe8, - 0xb3, - 0x59, - 0xce, - 0x4b, - 0x61, - 0xde, - 0x35, - 0xec, - 0x38, - 0x79, - 0x9c, - 0xb8, - 0x10, - 0x52, - 0x41, - 0x63, - 0xab, - 0x82, - 0xae, - 0x6f, - 0x00, - 0xa9, - 0xf4, - 0xde, - 0xdd, - 0x49, - 0x0b, - 0x7e, - 0xb8, - 0xa5, - 0x65, - 0xa9, - 0x0c, - 0x8f, - 0x8f, - 0xf9, - 0x1f, - 0x35, - 0xc6, - 0x92, - 0xb8, - 0x5e, - 0xb0, - 0x66, - 0xab, - 0x52, - 0x40, - 0xc0, - 0xb6, - 0x36, - 0x6a, - 0x7d, - 0x80, - 0x46, - 0x04, - 0x02, - 0xe5, - 0x9f, - 0x41, - 0x02, - 0x41, - 0x00, - 0xc0, - 0xad, - 0xcc, - 0x4e, - 0x21, - 0xee, - 0x1d, - 0x24, - 0x91, - 0xfb, - 0xa7, - 0x80, - 0x8d, - 0x9a, - 0xb6, - 0xb3, - 0x2e, - 0x8f, - 0xc2, - 0xe1, - 0x82, - 0xdf, - 0x69, - 0x18, - 0xb4, - 0x71, - 0xff, - 0xa6, - 0x65, - 0xde, - 0xed, - 0x84, - 0x8d, - 0x42, - 0xb7, - 0xb3, - 0x21, - 0x69, - 0x56, - 0x1c, - 0x07, - 0x60, - 0x51, - 0x29, - 0x04, - 0xff, - 0x34, - 0x06, - 0xdd, - 0xb9, - 0x67, - 0x2c, - 0x7c, - 0x04, - 0x93, - 0x0e, - 0x46, - 0x15, - 0xbb, - 0x2a, - 0xb7, - 0x1b, - 0xe7, - 0x87, - 0x02, - 0x40, - 0x78, - 0xda, - 0x5d, - 0x07, - 0x51, - 0x0c, - 0x16, - 0x7a, - 0x9f, - 0x29, - 0x20, - 0x84, - 0x0d, - 0x42, - 0xfa, - 0xd7, - 0x00, - 0xd8, - 0x77, - 0x7e, - 0xb0, - 0xb0, - 0x6b, - 0xd6, - 0x5b, - 0x53, - 0xb8, - 0x9b, - 0x7a, - 0xcd, - 0xc7, - 0x2b, - 0xb8, - 0x6a, - 0x63, - 0xa9, - 0xfb, - 0x6f, - 0xa4, - 0x72, - 0xbf, - 0x4c, - 0x5d, - 0x00, - 0x14, - 0xba, - 0xfa, - 0x59, - 0x88, - 0xed, - 0xe4, - 0xe0, - 0x8c, - 0xa2, - 0xec, - 0x14, - 0x7e, - 0x2d, - 0xe2, - 0xf0, - 0x46, - 0x49, - 0x95, - 0x45, + 0x30, 0x82, 0x02, 0x5c, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, + 0x00, 0xdc, 0x98, 0x43, 0xe8, 0x3d, 0x43, 0x5b, 0xe4, 0x05, + 0xcd, 0xd0, 0xa9, 0x3e, 0xcb, 0x83, 0x75, 0xf6, 0xb5, 0xa5, + 0x9f, 0x6b, 0xe9, 0x34, 0x41, 0x29, 0x18, 0xfa, 0x6a, 0x55, + 0x4d, 0x70, 0xfc, 0xec, 0xae, 0x87, 0x38, 0x0a, 0x20, 0xa9, + 0xc0, 0x45, 0x77, 0x6e, 0x57, 0x60, 0x57, 0xf4, 0xed, 0x96, + 0x22, 0xcb, 0x8f, 0xe1, 0x33, 0x3a, 0x17, 0x1f, 0xed, 0x37, + 0xa5, 0x6f, 0xeb, 0xa6, 0xbc, 0x12, 0x80, 0x1d, 0x53, 0xbd, + 0x70, 0xeb, 0x21, 0x76, 0x3e, 0xc9, 0x2f, 0x1a, 0x45, 0x24, + 0x82, 0xff, 0xcd, 0x59, 0x32, 0x06, 0x2e, 0x12, 0x3b, 0x23, + 0x78, 0xed, 0x12, 0x3d, 0xe0, 0x8d, 0xf9, 0x67, 0x4f, 0x37, + 0x4e, 0x47, 0x02, 0x4c, 0x2d, 0xc0, 0x4f, 0x1f, 0xb3, 0x94, + 0xe1, 0x41, 0x2e, 0x2d, 0x90, 0x10, 0xfc, 0x82, 0x91, 0x8b, + 0x0f, 0x22, 0xd4, 0xf2, 0xfc, 0x2c, 0xab, 0x53, 0x55, 0x02, + 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x80, 0x2b, 0xcc, 0x3f, + 0x8f, 0x58, 0xba, 0x8b, 0x00, 0x16, 0xf6, 0xea, 0x3a, 0xf0, + 0x30, 0xd0, 0x05, 0x17, 0xda, 0xb0, 0xeb, 0x9a, 0x2d, 0x4f, + 0x26, 0xb0, 0xd6, 0x38, 0xc1, 0xeb, 0xf5, 0xd8, 0x3d, 0x1f, + 0x70, 0xf7, 0x7f, 0xf4, 0xe2, 0xcf, 0x51, 0x51, 0x79, 0x88, + 0xfa, 0xe8, 0x32, 0x0e, 0x7b, 0x2d, 0x97, 0xf2, 0xfa, 0xba, + 0x27, 0xc5, 0x9c, 0xd9, 0xc5, 0xeb, 0x8a, 0x79, 0x52, 0x3c, + 0x64, 0x34, 0x7d, 0xc2, 0xcf, 0x28, 0xc7, 0x4e, 0xd5, 0x43, + 0x0b, 0xd1, 0xa6, 0xca, 0x6d, 0x03, 0x2d, 0x72, 0x23, 0xbc, + 0x6d, 0x05, 0xfa, 0x16, 0x09, 0x2f, 0x2e, 0x5c, 0xb6, 0xee, + 0x74, 0xdd, 0xd2, 0x48, 0x8e, 0x36, 0x0c, 0x06, 0x3d, 0x4d, + 0xe5, 0x10, 0x82, 0xeb, 0x6a, 0xf3, 0x4b, 0x9f, 0xd6, 0xed, + 0x11, 0xb1, 0x6e, 0xec, 0xf4, 0xfe, 0x8e, 0x75, 0x94, 0x20, + 0x2f, 0xcb, 0xac, 0x46, 0xf1, 0x02, 0x41, 0x00, 0xf9, 0x8c, + 0xa3, 0x85, 0xb1, 0xdd, 0x29, 0xaf, 0x65, 0xc1, 0x33, 0xf3, + 0x95, 0xc5, 0x52, 0x68, 0x0b, 0xd4, 0xf1, 0xe5, 0x0e, 0x02, + 0x9f, 0x4f, 0xfa, 0x77, 0xdc, 0x46, 0x9e, 0xc7, 0xa6, 0xe4, + 0x16, 0x29, 0xda, 0xb0, 0x07, 0xcf, 0x5b, 0xa9, 0x12, 0x8a, + 0xdd, 0x63, 0x0a, 0xde, 0x2e, 0x8c, 0x66, 0x8b, 0x8c, 0xdc, + 0x19, 0xa3, 0x7e, 0xf4, 0x3b, 0xd0, 0x1a, 0x8c, 0xa4, 0xc2, + 0xe1, 0xd3, 0x02, 0x41, 0x00, 0xe2, 0x4c, 0x05, 0xf2, 0x04, + 0x86, 0x4e, 0x61, 0x43, 0xdb, 0xb0, 0xb9, 0x96, 0x86, 0x52, + 0x2c, 0xca, 0x8d, 0x7b, 0xab, 0x0b, 0x13, 0x0d, 0x7e, 0x38, + 0x5b, 0xe2, 0x2e, 0x7b, 0x0e, 0xe7, 0x19, 0x99, 0x38, 0xe7, + 0xf2, 0x21, 0xbd, 0x85, 0x85, 0xe3, 0xfd, 0x28, 0x77, 0x20, + 0x31, 0x71, 0x2c, 0xd0, 0xff, 0xfb, 0x2e, 0xaf, 0x85, 0xb4, + 0x86, 0xca, 0xf3, 0xbb, 0xca, 0xaa, 0x0f, 0x95, 0x37, 0x02, + 0x40, 0x0e, 0x41, 0x9a, 0x95, 0xe8, 0xb3, 0x59, 0xce, 0x4b, + 0x61, 0xde, 0x35, 0xec, 0x38, 0x79, 0x9c, 0xb8, 0x10, 0x52, + 0x41, 0x63, 0xab, 0x82, 0xae, 0x6f, 0x00, 0xa9, 0xf4, 0xde, + 0xdd, 0x49, 0x0b, 0x7e, 0xb8, 0xa5, 0x65, 0xa9, 0x0c, 0x8f, + 0x8f, 0xf9, 0x1f, 0x35, 0xc6, 0x92, 0xb8, 0x5e, 0xb0, 0x66, + 0xab, 0x52, 0x40, 0xc0, 0xb6, 0x36, 0x6a, 0x7d, 0x80, 0x46, + 0x04, 0x02, 0xe5, 0x9f, 0x41, 0x02, 0x41, 0x00, 0xc0, 0xad, + 0xcc, 0x4e, 0x21, 0xee, 0x1d, 0x24, 0x91, 0xfb, 0xa7, 0x80, + 0x8d, 0x9a, 0xb6, 0xb3, 0x2e, 0x8f, 0xc2, 0xe1, 0x82, 0xdf, + 0x69, 0x18, 0xb4, 0x71, 0xff, 0xa6, 0x65, 0xde, 0xed, 0x84, + 0x8d, 0x42, 0xb7, 0xb3, 0x21, 0x69, 0x56, 0x1c, 0x07, 0x60, + 0x51, 0x29, 0x04, 0xff, 0x34, 0x06, 0xdd, 0xb9, 0x67, 0x2c, + 0x7c, 0x04, 0x93, 0x0e, 0x46, 0x15, 0xbb, 0x2a, 0xb7, 0x1b, + 0xe7, 0x87, 0x02, 0x40, 0x78, 0xda, 0x5d, 0x07, 0x51, 0x0c, + 0x16, 0x7a, 0x9f, 0x29, 0x20, 0x84, 0x0d, 0x42, 0xfa, 0xd7, + 0x00, 0xd8, 0x77, 0x7e, 0xb0, 0xb0, 0x6b, 0xd6, 0x5b, 0x53, + 0xb8, 0x9b, 0x7a, 0xcd, 0xc7, 0x2b, 0xb8, 0x6a, 0x63, 0xa9, + 0xfb, 0x6f, 0xa4, 0x72, 0xbf, 0x4c, 0x5d, 0x00, 0x14, 0xba, + 0xfa, 0x59, 0x88, 0xed, 0xe4, 0xe0, 0x8c, 0xa2, 0xec, 0x14, + 0x7e, 0x2d, 0xe2, 0xf0, 0x46, 0x49, 0x95, 0x45 }; static unsigned char test2048[] = { - 0x30, - 0x82, - 0x04, - 0xa3, - 0x02, - 0x01, - 0x00, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0xc0, - 0xc0, - 0xce, - 0x3e, - 0x3c, - 0x53, - 0x67, - 0x3f, - 0x4f, - 0xc5, - 0x2f, - 0xa4, - 0xc2, - 0x5a, - 0x2f, - 0x58, - 0xfd, - 0x27, - 0x52, - 0x6a, - 0xe8, - 0xcf, - 0x4a, - 0x73, - 0x47, - 0x8d, - 0x25, - 0x0f, - 0x5f, - 0x03, - 0x26, - 0x78, - 0xef, - 0xf0, - 0x22, - 0x12, - 0xd3, - 0xde, - 0x47, - 0xb2, - 0x1c, - 0x0b, - 0x38, - 0x63, - 0x1a, - 0x6c, - 0x85, - 0x7a, - 0x80, - 0xc6, - 0x8f, - 0xa0, - 0x41, - 0xaf, - 0x62, - 0xc4, - 0x67, - 0x32, - 0x88, - 0xf8, - 0xa6, - 0x9c, - 0xf5, - 0x23, - 0x1d, - 0xe4, - 0xac, - 0x3f, - 0x29, - 0xf9, - 0xec, - 0xe1, - 0x8b, - 0x26, - 0x03, - 0x2c, - 0xb2, - 0xab, - 0xf3, - 0x7d, - 0xb5, - 0xca, - 0x49, - 0xc0, - 0x8f, - 0x1c, - 0xdf, - 0x33, - 0x3a, - 0x60, - 0xda, - 0x3c, - 0xb0, - 0x16, - 0xf8, - 0xa9, - 0x12, - 0x8f, - 0x64, - 0xac, - 0x23, - 0x0c, - 0x69, - 0x64, - 0x97, - 0x5d, - 0x99, - 0xd4, - 0x09, - 0x83, - 0x9b, - 0x61, - 0xd3, - 0xac, - 0xf0, - 0xde, - 0xdd, - 0x5e, - 0x9f, - 0x44, - 0x94, - 0xdb, - 0x3a, - 0x4d, - 0x97, - 0xe8, - 0x52, - 0x29, - 0xf7, - 0xdb, - 0x94, - 0x07, - 0x45, - 0x90, - 0x78, - 0x1e, - 0x31, - 0x0b, - 0x80, - 0xf7, - 0x57, - 0xad, - 0x1c, - 0x79, - 0xc5, - 0xcb, - 0x32, - 0xb0, - 0xce, - 0xcd, - 0x74, - 0xb3, - 0xe2, - 0x94, - 0xc5, - 0x78, - 0x2f, - 0x34, - 0x1a, - 0x45, - 0xf7, - 0x8c, - 0x52, - 0xa5, - 0xbc, - 0x8d, - 0xec, - 0xd1, - 0x2f, - 0x31, - 0x3b, - 0xf0, - 0x49, - 0x59, - 0x5e, - 0x88, - 0x9d, - 0x15, - 0x92, - 0x35, - 0x32, - 0xc1, - 0xe7, - 0x61, - 0xec, - 0x50, - 0x48, - 0x7c, - 0xba, - 0x05, - 0xf9, - 0xf8, - 0xf8, - 0xa7, - 0x8c, - 0x83, - 0xe8, - 0x66, - 0x5b, - 0xeb, - 0xfe, - 0xd8, - 0x4f, - 0xdd, - 0x6d, - 0x36, - 0xc0, - 0xb2, - 0x90, - 0x0f, - 0xb8, - 0x52, - 0xf9, - 0x04, - 0x9b, - 0x40, - 0x2c, - 0x27, - 0xd6, - 0x36, - 0x8e, - 0xc2, - 0x1b, - 0x44, - 0xf3, - 0x92, - 0xd5, - 0x15, - 0x9e, - 0x9a, - 0xbc, - 0xf3, - 0x7d, - 0x03, - 0xd7, - 0x02, - 0x14, - 0x20, - 0xe9, - 0x10, - 0x92, - 0xfd, - 0xf9, - 0xfc, - 0x8f, - 0xe5, - 0x18, - 0xe1, - 0x95, - 0xcc, - 0x9e, - 0x60, - 0xa6, - 0xfa, - 0x38, - 0x4d, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x82, - 0x01, - 0x00, - 0x00, - 0xc3, - 0xc3, - 0x0d, - 0xb4, - 0x27, - 0x90, - 0x8d, - 0x4b, - 0xbf, - 0xb8, - 0x84, - 0xaa, - 0xd0, - 0xb8, - 0xc7, - 0x5d, - 0x99, - 0xbe, - 0x55, - 0xf6, - 0x3e, - 0x7c, - 0x49, - 0x20, - 0xcb, - 0x8a, - 0x8e, - 0x19, - 0x0e, - 0x66, - 0x24, - 0xac, - 0xaf, - 0x03, - 0x33, - 0x97, - 0xeb, - 0x95, - 0xd5, - 0x3b, - 0x0f, - 0x40, - 0x56, - 0x04, - 0x50, - 0xd1, - 0xe6, - 0xbe, - 0x84, - 0x0b, - 0x25, - 0xd3, - 0x9c, - 0xe2, - 0x83, - 0x6c, - 0xf5, - 0x62, - 0x5d, - 0xba, - 0x2b, - 0x7d, - 0x3d, - 0x7a, - 0x6c, - 0xe1, - 0xd2, - 0x0e, - 0x54, - 0x93, - 0x80, - 0x01, - 0x91, - 0x51, - 0x09, - 0xe8, - 0x5b, - 0x8e, - 0x47, - 0xbd, - 0x64, - 0xe4, - 0x0e, - 0x03, - 0x83, - 0x55, - 0xcf, - 0x5a, - 0x37, - 0xf0, - 0x25, - 0xb5, - 0x7d, - 0x21, - 0xd7, - 0x69, - 0xdf, - 0x6f, - 0xc2, - 0xcf, - 0x10, - 0xc9, - 0x8a, - 0x40, - 0x9f, - 0x7a, - 0x70, - 0xc0, - 0xe8, - 0xe8, - 0xc0, - 0xe6, - 0x9a, - 0x15, - 0x0a, - 0x8d, - 0x4e, - 0x46, - 0xcb, - 0x7a, - 0xdb, - 0xb3, - 0xcb, - 0x83, - 0x02, - 0xc4, - 0xf0, - 0xab, - 0xeb, - 0x02, - 0x01, - 0x0e, - 0x23, - 0xfc, - 0x1d, - 0xc4, - 0xbd, - 0xd4, - 0xaa, - 0x5d, - 0x31, - 0x46, - 0x99, - 0xce, - 0x9e, - 0xf8, - 0x04, - 0x75, - 0x10, - 0x67, - 0xc4, - 0x53, - 0x47, - 0x44, - 0xfa, - 0xc2, - 0x25, - 0x73, - 0x7e, - 0xd0, - 0x8e, - 0x59, - 0xd1, - 0xb2, - 0x5a, - 0xf4, - 0xc7, - 0x18, - 0x92, - 0x2f, - 0x39, - 0xab, - 0xcd, - 0xa3, - 0xb5, - 0xc2, - 0xb9, - 0xc7, - 0xb9, - 0x1b, - 0x9f, - 0x48, - 0xfa, - 0x13, - 0xc6, - 0x98, - 0x4d, - 0xca, - 0x84, - 0x9c, - 0x06, - 0xca, - 0xe7, - 0x89, - 0x01, - 0x04, - 0xc4, - 0x6c, - 0xfd, - 0x29, - 0x59, - 0x35, - 0xe7, - 0xf3, - 0xdd, - 0xce, - 0x64, - 0x59, - 0xbf, - 0x21, - 0x13, - 0xa9, - 0x9f, - 0x0e, - 0xc5, - 0xff, - 0xbd, - 0x33, - 0x00, - 0xec, - 0xac, - 0x6b, - 0x11, - 0xef, - 0x51, - 0x5e, - 0xad, - 0x07, - 0x15, - 0xde, - 0xb8, - 0x5f, - 0xc6, - 0xb9, - 0xa3, - 0x22, - 0x65, - 0x46, - 0x83, - 0x14, - 0xdf, - 0xd0, - 0xf1, - 0x44, - 0x8a, - 0xe1, - 0x9c, - 0x23, - 0x33, - 0xb4, - 0x97, - 0x33, - 0xe6, - 0x6b, - 0x81, - 0x02, - 0x81, - 0x81, - 0x00, - 0xec, - 0x12, - 0xa7, - 0x59, - 0x74, - 0x6a, - 0xde, - 0x3e, - 0xad, - 0xd8, - 0x36, - 0x80, - 0x50, - 0xa2, - 0xd5, - 0x21, - 0x81, - 0x07, - 0xf1, - 0xd0, - 0x91, - 0xf2, - 0x6c, - 0x12, - 0x2f, - 0x9d, - 0x1a, - 0x26, - 0xf8, - 0x30, - 0x65, - 0xdf, - 0xe8, - 0xc0, - 0x9b, - 0x6a, - 0x30, - 0x98, - 0x82, - 0x87, - 0xec, - 0xa2, - 0x56, - 0x87, - 0x62, - 0x6f, - 0xe7, - 0x9f, - 0xf6, - 0x56, - 0xe6, - 0x71, - 0x8f, - 0x49, - 0x86, - 0x93, - 0x5a, - 0x4d, - 0x34, - 0x58, - 0xfe, - 0xd9, - 0x04, - 0x13, - 0xaf, - 0x79, - 0xb7, - 0xad, - 0x11, - 0xd1, - 0x30, - 0x9a, - 0x14, - 0x06, - 0xa0, - 0xfa, - 0xb7, - 0x55, - 0xdc, - 0x6c, - 0x5a, - 0x4c, - 0x2c, - 0x59, - 0x56, - 0xf6, - 0xe8, - 0x9d, - 0xaf, - 0x0a, - 0x78, - 0x99, - 0x06, - 0x06, - 0x9e, - 0xe7, - 0x9c, - 0x51, - 0x55, - 0x43, - 0xfc, - 0x3b, - 0x6c, - 0x0b, - 0xbf, - 0x2d, - 0x41, - 0xa7, - 0xaf, - 0xb7, - 0xe0, - 0xe8, - 0x28, - 0x18, - 0xb4, - 0x13, - 0xd1, - 0xe6, - 0x97, - 0xd0, - 0x9f, - 0x6a, - 0x80, - 0xca, - 0xdd, - 0x1a, - 0x7e, - 0x15, - 0x02, - 0x81, - 0x81, - 0x00, - 0xd1, - 0x06, - 0x0c, - 0x1f, - 0xe3, - 0xd0, - 0xab, - 0xd6, - 0xca, - 0x7c, - 0xbc, - 0x7d, - 0x13, - 0x35, - 0xce, - 0x27, - 0xcd, - 0xd8, - 0x49, - 0x51, - 0x63, - 0x64, - 0x0f, - 0xca, - 0x06, - 0x12, - 0xfc, - 0x07, - 0x3e, - 0xaf, - 0x61, - 0x6d, - 0xe2, - 0x53, - 0x39, - 0x27, - 0xae, - 0xc3, - 0x11, - 0x9e, - 0x94, - 0x01, - 0x4f, - 0xe3, - 0xf3, - 0x67, - 0xf9, - 0x77, - 0xf9, - 0xe7, - 0x95, - 0x3a, - 0x6f, - 0xe2, - 0x20, - 0x73, - 0x3e, - 0xa4, - 0x7a, - 0x28, - 0xd4, - 0x61, - 0x97, - 0xf6, - 0x17, - 0xa0, - 0x23, - 0x10, - 0x2b, - 0xce, - 0x84, - 0x57, - 0x7e, - 0x25, - 0x1f, - 0xf4, - 0xa8, - 0x54, - 0xd2, - 0x65, - 0x94, - 0xcc, - 0x95, - 0x0a, - 0xab, - 0x30, - 0xc1, - 0x59, - 0x1f, - 0x61, - 0x8e, - 0xb9, - 0x6b, - 0xd7, - 0x4e, - 0xb9, - 0x83, - 0x43, - 0x79, - 0x85, - 0x11, - 0xbc, - 0x0f, - 0xae, - 0x25, - 0x20, - 0x05, - 0xbc, - 0xd2, - 0x48, - 0xa1, - 0x68, - 0x09, - 0x84, - 0xf6, - 0x12, - 0x9a, - 0x66, - 0xb9, - 0x2b, - 0xbb, - 0x76, - 0x03, - 0x17, - 0x46, - 0x4e, - 0x97, - 0x59, - 0x02, - 0x81, - 0x80, - 0x09, - 0x4c, - 0xfa, - 0xd6, - 0xe5, - 0x65, - 0x48, - 0x78, - 0x43, - 0xb5, - 0x1f, - 0x00, - 0x93, - 0x2c, - 0xb7, - 0x24, - 0xe8, - 0xc6, - 0x7d, - 0x5a, - 0x70, - 0x45, - 0x92, - 0xc8, - 0x6c, - 0xa3, - 0xcd, - 0xe1, - 0xf7, - 0x29, - 0x40, - 0xfa, - 0x3f, - 0x5b, - 0x47, - 0x44, - 0x39, - 0xc1, - 0xe8, - 0x72, - 0x9e, - 0x7a, - 0x0e, - 0xda, - 0xaa, - 0xa0, - 0x2a, - 0x09, - 0xfd, - 0x54, - 0x93, - 0x23, - 0xaa, - 0x37, - 0x85, - 0x5b, - 0xcc, - 0xd4, - 0xf9, - 0xd8, - 0xff, - 0xc1, - 0x61, - 0x0d, - 0xbd, - 0x7e, - 0x18, - 0x24, - 0x73, - 0x6d, - 0x40, - 0x72, - 0xf1, - 0x93, - 0x09, - 0x48, - 0x97, - 0x6c, - 0x84, - 0x90, - 0xa8, - 0x46, - 0x14, - 0x01, - 0x39, - 0x11, - 0xe5, - 0x3c, - 0x41, - 0x27, - 0x32, - 0x75, - 0x24, - 0xed, - 0xa1, - 0xd9, - 0x12, - 0x29, - 0x8a, - 0x28, - 0x71, - 0x89, - 0x8d, - 0xca, - 0x30, - 0xb0, - 0x01, - 0xc4, - 0x2f, - 0x82, - 0x19, - 0x14, - 0x4c, - 0x70, - 0x1c, - 0xb8, - 0x23, - 0x2e, - 0xe8, - 0x90, - 0x49, - 0x97, - 0x92, - 0x97, - 0x6b, - 0x7a, - 0x9d, - 0xb9, - 0x02, - 0x81, - 0x80, - 0x0f, - 0x0e, - 0xa1, - 0x76, - 0xf6, - 0xa1, - 0x44, - 0x8f, - 0xaf, - 0x7c, - 0x76, - 0xd3, - 0x87, - 0xbb, - 0xbb, - 0x83, - 0x10, - 0x88, - 0x01, - 0x18, - 0x14, - 0xd1, - 0xd3, - 0x75, - 0x59, - 0x24, - 0xaa, - 0xf5, - 0x16, - 0xa5, - 0xe9, - 0x9d, - 0xd1, - 0xcc, - 0xee, - 0xf4, - 0x15, - 0xd9, - 0xc5, - 0x7e, - 0x27, - 0xe9, - 0x44, - 0x49, - 0x06, - 0x72, - 0xb9, - 0xfc, - 0xd3, - 0x8a, - 0xc4, - 0x2c, - 0x36, - 0x7d, - 0x12, - 0x9b, - 0x5a, - 0xaa, - 0xdc, - 0x85, - 0xee, - 0x6e, - 0xad, - 0x54, - 0xb3, - 0xf4, - 0xfc, - 0x31, - 0xa1, - 0x06, - 0x3a, - 0x70, - 0x57, - 0x0c, - 0xf3, - 0x95, - 0x5b, - 0x3e, - 0xe8, - 0xfd, - 0x1a, - 0x4f, - 0xf6, - 0x78, - 0x93, - 0x46, - 0x6a, - 0xd7, - 0x31, - 0xb4, - 0x84, - 0x64, - 0x85, - 0x09, - 0x38, - 0x89, - 0x92, - 0x94, - 0x1c, - 0xbf, - 0xe2, - 0x3c, - 0x2a, - 0xe0, - 0xff, - 0x99, - 0xa3, - 0xf0, - 0x2b, - 0x31, - 0xc2, - 0x36, - 0xcd, - 0x60, - 0xbf, - 0x9d, - 0x2d, - 0x74, - 0x32, - 0xe8, - 0x9c, - 0x93, - 0x6e, - 0xbb, - 0x91, - 0x7b, - 0xfd, - 0xd9, - 0x02, - 0x81, - 0x81, - 0x00, - 0xa2, - 0x71, - 0x25, - 0x38, - 0xeb, - 0x2a, - 0xe9, - 0x37, - 0xcd, - 0xfe, - 0x44, - 0xce, - 0x90, - 0x3f, - 0x52, - 0x87, - 0x84, - 0x52, - 0x1b, - 0xae, - 0x8d, - 0x22, - 0x94, - 0xce, - 0x38, - 0xe6, - 0x04, - 0x88, - 0x76, - 0x85, - 0x9a, - 0xd3, - 0x14, - 0x09, - 0xe5, - 0x69, - 0x9a, - 0xff, - 0x58, - 0x92, - 0x02, - 0x6a, - 0x7d, - 0x7c, - 0x1e, - 0x2c, - 0xfd, - 0xa8, - 0xca, - 0x32, - 0x14, - 0x4f, - 0x0d, - 0x84, - 0x0d, - 0x37, - 0x43, - 0xbf, - 0xe4, - 0x5d, - 0x12, - 0xc8, - 0x24, - 0x91, - 0x27, - 0x8d, - 0x46, - 0xd9, - 0x54, - 0x53, - 0xe7, - 0x62, - 0x71, - 0xa8, - 0x2b, - 0x71, - 0x41, - 0x8d, - 0x75, - 0xf8, - 0x3a, - 0xa0, - 0x61, - 0x29, - 0x46, - 0xa6, - 0xe5, - 0x82, - 0xfa, - 0x3a, - 0xd9, - 0x08, - 0xfa, - 0xfc, - 0x63, - 0xfd, - 0x6b, - 0x30, - 0xbc, - 0xf4, - 0x4e, - 0x9e, - 0x8c, - 0x25, - 0x0c, - 0xb6, - 0x55, - 0xe7, - 0x3c, - 0xd4, - 0x4e, - 0x0b, - 0xfd, - 0x8b, - 0xc3, - 0x0e, - 0x1d, - 0x9c, - 0x44, - 0x57, - 0x8f, - 0x1f, - 0x86, - 0xf7, - 0xd5, - 0x1b, - 0xe4, - 0x95, + 0x30, 0x82, 0x04, 0xa3, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, + 0x01, 0x00, 0xc0, 0xc0, 0xce, 0x3e, 0x3c, 0x53, 0x67, 0x3f, + 0x4f, 0xc5, 0x2f, 0xa4, 0xc2, 0x5a, 0x2f, 0x58, 0xfd, 0x27, + 0x52, 0x6a, 0xe8, 0xcf, 0x4a, 0x73, 0x47, 0x8d, 0x25, 0x0f, + 0x5f, 0x03, 0x26, 0x78, 0xef, 0xf0, 0x22, 0x12, 0xd3, 0xde, + 0x47, 0xb2, 0x1c, 0x0b, 0x38, 0x63, 0x1a, 0x6c, 0x85, 0x7a, + 0x80, 0xc6, 0x8f, 0xa0, 0x41, 0xaf, 0x62, 0xc4, 0x67, 0x32, + 0x88, 0xf8, 0xa6, 0x9c, 0xf5, 0x23, 0x1d, 0xe4, 0xac, 0x3f, + 0x29, 0xf9, 0xec, 0xe1, 0x8b, 0x26, 0x03, 0x2c, 0xb2, 0xab, + 0xf3, 0x7d, 0xb5, 0xca, 0x49, 0xc0, 0x8f, 0x1c, 0xdf, 0x33, + 0x3a, 0x60, 0xda, 0x3c, 0xb0, 0x16, 0xf8, 0xa9, 0x12, 0x8f, + 0x64, 0xac, 0x23, 0x0c, 0x69, 0x64, 0x97, 0x5d, 0x99, 0xd4, + 0x09, 0x83, 0x9b, 0x61, 0xd3, 0xac, 0xf0, 0xde, 0xdd, 0x5e, + 0x9f, 0x44, 0x94, 0xdb, 0x3a, 0x4d, 0x97, 0xe8, 0x52, 0x29, + 0xf7, 0xdb, 0x94, 0x07, 0x45, 0x90, 0x78, 0x1e, 0x31, 0x0b, + 0x80, 0xf7, 0x57, 0xad, 0x1c, 0x79, 0xc5, 0xcb, 0x32, 0xb0, + 0xce, 0xcd, 0x74, 0xb3, 0xe2, 0x94, 0xc5, 0x78, 0x2f, 0x34, + 0x1a, 0x45, 0xf7, 0x8c, 0x52, 0xa5, 0xbc, 0x8d, 0xec, 0xd1, + 0x2f, 0x31, 0x3b, 0xf0, 0x49, 0x59, 0x5e, 0x88, 0x9d, 0x15, + 0x92, 0x35, 0x32, 0xc1, 0xe7, 0x61, 0xec, 0x50, 0x48, 0x7c, + 0xba, 0x05, 0xf9, 0xf8, 0xf8, 0xa7, 0x8c, 0x83, 0xe8, 0x66, + 0x5b, 0xeb, 0xfe, 0xd8, 0x4f, 0xdd, 0x6d, 0x36, 0xc0, 0xb2, + 0x90, 0x0f, 0xb8, 0x52, 0xf9, 0x04, 0x9b, 0x40, 0x2c, 0x27, + 0xd6, 0x36, 0x8e, 0xc2, 0x1b, 0x44, 0xf3, 0x92, 0xd5, 0x15, + 0x9e, 0x9a, 0xbc, 0xf3, 0x7d, 0x03, 0xd7, 0x02, 0x14, 0x20, + 0xe9, 0x10, 0x92, 0xfd, 0xf9, 0xfc, 0x8f, 0xe5, 0x18, 0xe1, + 0x95, 0xcc, 0x9e, 0x60, 0xa6, 0xfa, 0x38, 0x4d, 0x02, 0x03, + 0x01, 0x00, 0x01, 0x02, 0x82, 0x01, 0x00, 0x00, 0xc3, 0xc3, + 0x0d, 0xb4, 0x27, 0x90, 0x8d, 0x4b, 0xbf, 0xb8, 0x84, 0xaa, + 0xd0, 0xb8, 0xc7, 0x5d, 0x99, 0xbe, 0x55, 0xf6, 0x3e, 0x7c, + 0x49, 0x20, 0xcb, 0x8a, 0x8e, 0x19, 0x0e, 0x66, 0x24, 0xac, + 0xaf, 0x03, 0x33, 0x97, 0xeb, 0x95, 0xd5, 0x3b, 0x0f, 0x40, + 0x56, 0x04, 0x50, 0xd1, 0xe6, 0xbe, 0x84, 0x0b, 0x25, 0xd3, + 0x9c, 0xe2, 0x83, 0x6c, 0xf5, 0x62, 0x5d, 0xba, 0x2b, 0x7d, + 0x3d, 0x7a, 0x6c, 0xe1, 0xd2, 0x0e, 0x54, 0x93, 0x80, 0x01, + 0x91, 0x51, 0x09, 0xe8, 0x5b, 0x8e, 0x47, 0xbd, 0x64, 0xe4, + 0x0e, 0x03, 0x83, 0x55, 0xcf, 0x5a, 0x37, 0xf0, 0x25, 0xb5, + 0x7d, 0x21, 0xd7, 0x69, 0xdf, 0x6f, 0xc2, 0xcf, 0x10, 0xc9, + 0x8a, 0x40, 0x9f, 0x7a, 0x70, 0xc0, 0xe8, 0xe8, 0xc0, 0xe6, + 0x9a, 0x15, 0x0a, 0x8d, 0x4e, 0x46, 0xcb, 0x7a, 0xdb, 0xb3, + 0xcb, 0x83, 0x02, 0xc4, 0xf0, 0xab, 0xeb, 0x02, 0x01, 0x0e, + 0x23, 0xfc, 0x1d, 0xc4, 0xbd, 0xd4, 0xaa, 0x5d, 0x31, 0x46, + 0x99, 0xce, 0x9e, 0xf8, 0x04, 0x75, 0x10, 0x67, 0xc4, 0x53, + 0x47, 0x44, 0xfa, 0xc2, 0x25, 0x73, 0x7e, 0xd0, 0x8e, 0x59, + 0xd1, 0xb2, 0x5a, 0xf4, 0xc7, 0x18, 0x92, 0x2f, 0x39, 0xab, + 0xcd, 0xa3, 0xb5, 0xc2, 0xb9, 0xc7, 0xb9, 0x1b, 0x9f, 0x48, + 0xfa, 0x13, 0xc6, 0x98, 0x4d, 0xca, 0x84, 0x9c, 0x06, 0xca, + 0xe7, 0x89, 0x01, 0x04, 0xc4, 0x6c, 0xfd, 0x29, 0x59, 0x35, + 0xe7, 0xf3, 0xdd, 0xce, 0x64, 0x59, 0xbf, 0x21, 0x13, 0xa9, + 0x9f, 0x0e, 0xc5, 0xff, 0xbd, 0x33, 0x00, 0xec, 0xac, 0x6b, + 0x11, 0xef, 0x51, 0x5e, 0xad, 0x07, 0x15, 0xde, 0xb8, 0x5f, + 0xc6, 0xb9, 0xa3, 0x22, 0x65, 0x46, 0x83, 0x14, 0xdf, 0xd0, + 0xf1, 0x44, 0x8a, 0xe1, 0x9c, 0x23, 0x33, 0xb4, 0x97, 0x33, + 0xe6, 0x6b, 0x81, 0x02, 0x81, 0x81, 0x00, 0xec, 0x12, 0xa7, + 0x59, 0x74, 0x6a, 0xde, 0x3e, 0xad, 0xd8, 0x36, 0x80, 0x50, + 0xa2, 0xd5, 0x21, 0x81, 0x07, 0xf1, 0xd0, 0x91, 0xf2, 0x6c, + 0x12, 0x2f, 0x9d, 0x1a, 0x26, 0xf8, 0x30, 0x65, 0xdf, 0xe8, + 0xc0, 0x9b, 0x6a, 0x30, 0x98, 0x82, 0x87, 0xec, 0xa2, 0x56, + 0x87, 0x62, 0x6f, 0xe7, 0x9f, 0xf6, 0x56, 0xe6, 0x71, 0x8f, + 0x49, 0x86, 0x93, 0x5a, 0x4d, 0x34, 0x58, 0xfe, 0xd9, 0x04, + 0x13, 0xaf, 0x79, 0xb7, 0xad, 0x11, 0xd1, 0x30, 0x9a, 0x14, + 0x06, 0xa0, 0xfa, 0xb7, 0x55, 0xdc, 0x6c, 0x5a, 0x4c, 0x2c, + 0x59, 0x56, 0xf6, 0xe8, 0x9d, 0xaf, 0x0a, 0x78, 0x99, 0x06, + 0x06, 0x9e, 0xe7, 0x9c, 0x51, 0x55, 0x43, 0xfc, 0x3b, 0x6c, + 0x0b, 0xbf, 0x2d, 0x41, 0xa7, 0xaf, 0xb7, 0xe0, 0xe8, 0x28, + 0x18, 0xb4, 0x13, 0xd1, 0xe6, 0x97, 0xd0, 0x9f, 0x6a, 0x80, + 0xca, 0xdd, 0x1a, 0x7e, 0x15, 0x02, 0x81, 0x81, 0x00, 0xd1, + 0x06, 0x0c, 0x1f, 0xe3, 0xd0, 0xab, 0xd6, 0xca, 0x7c, 0xbc, + 0x7d, 0x13, 0x35, 0xce, 0x27, 0xcd, 0xd8, 0x49, 0x51, 0x63, + 0x64, 0x0f, 0xca, 0x06, 0x12, 0xfc, 0x07, 0x3e, 0xaf, 0x61, + 0x6d, 0xe2, 0x53, 0x39, 0x27, 0xae, 0xc3, 0x11, 0x9e, 0x94, + 0x01, 0x4f, 0xe3, 0xf3, 0x67, 0xf9, 0x77, 0xf9, 0xe7, 0x95, + 0x3a, 0x6f, 0xe2, 0x20, 0x73, 0x3e, 0xa4, 0x7a, 0x28, 0xd4, + 0x61, 0x97, 0xf6, 0x17, 0xa0, 0x23, 0x10, 0x2b, 0xce, 0x84, + 0x57, 0x7e, 0x25, 0x1f, 0xf4, 0xa8, 0x54, 0xd2, 0x65, 0x94, + 0xcc, 0x95, 0x0a, 0xab, 0x30, 0xc1, 0x59, 0x1f, 0x61, 0x8e, + 0xb9, 0x6b, 0xd7, 0x4e, 0xb9, 0x83, 0x43, 0x79, 0x85, 0x11, + 0xbc, 0x0f, 0xae, 0x25, 0x20, 0x05, 0xbc, 0xd2, 0x48, 0xa1, + 0x68, 0x09, 0x84, 0xf6, 0x12, 0x9a, 0x66, 0xb9, 0x2b, 0xbb, + 0x76, 0x03, 0x17, 0x46, 0x4e, 0x97, 0x59, 0x02, 0x81, 0x80, + 0x09, 0x4c, 0xfa, 0xd6, 0xe5, 0x65, 0x48, 0x78, 0x43, 0xb5, + 0x1f, 0x00, 0x93, 0x2c, 0xb7, 0x24, 0xe8, 0xc6, 0x7d, 0x5a, + 0x70, 0x45, 0x92, 0xc8, 0x6c, 0xa3, 0xcd, 0xe1, 0xf7, 0x29, + 0x40, 0xfa, 0x3f, 0x5b, 0x47, 0x44, 0x39, 0xc1, 0xe8, 0x72, + 0x9e, 0x7a, 0x0e, 0xda, 0xaa, 0xa0, 0x2a, 0x09, 0xfd, 0x54, + 0x93, 0x23, 0xaa, 0x37, 0x85, 0x5b, 0xcc, 0xd4, 0xf9, 0xd8, + 0xff, 0xc1, 0x61, 0x0d, 0xbd, 0x7e, 0x18, 0x24, 0x73, 0x6d, + 0x40, 0x72, 0xf1, 0x93, 0x09, 0x48, 0x97, 0x6c, 0x84, 0x90, + 0xa8, 0x46, 0x14, 0x01, 0x39, 0x11, 0xe5, 0x3c, 0x41, 0x27, + 0x32, 0x75, 0x24, 0xed, 0xa1, 0xd9, 0x12, 0x29, 0x8a, 0x28, + 0x71, 0x89, 0x8d, 0xca, 0x30, 0xb0, 0x01, 0xc4, 0x2f, 0x82, + 0x19, 0x14, 0x4c, 0x70, 0x1c, 0xb8, 0x23, 0x2e, 0xe8, 0x90, + 0x49, 0x97, 0x92, 0x97, 0x6b, 0x7a, 0x9d, 0xb9, 0x02, 0x81, + 0x80, 0x0f, 0x0e, 0xa1, 0x76, 0xf6, 0xa1, 0x44, 0x8f, 0xaf, + 0x7c, 0x76, 0xd3, 0x87, 0xbb, 0xbb, 0x83, 0x10, 0x88, 0x01, + 0x18, 0x14, 0xd1, 0xd3, 0x75, 0x59, 0x24, 0xaa, 0xf5, 0x16, + 0xa5, 0xe9, 0x9d, 0xd1, 0xcc, 0xee, 0xf4, 0x15, 0xd9, 0xc5, + 0x7e, 0x27, 0xe9, 0x44, 0x49, 0x06, 0x72, 0xb9, 0xfc, 0xd3, + 0x8a, 0xc4, 0x2c, 0x36, 0x7d, 0x12, 0x9b, 0x5a, 0xaa, 0xdc, + 0x85, 0xee, 0x6e, 0xad, 0x54, 0xb3, 0xf4, 0xfc, 0x31, 0xa1, + 0x06, 0x3a, 0x70, 0x57, 0x0c, 0xf3, 0x95, 0x5b, 0x3e, 0xe8, + 0xfd, 0x1a, 0x4f, 0xf6, 0x78, 0x93, 0x46, 0x6a, 0xd7, 0x31, + 0xb4, 0x84, 0x64, 0x85, 0x09, 0x38, 0x89, 0x92, 0x94, 0x1c, + 0xbf, 0xe2, 0x3c, 0x2a, 0xe0, 0xff, 0x99, 0xa3, 0xf0, 0x2b, + 0x31, 0xc2, 0x36, 0xcd, 0x60, 0xbf, 0x9d, 0x2d, 0x74, 0x32, + 0xe8, 0x9c, 0x93, 0x6e, 0xbb, 0x91, 0x7b, 0xfd, 0xd9, 0x02, + 0x81, 0x81, 0x00, 0xa2, 0x71, 0x25, 0x38, 0xeb, 0x2a, 0xe9, + 0x37, 0xcd, 0xfe, 0x44, 0xce, 0x90, 0x3f, 0x52, 0x87, 0x84, + 0x52, 0x1b, 0xae, 0x8d, 0x22, 0x94, 0xce, 0x38, 0xe6, 0x04, + 0x88, 0x76, 0x85, 0x9a, 0xd3, 0x14, 0x09, 0xe5, 0x69, 0x9a, + 0xff, 0x58, 0x92, 0x02, 0x6a, 0x7d, 0x7c, 0x1e, 0x2c, 0xfd, + 0xa8, 0xca, 0x32, 0x14, 0x4f, 0x0d, 0x84, 0x0d, 0x37, 0x43, + 0xbf, 0xe4, 0x5d, 0x12, 0xc8, 0x24, 0x91, 0x27, 0x8d, 0x46, + 0xd9, 0x54, 0x53, 0xe7, 0x62, 0x71, 0xa8, 0x2b, 0x71, 0x41, + 0x8d, 0x75, 0xf8, 0x3a, 0xa0, 0x61, 0x29, 0x46, 0xa6, 0xe5, + 0x82, 0xfa, 0x3a, 0xd9, 0x08, 0xfa, 0xfc, 0x63, 0xfd, 0x6b, + 0x30, 0xbc, 0xf4, 0x4e, 0x9e, 0x8c, 0x25, 0x0c, 0xb6, 0x55, + 0xe7, 0x3c, 0xd4, 0x4e, 0x0b, 0xfd, 0x8b, 0xc3, 0x0e, 0x1d, + 0x9c, 0x44, 0x57, 0x8f, 0x1f, 0x86, 0xf7, 0xd5, 0x1b, 0xe4, + 0x95 }; static unsigned char test3072[] = { @@ -2314,2355 +410,241 @@ static unsigned char test3072[] = { }; static unsigned char test4096[] = { - 0x30, - 0x82, - 0x09, - 0x29, - 0x02, - 0x01, - 0x00, - 0x02, - 0x82, - 0x02, - 0x01, - 0x00, - 0xc0, - 0x71, - 0xac, - 0x1a, - 0x13, - 0x88, - 0x82, - 0x43, - 0x3b, - 0x51, - 0x57, - 0x71, - 0x8d, - 0xb6, - 0x2b, - 0x82, - 0x65, - 0x21, - 0x53, - 0x5f, - 0x28, - 0x29, - 0x4f, - 0x8d, - 0x7c, - 0x8a, - 0xb9, - 0x44, - 0xb3, - 0x28, - 0x41, - 0x4f, - 0xd3, - 0xfa, - 0x6a, - 0xf8, - 0xb9, - 0x28, - 0x50, - 0x39, - 0x67, - 0x53, - 0x2c, - 0x3c, - 0xd7, - 0xcb, - 0x96, - 0x41, - 0x40, - 0x32, - 0xbb, - 0xeb, - 0x70, - 0xae, - 0x1f, - 0xb0, - 0x65, - 0xf7, - 0x3a, - 0xd9, - 0x22, - 0xfd, - 0x10, - 0xae, - 0xbd, - 0x02, - 0xe2, - 0xdd, - 0xf3, - 0xc2, - 0x79, - 0x3c, - 0xc6, - 0xfc, - 0x75, - 0xbb, - 0xaf, - 0x4e, - 0x3a, - 0x36, - 0xc2, - 0x4f, - 0xea, - 0x25, - 0xdf, - 0x13, - 0x16, - 0x4b, - 0x20, - 0xfe, - 0x4b, - 0x69, - 0x16, - 0xc4, - 0x7f, - 0x1a, - 0x43, - 0xa6, - 0x17, - 0x1b, - 0xb9, - 0x0a, - 0xf3, - 0x09, - 0x86, - 0x28, - 0x89, - 0xcf, - 0x2c, - 0xd0, - 0xd4, - 0x81, - 0xaf, - 0xc6, - 0x6d, - 0xe6, - 0x21, - 0x8d, - 0xee, - 0xef, - 0xea, - 0xdc, - 0xb7, - 0xc6, - 0x3b, - 0x63, - 0x9f, - 0x0e, - 0xad, - 0x89, - 0x78, - 0x23, - 0x18, - 0xbf, - 0x70, - 0x7e, - 0x84, - 0xe0, - 0x37, - 0xec, - 0xdb, - 0x8e, - 0x9c, - 0x3e, - 0x6a, - 0x19, - 0xcc, - 0x99, - 0x72, - 0xe6, - 0xb5, - 0x7d, - 0x6d, - 0xfa, - 0xe5, - 0xd3, - 0xe4, - 0x90, - 0xb5, - 0xb2, - 0xb2, - 0x12, - 0x70, - 0x4e, - 0xca, - 0xf8, - 0x10, - 0xf8, - 0xa3, - 0x14, - 0xc2, - 0x48, - 0x19, - 0xeb, - 0x60, - 0x99, - 0xbb, - 0x2a, - 0x1f, - 0xb1, - 0x7a, - 0xb1, - 0x3d, - 0x24, - 0xfb, - 0xa0, - 0x29, - 0xda, - 0xbd, - 0x1b, - 0xd7, - 0xa4, - 0xbf, - 0xef, - 0x60, - 0x2d, - 0x22, - 0xca, - 0x65, - 0x98, - 0xf1, - 0xc4, - 0xe1, - 0xc9, - 0x02, - 0x6b, - 0x16, - 0x28, - 0x2f, - 0xa1, - 0xaa, - 0x79, - 0x00, - 0xda, - 0xdc, - 0x7c, - 0x43, - 0xf7, - 0x42, - 0x3c, - 0xa0, - 0xef, - 0x68, - 0xf7, - 0xdf, - 0xb9, - 0x69, - 0xfb, - 0x8e, - 0x01, - 0xed, - 0x01, - 0x42, - 0xb5, - 0x4e, - 0x57, - 0xa6, - 0x26, - 0xb8, - 0xd0, - 0x7b, - 0x56, - 0x6d, - 0x03, - 0xc6, - 0x40, - 0x8c, - 0x8c, - 0x2a, - 0x55, - 0xd7, - 0x9c, - 0x35, - 0x00, - 0x94, - 0x93, - 0xec, - 0x03, - 0xeb, - 0x22, - 0xef, - 0x77, - 0xbb, - 0x79, - 0x13, - 0x3f, - 0x15, - 0xa1, - 0x8f, - 0xca, - 0xdf, - 0xfd, - 0xd3, - 0xb8, - 0xe1, - 0xd4, - 0xcc, - 0x09, - 0x3f, - 0x3c, - 0x2c, - 0xdb, - 0xd1, - 0x49, - 0x7f, - 0x38, - 0x07, - 0x83, - 0x6d, - 0xeb, - 0x08, - 0x66, - 0xe9, - 0x06, - 0x44, - 0x12, - 0xac, - 0x95, - 0x22, - 0x90, - 0x23, - 0x67, - 0xd4, - 0x08, - 0xcc, - 0xf4, - 0xb7, - 0xdc, - 0xcc, - 0x87, - 0xd4, - 0xac, - 0x69, - 0x35, - 0x4c, - 0xb5, - 0x39, - 0x36, - 0xcd, - 0xa4, - 0xd2, - 0x95, - 0xca, - 0x0d, - 0xc5, - 0xda, - 0xc2, - 0xc5, - 0x22, - 0x32, - 0x28, - 0x08, - 0xe3, - 0xd2, - 0x8b, - 0x38, - 0x30, - 0xdc, - 0x8c, - 0x75, - 0x4f, - 0x6a, - 0xec, - 0x7a, - 0xac, - 0x16, - 0x3e, - 0xa8, - 0xd4, - 0x6a, - 0x45, - 0xe1, - 0xa8, - 0x4f, - 0x2e, - 0x80, - 0x34, - 0xaa, - 0x54, - 0x1b, - 0x02, - 0x95, - 0x7d, - 0x8a, - 0x6d, - 0xcc, - 0x79, - 0xca, - 0xf2, - 0xa4, - 0x2e, - 0x8d, - 0xfb, - 0xfe, - 0x15, - 0x51, - 0x10, - 0x0e, - 0x4d, - 0x88, - 0xb1, - 0xc7, - 0xf4, - 0x79, - 0xdb, - 0xf0, - 0xb4, - 0x56, - 0x44, - 0x37, - 0xca, - 0x5a, - 0xc1, - 0x8c, - 0x48, - 0xac, - 0xae, - 0x48, - 0x80, - 0x83, - 0x01, - 0x3f, - 0xde, - 0xd9, - 0xd3, - 0x2c, - 0x51, - 0x46, - 0xb1, - 0x41, - 0xb6, - 0xc6, - 0x91, - 0x72, - 0xf9, - 0x83, - 0x55, - 0x1b, - 0x8c, - 0xba, - 0xf3, - 0x73, - 0xe5, - 0x2c, - 0x74, - 0x50, - 0x3a, - 0xbe, - 0xc5, - 0x2f, - 0xa7, - 0xb2, - 0x6d, - 0x8c, - 0x9e, - 0x13, - 0x77, - 0xa3, - 0x13, - 0xcd, - 0x6d, - 0x8c, - 0x45, - 0xe1, - 0xfc, - 0x0b, - 0xb7, - 0x69, - 0xe9, - 0x27, - 0xbc, - 0x65, - 0xc3, - 0xfa, - 0x9b, - 0xd0, - 0xef, - 0xfe, - 0xe8, - 0x1f, - 0xb3, - 0x5e, - 0x34, - 0xf4, - 0x8c, - 0xea, - 0xfc, - 0xd3, - 0x81, - 0xbf, - 0x3d, - 0x30, - 0xb2, - 0xb4, - 0x01, - 0xe8, - 0x43, - 0x0f, - 0xba, - 0x02, - 0x23, - 0x42, - 0x76, - 0x82, - 0x31, - 0x73, - 0x91, - 0xed, - 0x07, - 0x46, - 0x61, - 0x0d, - 0x39, - 0x83, - 0x40, - 0xce, - 0x7a, - 0xd4, - 0xdb, - 0x80, - 0x2c, - 0x1f, - 0x0d, - 0xd1, - 0x34, - 0xd4, - 0x92, - 0xe3, - 0xd4, - 0xf1, - 0xc2, - 0x01, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x82, - 0x02, - 0x01, - 0x00, - 0x97, - 0x6c, - 0xda, - 0x6e, - 0xea, - 0x4f, - 0xcf, - 0xaf, - 0xf7, - 0x4c, - 0xd9, - 0xf1, - 0x90, - 0x00, - 0x77, - 0xdb, - 0xf2, - 0x97, - 0x76, - 0x72, - 0xb9, - 0xb7, - 0x47, - 0xd1, - 0x9c, - 0xdd, - 0xcb, - 0x4a, - 0x33, - 0x6e, - 0xc9, - 0x75, - 0x76, - 0xe6, - 0xe4, - 0xa5, - 0x31, - 0x8c, - 0x77, - 0x13, - 0xb4, - 0x29, - 0xcd, - 0xf5, - 0x52, - 0x17, - 0xef, - 0xf3, - 0x08, - 0x00, - 0xe3, - 0xbd, - 0x2e, - 0xbc, - 0xd4, - 0x52, - 0x88, - 0xe9, - 0x30, - 0x75, - 0x0b, - 0x02, - 0xf5, - 0xcd, - 0x89, - 0x0c, - 0x6c, - 0x57, - 0x19, - 0x27, - 0x3d, - 0x1e, - 0x85, - 0xb4, - 0xc1, - 0x2f, - 0x1d, - 0x92, - 0x00, - 0x5c, - 0x76, - 0x29, - 0x4b, - 0xa4, - 0xe1, - 0x12, - 0xb3, - 0xc8, - 0x09, - 0xfe, - 0x0e, - 0x78, - 0x72, - 0x61, - 0xcb, - 0x61, - 0x6f, - 0x39, - 0x91, - 0x95, - 0x4e, - 0xd5, - 0x3e, - 0xc7, - 0x8f, - 0xb8, - 0xf6, - 0x36, - 0xfe, - 0x9c, - 0x93, - 0x9a, - 0x38, - 0x25, - 0x7a, - 0xf4, - 0x4a, - 0x12, - 0xd4, - 0xa0, - 0x13, - 0xbd, - 0xf9, - 0x1d, - 0x12, - 0x3e, - 0x21, - 0x39, - 0xfb, - 0x72, - 0xe0, - 0x05, - 0x3d, - 0xc3, - 0xe5, - 0x50, - 0xa8, - 0x5d, - 0x85, - 0xa3, - 0xea, - 0x5f, - 0x1c, - 0xb2, - 0x3f, - 0xea, - 0x6d, - 0x03, - 0x91, - 0x55, - 0xd8, - 0x19, - 0x0a, - 0x21, - 0x12, - 0x16, - 0xd9, - 0x12, - 0xc4, - 0xe6, - 0x07, - 0x18, - 0x5b, - 0x26, - 0xa4, - 0xae, - 0xed, - 0x2b, - 0xb7, - 0xa6, - 0xed, - 0xf8, - 0xad, - 0xec, - 0x77, - 0xe6, - 0x7f, - 0x4f, - 0x76, - 0x00, - 0xc0, - 0xfa, - 0x15, - 0x92, - 0xb4, - 0x2c, - 0x22, - 0xc2, - 0xeb, - 0x6a, - 0xad, - 0x14, - 0x05, - 0xb2, - 0xe5, - 0x8a, - 0x9e, - 0x85, - 0x83, - 0xcc, - 0x04, - 0xf1, - 0x56, - 0x78, - 0x44, - 0x5e, - 0xde, - 0xe0, - 0x60, - 0x1a, - 0x65, - 0x79, - 0x31, - 0x23, - 0x05, - 0xbb, - 0x01, - 0xff, - 0xdd, - 0x2e, - 0xb7, - 0xb3, - 0xaa, - 0x74, - 0xe0, - 0xa5, - 0x94, - 0xaf, - 0x4b, - 0xde, - 0x58, - 0x0f, - 0x55, - 0xde, - 0x33, - 0xf6, - 0xe3, - 0xd6, - 0x34, - 0x36, - 0x57, - 0xd6, - 0x79, - 0x91, - 0x2e, - 0xbe, - 0x3b, - 0xd9, - 0x4e, - 0xb6, - 0x9d, - 0x21, - 0x5c, - 0xd3, - 0x48, - 0x14, - 0x7f, - 0x4a, - 0xc4, - 0x60, - 0xa9, - 0x29, - 0xf8, - 0x53, - 0x7f, - 0x88, - 0x11, - 0x2d, - 0xb5, - 0xc5, - 0x2d, - 0x6f, - 0xee, - 0x85, - 0x0b, - 0xf7, - 0x8d, - 0x9a, - 0xbe, - 0xb0, - 0x42, - 0xf2, - 0x2e, - 0x71, - 0xaf, - 0x19, - 0x31, - 0x6d, - 0xec, - 0xcd, - 0x6f, - 0x2b, - 0x23, - 0xdf, - 0xb4, - 0x40, - 0xaf, - 0x2c, - 0x0a, - 0xc3, - 0x1b, - 0x7d, - 0x7d, - 0x03, - 0x1d, - 0x4b, - 0xf3, - 0xb5, - 0xe0, - 0x85, - 0xd8, - 0xdf, - 0x91, - 0x6b, - 0x0a, - 0x69, - 0xf7, - 0xf2, - 0x69, - 0x66, - 0x5b, - 0xf1, - 0xcf, - 0x46, - 0x7d, - 0xe9, - 0x70, - 0xfa, - 0x6d, - 0x7e, - 0x75, - 0x4e, - 0xa9, - 0x77, - 0xe6, - 0x8c, - 0x02, - 0xf7, - 0x14, - 0x4d, - 0xa5, - 0x41, - 0x8f, - 0x3f, - 0xc1, - 0x62, - 0x1e, - 0x71, - 0x5e, - 0x38, - 0xb4, - 0xd6, - 0xe6, - 0xe1, - 0x4b, - 0xc2, - 0x2c, - 0x30, - 0x83, - 0x81, - 0x6f, - 0x49, - 0x2e, - 0x96, - 0xe6, - 0xc9, - 0x9a, - 0xf7, - 0x5d, - 0x09, - 0xa0, - 0x55, - 0x02, - 0xa5, - 0x3a, - 0x25, - 0x23, - 0xd0, - 0x92, - 0xc3, - 0xa3, - 0xe3, - 0x0e, - 0x12, - 0x2f, - 0x4d, - 0xef, - 0xf3, - 0x55, - 0x5a, - 0xbe, - 0xe6, - 0x19, - 0x86, - 0x31, - 0xab, - 0x75, - 0x9a, - 0xd3, - 0xf0, - 0x2c, - 0xc5, - 0x41, - 0x92, - 0xd9, - 0x1f, - 0x5f, - 0x11, - 0x8c, - 0x75, - 0x1c, - 0x63, - 0xd0, - 0x02, - 0x80, - 0x2c, - 0x68, - 0xcb, - 0x93, - 0xfb, - 0x51, - 0x73, - 0x49, - 0xb4, - 0x60, - 0xda, - 0xe2, - 0x26, - 0xaf, - 0xa9, - 0x46, - 0x12, - 0xb8, - 0xec, - 0x50, - 0xdd, - 0x12, - 0x06, - 0x5f, - 0xce, - 0x59, - 0xe6, - 0xf6, - 0x1c, - 0xe0, - 0x54, - 0x10, - 0xad, - 0xf6, - 0xcd, - 0x98, - 0xcc, - 0x0f, - 0xfb, - 0xcb, - 0x41, - 0x14, - 0x9d, - 0xed, - 0xe4, - 0xb4, - 0x74, - 0x5f, - 0x09, - 0x60, - 0xc7, - 0x12, - 0xf6, - 0x7b, - 0x3c, - 0x8f, - 0xa7, - 0x20, - 0xbc, - 0xe4, - 0xb1, - 0xef, - 0xeb, - 0xa4, - 0x93, - 0xc5, - 0x06, - 0xca, - 0x9a, - 0x27, - 0x9d, - 0x87, - 0xf3, - 0xde, - 0xca, - 0xe5, - 0xe7, - 0xf6, - 0x1c, - 0x01, - 0x65, - 0x5b, - 0xfb, - 0x19, - 0x79, - 0x6e, - 0x08, - 0x26, - 0xc5, - 0xc8, - 0x28, - 0x0e, - 0xb6, - 0x3b, - 0x07, - 0x08, - 0xc1, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0xe8, - 0x1c, - 0x73, - 0xa6, - 0xb8, - 0xe0, - 0x0e, - 0x6d, - 0x8d, - 0x1b, - 0xb9, - 0x53, - 0xed, - 0x58, - 0x94, - 0xe6, - 0x1d, - 0x60, - 0x14, - 0x5c, - 0x76, - 0x43, - 0xc4, - 0x58, - 0x19, - 0xc4, - 0x24, - 0xe8, - 0xbc, - 0x1b, - 0x3b, - 0x0b, - 0x13, - 0x24, - 0x45, - 0x54, - 0x0e, - 0xcc, - 0x37, - 0xf0, - 0xe0, - 0x63, - 0x7d, - 0xc3, - 0xf7, - 0xfb, - 0x81, - 0x74, - 0x81, - 0xc4, - 0x0f, - 0x1a, - 0x21, - 0x48, - 0xaf, - 0xce, - 0xc1, - 0xc4, - 0x94, - 0x18, - 0x06, - 0x44, - 0x8d, - 0xd3, - 0xd2, - 0x22, - 0x2d, - 0x2d, - 0x3e, - 0x5a, - 0x31, - 0xdc, - 0x95, - 0x8e, - 0xf4, - 0x41, - 0xfc, - 0x58, - 0xc9, - 0x40, - 0x92, - 0x17, - 0x5f, - 0xe3, - 0xda, - 0xac, - 0x9e, - 0x3f, - 0x1c, - 0x2a, - 0x6b, - 0x58, - 0x5f, - 0x48, - 0x78, - 0x20, - 0xb1, - 0xaf, - 0x24, - 0x9b, - 0x3c, - 0x20, - 0x8b, - 0x93, - 0x25, - 0x9e, - 0xe6, - 0x6b, - 0xbc, - 0x13, - 0x42, - 0x14, - 0x6c, - 0x36, - 0x31, - 0xff, - 0x7a, - 0xd1, - 0xc1, - 0x1a, - 0x26, - 0x14, - 0x7f, - 0xa9, - 0x76, - 0xa7, - 0x0c, - 0xf8, - 0xcc, - 0xed, - 0x07, - 0x6a, - 0xd2, - 0xdf, - 0x62, - 0xee, - 0x0a, - 0x7c, - 0x84, - 0xcb, - 0x49, - 0x90, - 0xb2, - 0x03, - 0x0d, - 0xa2, - 0x82, - 0x06, - 0x77, - 0xf1, - 0xcd, - 0x67, - 0xf2, - 0x47, - 0x21, - 0x02, - 0x3f, - 0x43, - 0x21, - 0xf0, - 0x46, - 0x30, - 0x62, - 0x51, - 0x72, - 0xb1, - 0xe7, - 0x48, - 0xc6, - 0x67, - 0x12, - 0xcd, - 0x9e, - 0xd6, - 0x15, - 0xe5, - 0x21, - 0xed, - 0xfa, - 0x8f, - 0x30, - 0xa6, - 0x41, - 0xfe, - 0xb6, - 0xfa, - 0x8f, - 0x34, - 0x14, - 0x19, - 0xe8, - 0x11, - 0xf7, - 0xa5, - 0x77, - 0x3e, - 0xb7, - 0xf9, - 0x39, - 0x07, - 0x8c, - 0x67, - 0x2a, - 0xab, - 0x7b, - 0x08, - 0xf8, - 0xb0, - 0x06, - 0xa8, - 0xea, - 0x2f, - 0x8f, - 0xfa, - 0xcc, - 0xcc, - 0x40, - 0xce, - 0xf3, - 0x70, - 0x4f, - 0x3f, - 0x7f, - 0xe2, - 0x0c, - 0xea, - 0x76, - 0x4a, - 0x35, - 0x4e, - 0x47, - 0xad, - 0x2b, - 0xa7, - 0x97, - 0x5d, - 0x74, - 0x43, - 0x97, - 0x90, - 0xd2, - 0xfb, - 0xd9, - 0xf9, - 0x96, - 0x01, - 0x33, - 0x05, - 0xed, - 0x7b, - 0x03, - 0x05, - 0xad, - 0xf8, - 0x49, - 0x03, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0xd4, - 0x40, - 0x17, - 0x66, - 0x10, - 0x92, - 0x95, - 0xc8, - 0xec, - 0x62, - 0xa9, - 0x7a, - 0xcb, - 0x93, - 0x8e, - 0xe6, - 0x53, - 0xd4, - 0x80, - 0x48, - 0x27, - 0x4b, - 0x41, - 0xce, - 0x61, - 0xdf, - 0xbf, - 0x94, - 0xa4, - 0x3d, - 0x71, - 0x03, - 0x0b, - 0xed, - 0x25, - 0x71, - 0x98, - 0xa4, - 0xd6, - 0xd5, - 0x4a, - 0x57, - 0xf5, - 0x6c, - 0x1b, - 0xda, - 0x21, - 0x7d, - 0x35, - 0x45, - 0xb3, - 0xf3, - 0x6a, - 0xd9, - 0xd3, - 0x43, - 0xe8, - 0x5c, - 0x54, - 0x1c, - 0x83, - 0x1b, - 0xb4, - 0x5f, - 0xf2, - 0x97, - 0x24, - 0x2e, - 0xdc, - 0x40, - 0xde, - 0x92, - 0x23, - 0x59, - 0x8e, - 0xbc, - 0xd2, - 0xa1, - 0xf2, - 0xe0, - 0x4c, - 0xdd, - 0x0b, - 0xd1, - 0xe7, - 0xae, - 0x65, - 0xbc, - 0xb5, - 0xf5, - 0x5b, - 0x98, - 0xe9, - 0xd7, - 0xc2, - 0xb7, - 0x0e, - 0x55, - 0x71, - 0x0e, - 0x3c, - 0x0a, - 0x24, - 0x6b, - 0xa6, - 0xe6, - 0x14, - 0x61, - 0x11, - 0xfd, - 0x33, - 0x42, - 0x99, - 0x2b, - 0x84, - 0x77, - 0x74, - 0x92, - 0x91, - 0xf5, - 0x79, - 0x79, - 0xcf, - 0xad, - 0x8e, - 0x04, - 0xef, - 0x80, - 0x1e, - 0x57, - 0xf4, - 0x14, - 0xf5, - 0x35, - 0x09, - 0x74, - 0xb2, - 0x13, - 0x71, - 0x58, - 0x6b, - 0xea, - 0x32, - 0x5d, - 0xf3, - 0xd3, - 0x76, - 0x48, - 0x39, - 0x10, - 0x23, - 0x84, - 0x9d, - 0xbe, - 0x92, - 0x77, - 0x4a, - 0xed, - 0x70, - 0x3e, - 0x1a, - 0xa2, - 0x6c, - 0xb3, - 0x81, - 0x00, - 0xc3, - 0xc9, - 0xe4, - 0x52, - 0xc8, - 0x24, - 0x88, - 0x0c, - 0x41, - 0xad, - 0x87, - 0x5a, - 0xea, - 0xa3, - 0x7a, - 0x85, - 0x1c, - 0x5e, - 0x31, - 0x7f, - 0xc3, - 0x35, - 0xc6, - 0xfa, - 0x10, - 0xc8, - 0x75, - 0x10, - 0xc4, - 0x96, - 0x99, - 0xe7, - 0xfe, - 0x01, - 0xb4, - 0x74, - 0xdb, - 0xb4, - 0x11, - 0xc3, - 0xc8, - 0x8c, - 0xf6, - 0xf7, - 0x3b, - 0x66, - 0x50, - 0xfc, - 0xdb, - 0xeb, - 0xca, - 0x47, - 0x85, - 0x89, - 0xe1, - 0x65, - 0xd9, - 0x62, - 0x34, - 0x3c, - 0x70, - 0xd8, - 0x2e, - 0xb4, - 0x2f, - 0x65, - 0x3c, - 0x4a, - 0xa6, - 0x2a, - 0xe7, - 0xc7, - 0xd8, - 0x41, - 0x8f, - 0x8a, - 0x43, - 0xbf, - 0x42, - 0xf2, - 0x4d, - 0xbc, - 0xfc, - 0x9e, - 0x27, - 0x95, - 0xfb, - 0x75, - 0xff, - 0xab, - 0x02, - 0x82, - 0x01, - 0x00, - 0x41, - 0x2f, - 0x44, - 0x57, - 0x6d, - 0x12, - 0x17, - 0x5b, - 0x32, - 0xc6, - 0xb7, - 0x6c, - 0x57, - 0x7a, - 0x8a, - 0x0e, - 0x79, - 0xef, - 0x72, - 0xa8, - 0x68, - 0xda, - 0x2d, - 0x38, - 0xe4, - 0xbb, - 0x8d, - 0xf6, - 0x02, - 0x65, - 0xcf, - 0x56, - 0x13, - 0xe1, - 0x1a, - 0xcb, - 0x39, - 0x80, - 0xa6, - 0xb1, - 0x32, - 0x03, - 0x1e, - 0xdd, - 0xbb, - 0x35, - 0xd9, - 0xac, - 0x43, - 0x89, - 0x31, - 0x08, - 0x90, - 0x92, - 0x5e, - 0x35, - 0x3d, - 0x7b, - 0x9c, - 0x6f, - 0x86, - 0xcb, - 0x17, - 0xdd, - 0x85, - 0xe4, - 0xed, - 0x35, - 0x08, - 0x8e, - 0xc1, - 0xf4, - 0x05, - 0xd8, - 0x68, - 0xc6, - 0x63, - 0x3c, - 0xf7, - 0xff, - 0xf7, - 0x47, - 0x33, - 0x39, - 0xc5, - 0x3e, - 0xb7, - 0x0e, - 0x58, - 0x35, - 0x9d, - 0x81, - 0xea, - 0xf8, - 0x6a, - 0x2c, - 0x1c, - 0x5a, - 0x68, - 0x78, - 0x64, - 0x11, - 0x6b, - 0xc1, - 0x3e, - 0x4e, - 0x7a, - 0xbd, - 0x84, - 0xcb, - 0x0f, - 0xc2, - 0xb6, - 0x85, - 0x1d, - 0xd3, - 0x76, - 0xc5, - 0x93, - 0x6a, - 0x69, - 0x89, - 0x56, - 0x34, - 0xdc, - 0x4a, - 0x9b, - 0xbc, - 0xff, - 0xa8, - 0x0d, - 0x6e, - 0x35, - 0x9c, - 0x60, - 0xa7, - 0x23, - 0x30, - 0xc7, - 0x06, - 0x64, - 0x39, - 0x8b, - 0x94, - 0x89, - 0xee, - 0xba, - 0x7f, - 0x60, - 0x8d, - 0xfa, - 0xb6, - 0x97, - 0x76, - 0xdc, - 0x51, - 0x4a, - 0x3c, - 0xeb, - 0x3a, - 0x14, - 0x2c, - 0x20, - 0x60, - 0x69, - 0x4a, - 0x86, - 0xfe, - 0x8c, - 0x21, - 0x84, - 0x49, - 0x54, - 0xb3, - 0x20, - 0xe1, - 0x01, - 0x7f, - 0x58, - 0xdf, - 0x7f, - 0xb5, - 0x21, - 0x51, - 0x8c, - 0x47, - 0x9f, - 0x91, - 0xeb, - 0x97, - 0x3e, - 0xf2, - 0x54, - 0xcf, - 0x16, - 0x46, - 0xf9, - 0xd9, - 0xb6, - 0xe7, - 0x64, - 0xc9, - 0xd0, - 0x54, - 0xea, - 0x2f, - 0xa1, - 0xcf, - 0xa5, - 0x7f, - 0x28, - 0x8d, - 0x84, - 0xec, - 0xd5, - 0x39, - 0x03, - 0x76, - 0x5b, - 0x2d, - 0x8e, - 0x43, - 0xf2, - 0x01, - 0x24, - 0xc9, - 0x6f, - 0xc0, - 0xf5, - 0x69, - 0x6f, - 0x7d, - 0xb5, - 0x85, - 0xd2, - 0x5f, - 0x7f, - 0x78, - 0x40, - 0x07, - 0x7f, - 0x09, - 0x15, - 0xb5, - 0x1f, - 0x28, - 0x65, - 0x10, - 0xe4, - 0x19, - 0xa8, - 0xc6, - 0x9e, - 0x8d, - 0xdc, - 0xcb, - 0x02, - 0x82, - 0x01, - 0x00, - 0x13, - 0x01, - 0xee, - 0x56, - 0x80, - 0x93, - 0x70, - 0x00, - 0x7f, - 0x52, - 0xd2, - 0x94, - 0xa1, - 0x98, - 0x84, - 0x4a, - 0x92, - 0x25, - 0x4c, - 0x9b, - 0xa9, - 0x91, - 0x2e, - 0xc2, - 0x79, - 0xb7, - 0x5c, - 0xe3, - 0xc5, - 0xd5, - 0x8e, - 0xc2, - 0x54, - 0x16, - 0x17, - 0xad, - 0x55, - 0x9b, - 0x25, - 0x76, - 0x12, - 0x63, - 0x50, - 0x22, - 0x2f, - 0x58, - 0x58, - 0x79, - 0x6b, - 0x04, - 0xe3, - 0xf9, - 0x9f, - 0x8f, - 0x04, - 0x41, - 0x67, - 0x94, - 0xa5, - 0x1f, - 0xac, - 0x8a, - 0x15, - 0x9c, - 0x26, - 0x10, - 0x6c, - 0xf8, - 0x19, - 0x57, - 0x61, - 0xd7, - 0x3a, - 0x7d, - 0x31, - 0xb0, - 0x2d, - 0x38, - 0xbd, - 0x94, - 0x62, - 0xad, - 0xc4, - 0xfa, - 0x36, - 0x42, - 0x42, - 0xf0, - 0x24, - 0x67, - 0x65, - 0x9d, - 0x8b, - 0x0b, - 0x7c, - 0x6f, - 0x82, - 0x44, - 0x1a, - 0x8c, - 0xc8, - 0xc9, - 0xab, - 0xbb, - 0x4c, - 0x45, - 0xfc, - 0x7b, - 0x38, - 0xee, - 0x30, - 0xe1, - 0xfc, - 0xef, - 0x8d, - 0xbc, - 0x58, - 0xdf, - 0x2b, - 0x5d, - 0x0d, - 0x54, - 0xe0, - 0x49, - 0x4d, - 0x97, - 0x99, - 0x8f, - 0x22, - 0xa8, - 0x83, - 0xbe, - 0x40, - 0xbb, - 0x50, - 0x2e, - 0x78, - 0x28, - 0x0f, - 0x95, - 0x78, - 0x8c, - 0x8f, - 0x98, - 0x24, - 0x56, - 0xc2, - 0x97, - 0xf3, - 0x2c, - 0x43, - 0xd2, - 0x03, - 0x82, - 0x66, - 0x81, - 0x72, - 0x5f, - 0x53, - 0x16, - 0xec, - 0xb1, - 0xb1, - 0x04, - 0x5e, - 0x40, - 0x20, - 0x48, - 0x7b, - 0x3f, - 0x02, - 0x97, - 0x6a, - 0xeb, - 0x96, - 0x12, - 0x21, - 0x35, - 0xfe, - 0x1f, - 0x47, - 0xc0, - 0x95, - 0xea, - 0xc5, - 0x8a, - 0x08, - 0x84, - 0x4f, - 0x5e, - 0x63, - 0x94, - 0x60, - 0x0f, - 0x71, - 0x5b, - 0x7f, - 0x4a, - 0xec, - 0x4f, - 0x60, - 0xc6, - 0xba, - 0x4a, - 0x24, - 0xf1, - 0x20, - 0x8b, - 0xa7, - 0x2e, - 0x3a, - 0xce, - 0x8d, - 0xe0, - 0x27, - 0x1d, - 0xb5, - 0x8e, - 0xb4, - 0x21, - 0xc5, - 0xe2, - 0xa6, - 0x16, - 0x0a, - 0x51, - 0x83, - 0x55, - 0x88, - 0xd1, - 0x30, - 0x11, - 0x63, - 0xd5, - 0xd7, - 0x8d, - 0xae, - 0x16, - 0x12, - 0x82, - 0xc4, - 0x85, - 0x00, - 0x4e, - 0x27, - 0x83, - 0xa5, - 0x7c, - 0x90, - 0x2e, - 0xe5, - 0xa2, - 0xa3, - 0xd3, - 0x4c, - 0x63, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0x86, - 0x08, - 0x98, - 0x98, - 0xa5, - 0x00, - 0x05, - 0x39, - 0x77, - 0xd9, - 0x66, - 0xb3, - 0xcf, - 0xca, - 0xa0, - 0x71, - 0xb3, - 0x50, - 0xce, - 0x3d, - 0xb1, - 0x93, - 0x95, - 0x35, - 0xc4, - 0xd4, - 0x2e, - 0x90, - 0xdf, - 0x0f, - 0xfc, - 0x60, - 0xc1, - 0x94, - 0x68, - 0x61, - 0x43, - 0xca, - 0x9a, - 0x23, - 0x4a, - 0x1e, - 0x45, - 0x72, - 0x99, - 0xb5, - 0x1e, - 0x61, - 0x8d, - 0x77, - 0x0f, - 0xa0, - 0xbb, - 0xd7, - 0x77, - 0xb4, - 0x2a, - 0x15, - 0x11, - 0x88, - 0x2d, - 0xb3, - 0x56, - 0x61, - 0x5e, - 0x6a, - 0xed, - 0xa4, - 0x46, - 0x4a, - 0x3f, - 0x50, - 0x11, - 0xd6, - 0xba, - 0xb6, - 0xd7, - 0x95, - 0x65, - 0x53, - 0xc3, - 0xa1, - 0x8f, - 0xe0, - 0xa3, - 0xf5, - 0x1c, - 0xfd, - 0xaf, - 0x6e, - 0x43, - 0xd7, - 0x17, - 0xa7, - 0xd3, - 0x81, - 0x1b, - 0xa4, - 0xdf, - 0xe0, - 0x97, - 0x8a, - 0x46, - 0x03, - 0xd3, - 0x46, - 0x0e, - 0x83, - 0x48, - 0x4e, - 0xd2, - 0x02, - 0xcb, - 0xc0, - 0xad, - 0x79, - 0x95, - 0x8c, - 0x96, - 0xba, - 0x40, - 0x34, - 0x11, - 0x71, - 0x5e, - 0xe9, - 0x11, - 0xf9, - 0xc5, - 0x4a, - 0x5e, - 0x91, - 0x9d, - 0xf5, - 0x92, - 0x4f, - 0xeb, - 0xc6, - 0x70, - 0x02, - 0x2d, - 0x3d, - 0x04, - 0xaa, - 0xe9, - 0x3a, - 0x8e, - 0xd5, - 0xa8, - 0xad, - 0xf7, - 0xce, - 0x0d, - 0x16, - 0xb2, - 0xec, - 0x0a, - 0x9c, - 0xf5, - 0x94, - 0x39, - 0xb9, - 0x8a, - 0xfc, - 0x1e, - 0xf9, - 0xcc, - 0xf2, - 0x5f, - 0x21, - 0x31, - 0x74, - 0x72, - 0x6b, - 0x64, - 0xae, - 0x35, - 0x61, - 0x8d, - 0x0d, - 0xcb, - 0xe7, - 0xda, - 0x39, - 0xca, - 0xf3, - 0x21, - 0x66, - 0x0b, - 0x95, - 0xd7, - 0x0a, - 0x7c, - 0xca, - 0xa1, - 0xa9, - 0x5a, - 0xe8, - 0xac, - 0xe0, - 0x71, - 0x54, - 0xaf, - 0x28, - 0xcf, - 0xd5, - 0x70, - 0x89, - 0xe0, - 0xf3, - 0x9e, - 0x43, - 0x6c, - 0x8d, - 0x7b, - 0x99, - 0x01, - 0x68, - 0x4d, - 0xa1, - 0x45, - 0x46, - 0x0c, - 0x43, - 0xbc, - 0xcc, - 0x2c, - 0xdd, - 0xc5, - 0x46, - 0xc8, - 0x4e, - 0x0e, - 0xbe, - 0xed, - 0xb9, - 0x26, - 0xab, - 0x2e, - 0xdb, - 0xeb, - 0x8f, - 0xff, - 0xdb, - 0xb0, - 0xc6, - 0x55, - 0xaf, - 0xf8, - 0x2a, - 0x91, - 0x9d, - 0x50, - 0x44, - 0x21, - 0x17, + 0x30, 0x82, 0x09, 0x29, 0x02, 0x01, 0x00, 0x02, 0x82, 0x02, + 0x01, 0x00, 0xc0, 0x71, 0xac, 0x1a, 0x13, 0x88, 0x82, 0x43, + 0x3b, 0x51, 0x57, 0x71, 0x8d, 0xb6, 0x2b, 0x82, 0x65, 0x21, + 0x53, 0x5f, 0x28, 0x29, 0x4f, 0x8d, 0x7c, 0x8a, 0xb9, 0x44, + 0xb3, 0x28, 0x41, 0x4f, 0xd3, 0xfa, 0x6a, 0xf8, 0xb9, 0x28, + 0x50, 0x39, 0x67, 0x53, 0x2c, 0x3c, 0xd7, 0xcb, 0x96, 0x41, + 0x40, 0x32, 0xbb, 0xeb, 0x70, 0xae, 0x1f, 0xb0, 0x65, 0xf7, + 0x3a, 0xd9, 0x22, 0xfd, 0x10, 0xae, 0xbd, 0x02, 0xe2, 0xdd, + 0xf3, 0xc2, 0x79, 0x3c, 0xc6, 0xfc, 0x75, 0xbb, 0xaf, 0x4e, + 0x3a, 0x36, 0xc2, 0x4f, 0xea, 0x25, 0xdf, 0x13, 0x16, 0x4b, + 0x20, 0xfe, 0x4b, 0x69, 0x16, 0xc4, 0x7f, 0x1a, 0x43, 0xa6, + 0x17, 0x1b, 0xb9, 0x0a, 0xf3, 0x09, 0x86, 0x28, 0x89, 0xcf, + 0x2c, 0xd0, 0xd4, 0x81, 0xaf, 0xc6, 0x6d, 0xe6, 0x21, 0x8d, + 0xee, 0xef, 0xea, 0xdc, 0xb7, 0xc6, 0x3b, 0x63, 0x9f, 0x0e, + 0xad, 0x89, 0x78, 0x23, 0x18, 0xbf, 0x70, 0x7e, 0x84, 0xe0, + 0x37, 0xec, 0xdb, 0x8e, 0x9c, 0x3e, 0x6a, 0x19, 0xcc, 0x99, + 0x72, 0xe6, 0xb5, 0x7d, 0x6d, 0xfa, 0xe5, 0xd3, 0xe4, 0x90, + 0xb5, 0xb2, 0xb2, 0x12, 0x70, 0x4e, 0xca, 0xf8, 0x10, 0xf8, + 0xa3, 0x14, 0xc2, 0x48, 0x19, 0xeb, 0x60, 0x99, 0xbb, 0x2a, + 0x1f, 0xb1, 0x7a, 0xb1, 0x3d, 0x24, 0xfb, 0xa0, 0x29, 0xda, + 0xbd, 0x1b, 0xd7, 0xa4, 0xbf, 0xef, 0x60, 0x2d, 0x22, 0xca, + 0x65, 0x98, 0xf1, 0xc4, 0xe1, 0xc9, 0x02, 0x6b, 0x16, 0x28, + 0x2f, 0xa1, 0xaa, 0x79, 0x00, 0xda, 0xdc, 0x7c, 0x43, 0xf7, + 0x42, 0x3c, 0xa0, 0xef, 0x68, 0xf7, 0xdf, 0xb9, 0x69, 0xfb, + 0x8e, 0x01, 0xed, 0x01, 0x42, 0xb5, 0x4e, 0x57, 0xa6, 0x26, + 0xb8, 0xd0, 0x7b, 0x56, 0x6d, 0x03, 0xc6, 0x40, 0x8c, 0x8c, + 0x2a, 0x55, 0xd7, 0x9c, 0x35, 0x00, 0x94, 0x93, 0xec, 0x03, + 0xeb, 0x22, 0xef, 0x77, 0xbb, 0x79, 0x13, 0x3f, 0x15, 0xa1, + 0x8f, 0xca, 0xdf, 0xfd, 0xd3, 0xb8, 0xe1, 0xd4, 0xcc, 0x09, + 0x3f, 0x3c, 0x2c, 0xdb, 0xd1, 0x49, 0x7f, 0x38, 0x07, 0x83, + 0x6d, 0xeb, 0x08, 0x66, 0xe9, 0x06, 0x44, 0x12, 0xac, 0x95, + 0x22, 0x90, 0x23, 0x67, 0xd4, 0x08, 0xcc, 0xf4, 0xb7, 0xdc, + 0xcc, 0x87, 0xd4, 0xac, 0x69, 0x35, 0x4c, 0xb5, 0x39, 0x36, + 0xcd, 0xa4, 0xd2, 0x95, 0xca, 0x0d, 0xc5, 0xda, 0xc2, 0xc5, + 0x22, 0x32, 0x28, 0x08, 0xe3, 0xd2, 0x8b, 0x38, 0x30, 0xdc, + 0x8c, 0x75, 0x4f, 0x6a, 0xec, 0x7a, 0xac, 0x16, 0x3e, 0xa8, + 0xd4, 0x6a, 0x45, 0xe1, 0xa8, 0x4f, 0x2e, 0x80, 0x34, 0xaa, + 0x54, 0x1b, 0x02, 0x95, 0x7d, 0x8a, 0x6d, 0xcc, 0x79, 0xca, + 0xf2, 0xa4, 0x2e, 0x8d, 0xfb, 0xfe, 0x15, 0x51, 0x10, 0x0e, + 0x4d, 0x88, 0xb1, 0xc7, 0xf4, 0x79, 0xdb, 0xf0, 0xb4, 0x56, + 0x44, 0x37, 0xca, 0x5a, 0xc1, 0x8c, 0x48, 0xac, 0xae, 0x48, + 0x80, 0x83, 0x01, 0x3f, 0xde, 0xd9, 0xd3, 0x2c, 0x51, 0x46, + 0xb1, 0x41, 0xb6, 0xc6, 0x91, 0x72, 0xf9, 0x83, 0x55, 0x1b, + 0x8c, 0xba, 0xf3, 0x73, 0xe5, 0x2c, 0x74, 0x50, 0x3a, 0xbe, + 0xc5, 0x2f, 0xa7, 0xb2, 0x6d, 0x8c, 0x9e, 0x13, 0x77, 0xa3, + 0x13, 0xcd, 0x6d, 0x8c, 0x45, 0xe1, 0xfc, 0x0b, 0xb7, 0x69, + 0xe9, 0x27, 0xbc, 0x65, 0xc3, 0xfa, 0x9b, 0xd0, 0xef, 0xfe, + 0xe8, 0x1f, 0xb3, 0x5e, 0x34, 0xf4, 0x8c, 0xea, 0xfc, 0xd3, + 0x81, 0xbf, 0x3d, 0x30, 0xb2, 0xb4, 0x01, 0xe8, 0x43, 0x0f, + 0xba, 0x02, 0x23, 0x42, 0x76, 0x82, 0x31, 0x73, 0x91, 0xed, + 0x07, 0x46, 0x61, 0x0d, 0x39, 0x83, 0x40, 0xce, 0x7a, 0xd4, + 0xdb, 0x80, 0x2c, 0x1f, 0x0d, 0xd1, 0x34, 0xd4, 0x92, 0xe3, + 0xd4, 0xf1, 0xc2, 0x01, 0x02, 0x03, 0x01, 0x00, 0x01, 0x02, + 0x82, 0x02, 0x01, 0x00, 0x97, 0x6c, 0xda, 0x6e, 0xea, 0x4f, + 0xcf, 0xaf, 0xf7, 0x4c, 0xd9, 0xf1, 0x90, 0x00, 0x77, 0xdb, + 0xf2, 0x97, 0x76, 0x72, 0xb9, 0xb7, 0x47, 0xd1, 0x9c, 0xdd, + 0xcb, 0x4a, 0x33, 0x6e, 0xc9, 0x75, 0x76, 0xe6, 0xe4, 0xa5, + 0x31, 0x8c, 0x77, 0x13, 0xb4, 0x29, 0xcd, 0xf5, 0x52, 0x17, + 0xef, 0xf3, 0x08, 0x00, 0xe3, 0xbd, 0x2e, 0xbc, 0xd4, 0x52, + 0x88, 0xe9, 0x30, 0x75, 0x0b, 0x02, 0xf5, 0xcd, 0x89, 0x0c, + 0x6c, 0x57, 0x19, 0x27, 0x3d, 0x1e, 0x85, 0xb4, 0xc1, 0x2f, + 0x1d, 0x92, 0x00, 0x5c, 0x76, 0x29, 0x4b, 0xa4, 0xe1, 0x12, + 0xb3, 0xc8, 0x09, 0xfe, 0x0e, 0x78, 0x72, 0x61, 0xcb, 0x61, + 0x6f, 0x39, 0x91, 0x95, 0x4e, 0xd5, 0x3e, 0xc7, 0x8f, 0xb8, + 0xf6, 0x36, 0xfe, 0x9c, 0x93, 0x9a, 0x38, 0x25, 0x7a, 0xf4, + 0x4a, 0x12, 0xd4, 0xa0, 0x13, 0xbd, 0xf9, 0x1d, 0x12, 0x3e, + 0x21, 0x39, 0xfb, 0x72, 0xe0, 0x05, 0x3d, 0xc3, 0xe5, 0x50, + 0xa8, 0x5d, 0x85, 0xa3, 0xea, 0x5f, 0x1c, 0xb2, 0x3f, 0xea, + 0x6d, 0x03, 0x91, 0x55, 0xd8, 0x19, 0x0a, 0x21, 0x12, 0x16, + 0xd9, 0x12, 0xc4, 0xe6, 0x07, 0x18, 0x5b, 0x26, 0xa4, 0xae, + 0xed, 0x2b, 0xb7, 0xa6, 0xed, 0xf8, 0xad, 0xec, 0x77, 0xe6, + 0x7f, 0x4f, 0x76, 0x00, 0xc0, 0xfa, 0x15, 0x92, 0xb4, 0x2c, + 0x22, 0xc2, 0xeb, 0x6a, 0xad, 0x14, 0x05, 0xb2, 0xe5, 0x8a, + 0x9e, 0x85, 0x83, 0xcc, 0x04, 0xf1, 0x56, 0x78, 0x44, 0x5e, + 0xde, 0xe0, 0x60, 0x1a, 0x65, 0x79, 0x31, 0x23, 0x05, 0xbb, + 0x01, 0xff, 0xdd, 0x2e, 0xb7, 0xb3, 0xaa, 0x74, 0xe0, 0xa5, + 0x94, 0xaf, 0x4b, 0xde, 0x58, 0x0f, 0x55, 0xde, 0x33, 0xf6, + 0xe3, 0xd6, 0x34, 0x36, 0x57, 0xd6, 0x79, 0x91, 0x2e, 0xbe, + 0x3b, 0xd9, 0x4e, 0xb6, 0x9d, 0x21, 0x5c, 0xd3, 0x48, 0x14, + 0x7f, 0x4a, 0xc4, 0x60, 0xa9, 0x29, 0xf8, 0x53, 0x7f, 0x88, + 0x11, 0x2d, 0xb5, 0xc5, 0x2d, 0x6f, 0xee, 0x85, 0x0b, 0xf7, + 0x8d, 0x9a, 0xbe, 0xb0, 0x42, 0xf2, 0x2e, 0x71, 0xaf, 0x19, + 0x31, 0x6d, 0xec, 0xcd, 0x6f, 0x2b, 0x23, 0xdf, 0xb4, 0x40, + 0xaf, 0x2c, 0x0a, 0xc3, 0x1b, 0x7d, 0x7d, 0x03, 0x1d, 0x4b, + 0xf3, 0xb5, 0xe0, 0x85, 0xd8, 0xdf, 0x91, 0x6b, 0x0a, 0x69, + 0xf7, 0xf2, 0x69, 0x66, 0x5b, 0xf1, 0xcf, 0x46, 0x7d, 0xe9, + 0x70, 0xfa, 0x6d, 0x7e, 0x75, 0x4e, 0xa9, 0x77, 0xe6, 0x8c, + 0x02, 0xf7, 0x14, 0x4d, 0xa5, 0x41, 0x8f, 0x3f, 0xc1, 0x62, + 0x1e, 0x71, 0x5e, 0x38, 0xb4, 0xd6, 0xe6, 0xe1, 0x4b, 0xc2, + 0x2c, 0x30, 0x83, 0x81, 0x6f, 0x49, 0x2e, 0x96, 0xe6, 0xc9, + 0x9a, 0xf7, 0x5d, 0x09, 0xa0, 0x55, 0x02, 0xa5, 0x3a, 0x25, + 0x23, 0xd0, 0x92, 0xc3, 0xa3, 0xe3, 0x0e, 0x12, 0x2f, 0x4d, + 0xef, 0xf3, 0x55, 0x5a, 0xbe, 0xe6, 0x19, 0x86, 0x31, 0xab, + 0x75, 0x9a, 0xd3, 0xf0, 0x2c, 0xc5, 0x41, 0x92, 0xd9, 0x1f, + 0x5f, 0x11, 0x8c, 0x75, 0x1c, 0x63, 0xd0, 0x02, 0x80, 0x2c, + 0x68, 0xcb, 0x93, 0xfb, 0x51, 0x73, 0x49, 0xb4, 0x60, 0xda, + 0xe2, 0x26, 0xaf, 0xa9, 0x46, 0x12, 0xb8, 0xec, 0x50, 0xdd, + 0x12, 0x06, 0x5f, 0xce, 0x59, 0xe6, 0xf6, 0x1c, 0xe0, 0x54, + 0x10, 0xad, 0xf6, 0xcd, 0x98, 0xcc, 0x0f, 0xfb, 0xcb, 0x41, + 0x14, 0x9d, 0xed, 0xe4, 0xb4, 0x74, 0x5f, 0x09, 0x60, 0xc7, + 0x12, 0xf6, 0x7b, 0x3c, 0x8f, 0xa7, 0x20, 0xbc, 0xe4, 0xb1, + 0xef, 0xeb, 0xa4, 0x93, 0xc5, 0x06, 0xca, 0x9a, 0x27, 0x9d, + 0x87, 0xf3, 0xde, 0xca, 0xe5, 0xe7, 0xf6, 0x1c, 0x01, 0x65, + 0x5b, 0xfb, 0x19, 0x79, 0x6e, 0x08, 0x26, 0xc5, 0xc8, 0x28, + 0x0e, 0xb6, 0x3b, 0x07, 0x08, 0xc1, 0x02, 0x82, 0x01, 0x01, + 0x00, 0xe8, 0x1c, 0x73, 0xa6, 0xb8, 0xe0, 0x0e, 0x6d, 0x8d, + 0x1b, 0xb9, 0x53, 0xed, 0x58, 0x94, 0xe6, 0x1d, 0x60, 0x14, + 0x5c, 0x76, 0x43, 0xc4, 0x58, 0x19, 0xc4, 0x24, 0xe8, 0xbc, + 0x1b, 0x3b, 0x0b, 0x13, 0x24, 0x45, 0x54, 0x0e, 0xcc, 0x37, + 0xf0, 0xe0, 0x63, 0x7d, 0xc3, 0xf7, 0xfb, 0x81, 0x74, 0x81, + 0xc4, 0x0f, 0x1a, 0x21, 0x48, 0xaf, 0xce, 0xc1, 0xc4, 0x94, + 0x18, 0x06, 0x44, 0x8d, 0xd3, 0xd2, 0x22, 0x2d, 0x2d, 0x3e, + 0x5a, 0x31, 0xdc, 0x95, 0x8e, 0xf4, 0x41, 0xfc, 0x58, 0xc9, + 0x40, 0x92, 0x17, 0x5f, 0xe3, 0xda, 0xac, 0x9e, 0x3f, 0x1c, + 0x2a, 0x6b, 0x58, 0x5f, 0x48, 0x78, 0x20, 0xb1, 0xaf, 0x24, + 0x9b, 0x3c, 0x20, 0x8b, 0x93, 0x25, 0x9e, 0xe6, 0x6b, 0xbc, + 0x13, 0x42, 0x14, 0x6c, 0x36, 0x31, 0xff, 0x7a, 0xd1, 0xc1, + 0x1a, 0x26, 0x14, 0x7f, 0xa9, 0x76, 0xa7, 0x0c, 0xf8, 0xcc, + 0xed, 0x07, 0x6a, 0xd2, 0xdf, 0x62, 0xee, 0x0a, 0x7c, 0x84, + 0xcb, 0x49, 0x90, 0xb2, 0x03, 0x0d, 0xa2, 0x82, 0x06, 0x77, + 0xf1, 0xcd, 0x67, 0xf2, 0x47, 0x21, 0x02, 0x3f, 0x43, 0x21, + 0xf0, 0x46, 0x30, 0x62, 0x51, 0x72, 0xb1, 0xe7, 0x48, 0xc6, + 0x67, 0x12, 0xcd, 0x9e, 0xd6, 0x15, 0xe5, 0x21, 0xed, 0xfa, + 0x8f, 0x30, 0xa6, 0x41, 0xfe, 0xb6, 0xfa, 0x8f, 0x34, 0x14, + 0x19, 0xe8, 0x11, 0xf7, 0xa5, 0x77, 0x3e, 0xb7, 0xf9, 0x39, + 0x07, 0x8c, 0x67, 0x2a, 0xab, 0x7b, 0x08, 0xf8, 0xb0, 0x06, + 0xa8, 0xea, 0x2f, 0x8f, 0xfa, 0xcc, 0xcc, 0x40, 0xce, 0xf3, + 0x70, 0x4f, 0x3f, 0x7f, 0xe2, 0x0c, 0xea, 0x76, 0x4a, 0x35, + 0x4e, 0x47, 0xad, 0x2b, 0xa7, 0x97, 0x5d, 0x74, 0x43, 0x97, + 0x90, 0xd2, 0xfb, 0xd9, 0xf9, 0x96, 0x01, 0x33, 0x05, 0xed, + 0x7b, 0x03, 0x05, 0xad, 0xf8, 0x49, 0x03, 0x02, 0x82, 0x01, + 0x01, 0x00, 0xd4, 0x40, 0x17, 0x66, 0x10, 0x92, 0x95, 0xc8, + 0xec, 0x62, 0xa9, 0x7a, 0xcb, 0x93, 0x8e, 0xe6, 0x53, 0xd4, + 0x80, 0x48, 0x27, 0x4b, 0x41, 0xce, 0x61, 0xdf, 0xbf, 0x94, + 0xa4, 0x3d, 0x71, 0x03, 0x0b, 0xed, 0x25, 0x71, 0x98, 0xa4, + 0xd6, 0xd5, 0x4a, 0x57, 0xf5, 0x6c, 0x1b, 0xda, 0x21, 0x7d, + 0x35, 0x45, 0xb3, 0xf3, 0x6a, 0xd9, 0xd3, 0x43, 0xe8, 0x5c, + 0x54, 0x1c, 0x83, 0x1b, 0xb4, 0x5f, 0xf2, 0x97, 0x24, 0x2e, + 0xdc, 0x40, 0xde, 0x92, 0x23, 0x59, 0x8e, 0xbc, 0xd2, 0xa1, + 0xf2, 0xe0, 0x4c, 0xdd, 0x0b, 0xd1, 0xe7, 0xae, 0x65, 0xbc, + 0xb5, 0xf5, 0x5b, 0x98, 0xe9, 0xd7, 0xc2, 0xb7, 0x0e, 0x55, + 0x71, 0x0e, 0x3c, 0x0a, 0x24, 0x6b, 0xa6, 0xe6, 0x14, 0x61, + 0x11, 0xfd, 0x33, 0x42, 0x99, 0x2b, 0x84, 0x77, 0x74, 0x92, + 0x91, 0xf5, 0x79, 0x79, 0xcf, 0xad, 0x8e, 0x04, 0xef, 0x80, + 0x1e, 0x57, 0xf4, 0x14, 0xf5, 0x35, 0x09, 0x74, 0xb2, 0x13, + 0x71, 0x58, 0x6b, 0xea, 0x32, 0x5d, 0xf3, 0xd3, 0x76, 0x48, + 0x39, 0x10, 0x23, 0x84, 0x9d, 0xbe, 0x92, 0x77, 0x4a, 0xed, + 0x70, 0x3e, 0x1a, 0xa2, 0x6c, 0xb3, 0x81, 0x00, 0xc3, 0xc9, + 0xe4, 0x52, 0xc8, 0x24, 0x88, 0x0c, 0x41, 0xad, 0x87, 0x5a, + 0xea, 0xa3, 0x7a, 0x85, 0x1c, 0x5e, 0x31, 0x7f, 0xc3, 0x35, + 0xc6, 0xfa, 0x10, 0xc8, 0x75, 0x10, 0xc4, 0x96, 0x99, 0xe7, + 0xfe, 0x01, 0xb4, 0x74, 0xdb, 0xb4, 0x11, 0xc3, 0xc8, 0x8c, + 0xf6, 0xf7, 0x3b, 0x66, 0x50, 0xfc, 0xdb, 0xeb, 0xca, 0x47, + 0x85, 0x89, 0xe1, 0x65, 0xd9, 0x62, 0x34, 0x3c, 0x70, 0xd8, + 0x2e, 0xb4, 0x2f, 0x65, 0x3c, 0x4a, 0xa6, 0x2a, 0xe7, 0xc7, + 0xd8, 0x41, 0x8f, 0x8a, 0x43, 0xbf, 0x42, 0xf2, 0x4d, 0xbc, + 0xfc, 0x9e, 0x27, 0x95, 0xfb, 0x75, 0xff, 0xab, 0x02, 0x82, + 0x01, 0x00, 0x41, 0x2f, 0x44, 0x57, 0x6d, 0x12, 0x17, 0x5b, + 0x32, 0xc6, 0xb7, 0x6c, 0x57, 0x7a, 0x8a, 0x0e, 0x79, 0xef, + 0x72, 0xa8, 0x68, 0xda, 0x2d, 0x38, 0xe4, 0xbb, 0x8d, 0xf6, + 0x02, 0x65, 0xcf, 0x56, 0x13, 0xe1, 0x1a, 0xcb, 0x39, 0x80, + 0xa6, 0xb1, 0x32, 0x03, 0x1e, 0xdd, 0xbb, 0x35, 0xd9, 0xac, + 0x43, 0x89, 0x31, 0x08, 0x90, 0x92, 0x5e, 0x35, 0x3d, 0x7b, + 0x9c, 0x6f, 0x86, 0xcb, 0x17, 0xdd, 0x85, 0xe4, 0xed, 0x35, + 0x08, 0x8e, 0xc1, 0xf4, 0x05, 0xd8, 0x68, 0xc6, 0x63, 0x3c, + 0xf7, 0xff, 0xf7, 0x47, 0x33, 0x39, 0xc5, 0x3e, 0xb7, 0x0e, + 0x58, 0x35, 0x9d, 0x81, 0xea, 0xf8, 0x6a, 0x2c, 0x1c, 0x5a, + 0x68, 0x78, 0x64, 0x11, 0x6b, 0xc1, 0x3e, 0x4e, 0x7a, 0xbd, + 0x84, 0xcb, 0x0f, 0xc2, 0xb6, 0x85, 0x1d, 0xd3, 0x76, 0xc5, + 0x93, 0x6a, 0x69, 0x89, 0x56, 0x34, 0xdc, 0x4a, 0x9b, 0xbc, + 0xff, 0xa8, 0x0d, 0x6e, 0x35, 0x9c, 0x60, 0xa7, 0x23, 0x30, + 0xc7, 0x06, 0x64, 0x39, 0x8b, 0x94, 0x89, 0xee, 0xba, 0x7f, + 0x60, 0x8d, 0xfa, 0xb6, 0x97, 0x76, 0xdc, 0x51, 0x4a, 0x3c, + 0xeb, 0x3a, 0x14, 0x2c, 0x20, 0x60, 0x69, 0x4a, 0x86, 0xfe, + 0x8c, 0x21, 0x84, 0x49, 0x54, 0xb3, 0x20, 0xe1, 0x01, 0x7f, + 0x58, 0xdf, 0x7f, 0xb5, 0x21, 0x51, 0x8c, 0x47, 0x9f, 0x91, + 0xeb, 0x97, 0x3e, 0xf2, 0x54, 0xcf, 0x16, 0x46, 0xf9, 0xd9, + 0xb6, 0xe7, 0x64, 0xc9, 0xd0, 0x54, 0xea, 0x2f, 0xa1, 0xcf, + 0xa5, 0x7f, 0x28, 0x8d, 0x84, 0xec, 0xd5, 0x39, 0x03, 0x76, + 0x5b, 0x2d, 0x8e, 0x43, 0xf2, 0x01, 0x24, 0xc9, 0x6f, 0xc0, + 0xf5, 0x69, 0x6f, 0x7d, 0xb5, 0x85, 0xd2, 0x5f, 0x7f, 0x78, + 0x40, 0x07, 0x7f, 0x09, 0x15, 0xb5, 0x1f, 0x28, 0x65, 0x10, + 0xe4, 0x19, 0xa8, 0xc6, 0x9e, 0x8d, 0xdc, 0xcb, 0x02, 0x82, + 0x01, 0x00, 0x13, 0x01, 0xee, 0x56, 0x80, 0x93, 0x70, 0x00, + 0x7f, 0x52, 0xd2, 0x94, 0xa1, 0x98, 0x84, 0x4a, 0x92, 0x25, + 0x4c, 0x9b, 0xa9, 0x91, 0x2e, 0xc2, 0x79, 0xb7, 0x5c, 0xe3, + 0xc5, 0xd5, 0x8e, 0xc2, 0x54, 0x16, 0x17, 0xad, 0x55, 0x9b, + 0x25, 0x76, 0x12, 0x63, 0x50, 0x22, 0x2f, 0x58, 0x58, 0x79, + 0x6b, 0x04, 0xe3, 0xf9, 0x9f, 0x8f, 0x04, 0x41, 0x67, 0x94, + 0xa5, 0x1f, 0xac, 0x8a, 0x15, 0x9c, 0x26, 0x10, 0x6c, 0xf8, + 0x19, 0x57, 0x61, 0xd7, 0x3a, 0x7d, 0x31, 0xb0, 0x2d, 0x38, + 0xbd, 0x94, 0x62, 0xad, 0xc4, 0xfa, 0x36, 0x42, 0x42, 0xf0, + 0x24, 0x67, 0x65, 0x9d, 0x8b, 0x0b, 0x7c, 0x6f, 0x82, 0x44, + 0x1a, 0x8c, 0xc8, 0xc9, 0xab, 0xbb, 0x4c, 0x45, 0xfc, 0x7b, + 0x38, 0xee, 0x30, 0xe1, 0xfc, 0xef, 0x8d, 0xbc, 0x58, 0xdf, + 0x2b, 0x5d, 0x0d, 0x54, 0xe0, 0x49, 0x4d, 0x97, 0x99, 0x8f, + 0x22, 0xa8, 0x83, 0xbe, 0x40, 0xbb, 0x50, 0x2e, 0x78, 0x28, + 0x0f, 0x95, 0x78, 0x8c, 0x8f, 0x98, 0x24, 0x56, 0xc2, 0x97, + 0xf3, 0x2c, 0x43, 0xd2, 0x03, 0x82, 0x66, 0x81, 0x72, 0x5f, + 0x53, 0x16, 0xec, 0xb1, 0xb1, 0x04, 0x5e, 0x40, 0x20, 0x48, + 0x7b, 0x3f, 0x02, 0x97, 0x6a, 0xeb, 0x96, 0x12, 0x21, 0x35, + 0xfe, 0x1f, 0x47, 0xc0, 0x95, 0xea, 0xc5, 0x8a, 0x08, 0x84, + 0x4f, 0x5e, 0x63, 0x94, 0x60, 0x0f, 0x71, 0x5b, 0x7f, 0x4a, + 0xec, 0x4f, 0x60, 0xc6, 0xba, 0x4a, 0x24, 0xf1, 0x20, 0x8b, + 0xa7, 0x2e, 0x3a, 0xce, 0x8d, 0xe0, 0x27, 0x1d, 0xb5, 0x8e, + 0xb4, 0x21, 0xc5, 0xe2, 0xa6, 0x16, 0x0a, 0x51, 0x83, 0x55, + 0x88, 0xd1, 0x30, 0x11, 0x63, 0xd5, 0xd7, 0x8d, 0xae, 0x16, + 0x12, 0x82, 0xc4, 0x85, 0x00, 0x4e, 0x27, 0x83, 0xa5, 0x7c, + 0x90, 0x2e, 0xe5, 0xa2, 0xa3, 0xd3, 0x4c, 0x63, 0x02, 0x82, + 0x01, 0x01, 0x00, 0x86, 0x08, 0x98, 0x98, 0xa5, 0x00, 0x05, + 0x39, 0x77, 0xd9, 0x66, 0xb3, 0xcf, 0xca, 0xa0, 0x71, 0xb3, + 0x50, 0xce, 0x3d, 0xb1, 0x93, 0x95, 0x35, 0xc4, 0xd4, 0x2e, + 0x90, 0xdf, 0x0f, 0xfc, 0x60, 0xc1, 0x94, 0x68, 0x61, 0x43, + 0xca, 0x9a, 0x23, 0x4a, 0x1e, 0x45, 0x72, 0x99, 0xb5, 0x1e, + 0x61, 0x8d, 0x77, 0x0f, 0xa0, 0xbb, 0xd7, 0x77, 0xb4, 0x2a, + 0x15, 0x11, 0x88, 0x2d, 0xb3, 0x56, 0x61, 0x5e, 0x6a, 0xed, + 0xa4, 0x46, 0x4a, 0x3f, 0x50, 0x11, 0xd6, 0xba, 0xb6, 0xd7, + 0x95, 0x65, 0x53, 0xc3, 0xa1, 0x8f, 0xe0, 0xa3, 0xf5, 0x1c, + 0xfd, 0xaf, 0x6e, 0x43, 0xd7, 0x17, 0xa7, 0xd3, 0x81, 0x1b, + 0xa4, 0xdf, 0xe0, 0x97, 0x8a, 0x46, 0x03, 0xd3, 0x46, 0x0e, + 0x83, 0x48, 0x4e, 0xd2, 0x02, 0xcb, 0xc0, 0xad, 0x79, 0x95, + 0x8c, 0x96, 0xba, 0x40, 0x34, 0x11, 0x71, 0x5e, 0xe9, 0x11, + 0xf9, 0xc5, 0x4a, 0x5e, 0x91, 0x9d, 0xf5, 0x92, 0x4f, 0xeb, + 0xc6, 0x70, 0x02, 0x2d, 0x3d, 0x04, 0xaa, 0xe9, 0x3a, 0x8e, + 0xd5, 0xa8, 0xad, 0xf7, 0xce, 0x0d, 0x16, 0xb2, 0xec, 0x0a, + 0x9c, 0xf5, 0x94, 0x39, 0xb9, 0x8a, 0xfc, 0x1e, 0xf9, 0xcc, + 0xf2, 0x5f, 0x21, 0x31, 0x74, 0x72, 0x6b, 0x64, 0xae, 0x35, + 0x61, 0x8d, 0x0d, 0xcb, 0xe7, 0xda, 0x39, 0xca, 0xf3, 0x21, + 0x66, 0x0b, 0x95, 0xd7, 0x0a, 0x7c, 0xca, 0xa1, 0xa9, 0x5a, + 0xe8, 0xac, 0xe0, 0x71, 0x54, 0xaf, 0x28, 0xcf, 0xd5, 0x70, + 0x89, 0xe0, 0xf3, 0x9e, 0x43, 0x6c, 0x8d, 0x7b, 0x99, 0x01, + 0x68, 0x4d, 0xa1, 0x45, 0x46, 0x0c, 0x43, 0xbc, 0xcc, 0x2c, + 0xdd, 0xc5, 0x46, 0xc8, 0x4e, 0x0e, 0xbe, 0xed, 0xb9, 0x26, + 0xab, 0x2e, 0xdb, 0xeb, 0x8f, 0xff, 0xdb, 0xb0, 0xc6, 0x55, + 0xaf, 0xf8, 0x2a, 0x91, 0x9d, 0x50, 0x44, 0x21, 0x17 }; static unsigned char test7680[] = { diff --git a/crypto/openssl/crypto/aes/asm/aesfx-sparcv9.pl b/crypto/openssl/crypto/aes/asm/aesfx-sparcv9.pl index 27233d03af7b..372778e424e7 100755 --- a/crypto/openssl/crypto/aes/asm/aesfx-sparcv9.pl +++ b/crypto/openssl/crypto/aes/asm/aesfx-sparcv9.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2026 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -479,11 +479,16 @@ aes_fx_cbc_encrypt: ldd [$end + 24], %f12 movrz $len, 0, $inc + + brz,pn $len, .Lcbc_enc_skip_load + nop + fmovd $intail, $in0 ldd [$inp - 8], $in1 ! load next input block ldda [$inp]0x82, $intail ! non-faulting load add $inp, $inc, $inp ! inp+=16 +.Lcbc_enc_skip_load: fmovd %f0, %f4 faesencx %f2, %f6, %f0 faesencx %f4, %f8, %f2 @@ -694,11 +699,16 @@ aes_fx_cbc_encrypt: fmovd $in1, $iv1 movrz $len, 0, $inc + + brz,pn $len, .Lcbc_dec_skip_load + nop + fmovd $intail, $in0 ldd [$inp - 8], $in1 ! load next input block ldda [$inp]0x82, $intail ! non-faulting load add $inp, $inc, $inp ! inp+=16 +.Lcbc_dec_skip_load: fmovd %f0, %f4 faesdecx %f2, %f10, %f0 faesdecx %f4, %f12, %f2 @@ -953,11 +963,16 @@ aes_fx_ctr32_encrypt_blocks: fxor $in1, $rllo, %f8 movrz $len, 0, $inc + + brz,pn $len, .Lctr32_enc_skip_load + nop + fmovd $intail, $in0 ldd [$inp - 8], $in1 ! load next input block ldda [$inp]0x82, $intail ! non-faulting load add $inp, $inc, $inp ! inp+=16 +.Lctr32_enc_skip_load: fmovd %f0, %f4 faesencx %f2, %f10, %f0 faesencx %f4, %f12, %f2 diff --git a/crypto/openssl/crypto/asn1/a_d2i_fp.c b/crypto/openssl/crypto/asn1/a_d2i_fp.c index c7ab9c3bdaca..dcbb6d9a9eff 100644 --- a/crypto/openssl/crypto/asn1/a_d2i_fp.c +++ b/crypto/openssl/crypto/asn1/a_d2i_fp.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -104,7 +104,7 @@ void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x) } #endif -#define HEADER_SIZE 8 +#define HEADER_SIZE 2 #define ASN1_CHUNK_INITIAL_SIZE (16 * 1024) int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb) { @@ -138,7 +138,7 @@ int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb) goto err; } i = BIO_read(in, &(b->data[len]), want); - if (i < 0 && diff == 0) { + if (i <= 0) { ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA); goto err; } @@ -154,12 +154,65 @@ int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb) } /* else data already loaded */ + /* make sure there is enough data for a complete header */ p = (unsigned char *)&(b->data[off]); q = p; diff = len - off; - if (diff == 0) + if (diff < 2) { + /* Failed sanity check */ + ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA); goto err; - inf = ASN1_get_object(&q, &slen, &tag, &xclass, diff); + } + + diff--; + if ((*(q++) & V_ASN1_PRIMITIVE_TAG) == V_ASN1_PRIMITIVE_TAG) { + unsigned int n = 0; + /* Multi-byte tag. See if we have the whole thing yet */ + do { + if (n > 4) { + /* The tag value must fit into int */ + ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG); + goto err; + } + ++n; + diff--; + } while (diff > 0 && *(q++) & 0x80); + + if (diff == 0) { + /* + * End of current data, will need at least 1 more byte for + * length. 2 if the tag is still incomplete + */ + want = q - p + 2; + if (*q & 0x80) { + want++; + } + continue; + } + } + + /* Check the length. This should also work for indefinite length */ + diff--; + if (*q & 0x80) { + unsigned int n = *q & 0x7f; + + if (n > sizeof(long)) { + ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG); + goto err; + } + if (n > diff) { + want = q - p + n + 1; + continue; + } + } + + /* + * We have a complete header now, assuming we didn't hit EOF. Parse the + * tag and length + */ + q = p; + diff = len - off; + inf = ASN1_get_object(&q, &slen, &tag, &xclass, (int)diff); if (inf & 0x80) { unsigned long e; @@ -169,8 +222,7 @@ int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb) ERR_pop_to_mark(); ERR_set_mark(); } - i = q - p; /* header length */ - off += i; /* end of data */ + off += q - p; /* end of data */ if (inf & 1) { /* no data body so go round again */ diff --git a/crypto/openssl/crypto/asn1/a_mbstr.c b/crypto/openssl/crypto/asn1/a_mbstr.c index 9329e5795a9e..620a8f46d259 100644 --- a/crypto/openssl/crypto/asn1/a_mbstr.c +++ b/crypto/openssl/crypto/asn1/a_mbstr.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/asn1/asn1_lib.c b/crypto/openssl/crypto/asn1/asn1_lib.c index 2bd6d624ce39..150abf647579 100644 --- a/crypto/openssl/crypto/asn1/asn1_lib.c +++ b/crypto/openssl/crypto/asn1/asn1_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -129,7 +129,7 @@ static int asn1_get_length(const unsigned char **pp, int *inf, long *rl, *inf = 0; i = *p & 0x7f; if (*p++ & 0x80) { - if (max < i + 1) + if (max < i) return 0; /* Skip leading zeroes */ while (i > 0 && *p == 0) { diff --git a/crypto/openssl/crypto/asn1/asn_mime.c b/crypto/openssl/crypto/asn1/asn_mime.c index dd2faec5e8e2..b07086c0e3d8 100644 --- a/crypto/openssl/crypto/asn1/asn_mime.c +++ b/crypto/openssl/crypto/asn1/asn_mime.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -665,16 +665,18 @@ static int multi_split(BIO *bio, int flags, const char *bound, STACK_OF(BIO) **r #else 1 #endif - || (flags & SMIME_CRLFEOL) != 0) - BIO_write(bpart, "\r\n", 2); - else - BIO_write(bpart, "\n", 1); + || (flags & SMIME_CRLFEOL) != 0) { + if (BIO_write(bpart, "\r\n", 2) < 2) + goto err; + } else if (BIO_write(bpart, "\n", 1) < 1) + goto err; } eol = next_eol; - if (len > 0) - BIO_write(bpart, linebuf, len); + if (len > 0 && BIO_write(bpart, linebuf, len) < len) + goto err; } } +err: BIO_free(bpart); return 0; } diff --git a/crypto/openssl/crypto/asn1/tasn_dec.c b/crypto/openssl/crypto/asn1/tasn_dec.c index 4cbc6275cc35..c0c7c6c6c9d1 100644 --- a/crypto/openssl/crypto/asn1/tasn_dec.c +++ b/crypto/openssl/crypto/asn1/tasn_dec.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/bn/README.pod b/crypto/openssl/crypto/bn/README.pod index 1286fc0d4132..e69de29bb2d1 100644 --- a/crypto/openssl/crypto/bn/README.pod +++ b/crypto/openssl/crypto/bn/README.pod @@ -1,241 +0,0 @@ -=pod - -=head1 NAME - -bn_mul_words, bn_mul_add_words, bn_sqr_words, bn_div_words, -bn_add_words, bn_sub_words, bn_mul_comba4, bn_mul_comba8, -bn_sqr_comba4, bn_sqr_comba8, bn_cmp_words, bn_mul_normal, -bn_mul_low_normal, bn_mul_recursive, bn_mul_part_recursive, -bn_mul_low_recursive, bn_sqr_normal, bn_sqr_recursive, -bn_expand, bn_wexpand, bn_expand2, bn_fix_top, bn_check_top, -bn_print, bn_dump, bn_set_max, bn_set_high, bn_set_low - BIGNUM -library internal functions - -=head1 SYNOPSIS - - #include <openssl/bn.h> - - BN_ULONG bn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w); - BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, - BN_ULONG w); - void bn_sqr_words(BN_ULONG *rp, BN_ULONG *ap, int num); - BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d); - BN_ULONG bn_add_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp, - int num); - BN_ULONG bn_sub_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp, - int num); - - void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b); - void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b); - void bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a); - void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a); - - int bn_cmp_words(BN_ULONG *a, BN_ULONG *b, int n); - - void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, - int nb); - void bn_mul_low_normal(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n); - void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2, - int dna, int dnb, BN_ULONG *tmp); - void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, - int n, int tna, int tnb, BN_ULONG *tmp); - void bn_mul_low_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, - int n2, BN_ULONG *tmp); - - void bn_sqr_normal(BN_ULONG *r, BN_ULONG *a, int n, BN_ULONG *tmp); - void bn_sqr_recursive(BN_ULONG *r, BN_ULONG *a, int n2, BN_ULONG *tmp); - - void mul(BN_ULONG r, BN_ULONG a, BN_ULONG w, BN_ULONG c); - void mul_add(BN_ULONG r, BN_ULONG a, BN_ULONG w, BN_ULONG c); - void sqr(BN_ULONG r0, BN_ULONG r1, BN_ULONG a); - - BIGNUM *bn_expand(BIGNUM *a, int bits); - BIGNUM *bn_wexpand(BIGNUM *a, int n); - BIGNUM *bn_expand2(BIGNUM *a, int n); - void bn_fix_top(BIGNUM *a); - - void bn_check_top(BIGNUM *a); - void bn_print(BIGNUM *a); - void bn_dump(BN_ULONG *d, int n); - void bn_set_max(BIGNUM *a); - void bn_set_high(BIGNUM *r, BIGNUM *a, int n); - void bn_set_low(BIGNUM *r, BIGNUM *a, int n); - -=head1 DESCRIPTION - -This page documents the internal functions used by the OpenSSL -B<BIGNUM> implementation. They are described here to facilitate -debugging and extending the library. They are I<not> to be used by -applications. - -=head2 The BIGNUM structure - - typedef struct bignum_st BIGNUM; - - struct bignum_st - { - BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ - int top; /* Index of last used d +1. */ - /* The next are internal book keeping for bn_expand. */ - int dmax; /* Size of the d array. */ - int neg; /* one if the number is negative */ - int flags; - }; - - -The integer value is stored in B<d>, a malloc()ed array of words (B<BN_ULONG>), -least significant word first. A B<BN_ULONG> can be either 16, 32 or 64 bits -in size, depending on the 'number of bits' (B<BITS2>) specified in -C<openssl/bn.h>. - -B<dmax> is the size of the B<d> array that has been allocated. B<top> -is the number of words being used, so for a value of 4, bn.d[0]=4 and -bn.top=1. B<neg> is 1 if the number is negative. When a B<BIGNUM> is -B<0>, the B<d> field can be B<NULL> and B<top> == B<0>. - -B<flags> is a bit field of flags which are defined in C<openssl/bn.h>. The -flags begin with B<BN_FLG_>. The macros BN_set_flags(b, n) and -BN_get_flags(b, n) exist to enable or fetch flag(s) B<n> from B<BIGNUM> -structure B<b>. - -Various routines in this library require the use of temporary -B<BIGNUM> variables during their execution. Since dynamic memory -allocation to create B<BIGNUM>s is rather expensive when used in -conjunction with repeated subroutine calls, the B<BN_CTX> structure is -used. This structure contains B<BN_CTX_NUM> B<BIGNUM>s, see -L<BN_CTX_start(3)>. - -=head2 Low-level arithmetic operations - -These functions are implemented in C and for several platforms in -assembly language: - -bn_mul_words(B<rp>, B<ap>, B<num>, B<w>) operates on the B<num> word -arrays B<rp> and B<ap>. It computes B<ap> * B<w>, places the result -in B<rp>, and returns the high word (carry). - -bn_mul_add_words(B<rp>, B<ap>, B<num>, B<w>) operates on the B<num> -word arrays B<rp> and B<ap>. It computes B<ap> * B<w> + B<rp>, places -the result in B<rp>, and returns the high word (carry). - -bn_sqr_words(B<rp>, B<ap>, B<n>) operates on the B<num> word array -B<ap> and the 2*B<num> word array B<ap>. It computes B<ap> * B<ap> -word-wise, and places the low and high bytes of the result in B<rp>. - -bn_div_words(B<h>, B<l>, B<d>) divides the two word number (B<h>, B<l>) -by B<d> and returns the result. - -bn_add_words(B<rp>, B<ap>, B<bp>, B<num>) operates on the B<num> word -arrays B<ap>, B<bp> and B<rp>. It computes B<ap> + B<bp>, places the -result in B<rp>, and returns the high word (carry). - -bn_sub_words(B<rp>, B<ap>, B<bp>, B<num>) operates on the B<num> word -arrays B<ap>, B<bp> and B<rp>. It computes B<ap> - B<bp>, places the -result in B<rp>, and returns the carry (1 if B<bp> E<gt> B<ap>, 0 -otherwise). - -bn_mul_comba4(B<r>, B<a>, B<b>) operates on the 4 word arrays B<a> and -B<b> and the 8 word array B<r>. It computes B<a>*B<b> and places the -result in B<r>. - -bn_mul_comba8(B<r>, B<a>, B<b>) operates on the 8 word arrays B<a> and -B<b> and the 16 word array B<r>. It computes B<a>*B<b> and places the -result in B<r>. - -bn_sqr_comba4(B<r>, B<a>, B<b>) operates on the 4 word arrays B<a> and -B<b> and the 8 word array B<r>. - -bn_sqr_comba8(B<r>, B<a>, B<b>) operates on the 8 word arrays B<a> and -B<b> and the 16 word array B<r>. - -The following functions are implemented in C: - -bn_cmp_words(B<a>, B<b>, B<n>) operates on the B<n> word arrays B<a> -and B<b>. It returns 1, 0 and -1 if B<a> is greater than, equal and -less than B<b>. - -bn_mul_normal(B<r>, B<a>, B<na>, B<b>, B<nb>) operates on the B<na> -word array B<a>, the B<nb> word array B<b> and the B<na>+B<nb> word -array B<r>. It computes B<a>*B<b> and places the result in B<r>. - -bn_mul_low_normal(B<r>, B<a>, B<b>, B<n>) operates on the B<n> word -arrays B<r>, B<a> and B<b>. It computes the B<n> low words of -B<a>*B<b> and places the result in B<r>. - -bn_mul_recursive(B<r>, B<a>, B<b>, B<n2>, B<dna>, B<dnb>, B<t>) operates -on the word arrays B<a> and B<b> of length B<n2>+B<dna> and B<n2>+B<dnb> -(B<dna> and B<dnb> are currently allowed to be 0 or negative) and the 2*B<n2> -word arrays B<r> and B<t>. B<n2> must be a power of 2. It computes -B<a>*B<b> and places the result in B<r>. - -bn_mul_part_recursive(B<r>, B<a>, B<b>, B<n>, B<tna>, B<tnb>, B<tmp>) -operates on the word arrays B<a> and B<b> of length B<n>+B<tna> and -B<n>+B<tnb> and the 4*B<n> word arrays B<r> and B<tmp>. - -bn_mul_low_recursive(B<r>, B<a>, B<b>, B<n2>, B<tmp>) operates on the -B<n2> word arrays B<r> and B<tmp> and the B<n2>/2 word arrays B<a> -and B<b>. - -BN_mul() calls bn_mul_normal(), or an optimized implementation if the -factors have the same size: bn_mul_comba8() is used if they are 8 -words long, bn_mul_recursive() if they are larger than -B<BN_MULL_SIZE_NORMAL> and the size is an exact multiple of the word -size, and bn_mul_part_recursive() for others that are larger than -B<BN_MULL_SIZE_NORMAL>. - -bn_sqr_normal(B<r>, B<a>, B<n>, B<tmp>) operates on the B<n> word array -B<a> and the 2*B<n> word arrays B<tmp> and B<r>. - -The implementations use the following macros which, depending on the -architecture, may use "long long" C operations or inline assembler. -They are defined in C<bn_local.h>. - -mul(B<r>, B<a>, B<w>, B<c>) computes B<w>*B<a>+B<c> and places the -low word of the result in B<r> and the high word in B<c>. - -mul_add(B<r>, B<a>, B<w>, B<c>) computes B<w>*B<a>+B<r>+B<c> and -places the low word of the result in B<r> and the high word in B<c>. - -sqr(B<r0>, B<r1>, B<a>) computes B<a>*B<a> and places the low word -of the result in B<r0> and the high word in B<r1>. - -=head2 Size changes - -bn_expand() ensures that B<b> has enough space for a B<bits> bit -number. bn_wexpand() ensures that B<b> has enough space for an -B<n> word number. If the number has to be expanded, both macros -call bn_expand2(), which allocates a new B<d> array and copies the -data. They return B<NULL> on error, B<b> otherwise. - -The bn_fix_top() macro reduces B<a-E<gt>top> to point to the most -significant non-zero word plus one when B<a> has shrunk. - -=head2 Debugging - -bn_check_top() verifies that C<((a)-E<gt>top E<gt>= 0 && (a)-E<gt>top -E<lt>= (a)-E<gt>dmax)>. A violation will cause the program to abort. - -bn_print() prints B<a> to stderr. bn_dump() prints B<n> words at B<d> -(in reverse order, i.e. most significant word first) to stderr. - -bn_set_max() makes B<a> a static number with a B<dmax> of its current size. -This is used by bn_set_low() and bn_set_high() to make B<r> a read-only -B<BIGNUM> that contains the B<n> low or high words of B<a>. - -If B<BN_DEBUG> is not defined, bn_check_top(), bn_print(), bn_dump() -and bn_set_max() are defined as empty macros. - -=head1 SEE ALSO - -L<bn(3)> - -=head1 COPYRIGHT - -Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. - -Licensed under the Apache License 2.0 (the "License"). You may not use -this file except in compliance with the License. You can obtain a copy -in the file LICENSE in the source distribution or at -L<https://www.openssl.org/source/license.html>. - -=cut diff --git a/crypto/openssl/crypto/bn/bn_const.c b/crypto/openssl/crypto/bn/bn_const.c index 79b649f65417..caa345556864 100644 --- a/crypto/openssl/crypto/bn/bn_const.c +++ b/crypto/openssl/crypto/bn/bn_const.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2005-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -24,102 +24,16 @@ BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn) { static const unsigned char RFC2409_PRIME_768[] = { - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xC9, - 0x0F, - 0xDA, - 0xA2, - 0x21, - 0x68, - 0xC2, - 0x34, - 0xC4, - 0xC6, - 0x62, - 0x8B, - 0x80, - 0xDC, - 0x1C, - 0xD1, - 0x29, - 0x02, - 0x4E, - 0x08, - 0x8A, - 0x67, - 0xCC, - 0x74, - 0x02, - 0x0B, - 0xBE, - 0xA6, - 0x3B, - 0x13, - 0x9B, - 0x22, - 0x51, - 0x4A, - 0x08, - 0x79, - 0x8E, - 0x34, - 0x04, - 0xDD, - 0xEF, - 0x95, - 0x19, - 0xB3, - 0xCD, - 0x3A, - 0x43, - 0x1B, - 0x30, - 0x2B, - 0x0A, - 0x6D, - 0xF2, - 0x5F, - 0x14, - 0x37, - 0x4F, - 0xE1, - 0x35, - 0x6D, - 0x6D, - 0x51, - 0xC2, - 0x45, - 0xE4, - 0x85, - 0xB5, - 0x76, - 0x62, - 0x5E, - 0x7E, - 0xC6, - 0xF4, - 0x4C, - 0x42, - 0xE9, - 0xA6, - 0x3A, - 0x36, - 0x20, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, + 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, 0xC4, 0xC6, 0x62, 0x8B, + 0x80, 0xDC, 0x1C, 0xD1, 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, + 0xCC, 0x74, 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, 0xEF, 0x95, + 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D, + 0xF2, 0x5F, 0x14, 0x37, 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, + 0xC2, 0x45, 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x3A, 0x36, 0x20, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; return BN_bin2bn(RFC2409_PRIME_768, sizeof(RFC2409_PRIME_768), bn); } @@ -136,134 +50,19 @@ BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn) BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn) { static const unsigned char RFC2409_PRIME_1024[] = { - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xC9, - 0x0F, - 0xDA, - 0xA2, - 0x21, - 0x68, - 0xC2, - 0x34, - 0xC4, - 0xC6, - 0x62, - 0x8B, - 0x80, - 0xDC, - 0x1C, - 0xD1, - 0x29, - 0x02, - 0x4E, - 0x08, - 0x8A, - 0x67, - 0xCC, - 0x74, - 0x02, - 0x0B, - 0xBE, - 0xA6, - 0x3B, - 0x13, - 0x9B, - 0x22, - 0x51, - 0x4A, - 0x08, - 0x79, - 0x8E, - 0x34, - 0x04, - 0xDD, - 0xEF, - 0x95, - 0x19, - 0xB3, - 0xCD, - 0x3A, - 0x43, - 0x1B, - 0x30, - 0x2B, - 0x0A, - 0x6D, - 0xF2, - 0x5F, - 0x14, - 0x37, - 0x4F, - 0xE1, - 0x35, - 0x6D, - 0x6D, - 0x51, - 0xC2, - 0x45, - 0xE4, - 0x85, - 0xB5, - 0x76, - 0x62, - 0x5E, - 0x7E, - 0xC6, - 0xF4, - 0x4C, - 0x42, - 0xE9, - 0xA6, - 0x37, - 0xED, - 0x6B, - 0x0B, - 0xFF, - 0x5C, - 0xB6, - 0xF4, - 0x06, - 0xB7, - 0xED, - 0xEE, - 0x38, - 0x6B, - 0xFB, - 0x5A, - 0x89, - 0x9F, - 0xA5, - 0xAE, - 0x9F, - 0x24, - 0x11, - 0x7C, - 0x4B, - 0x1F, - 0xE6, - 0x49, - 0x28, - 0x66, - 0x51, - 0xEC, - 0xE6, - 0x53, - 0x81, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, + 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, 0xC4, 0xC6, 0x62, 0x8B, + 0x80, 0xDC, 0x1C, 0xD1, 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, + 0xCC, 0x74, 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, 0xEF, 0x95, + 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D, + 0xF2, 0x5F, 0x14, 0x37, 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, + 0xC2, 0x45, 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, 0x0B, 0xFF, + 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, 0xEE, 0x38, 0x6B, 0xFB, + 0x5A, 0x89, 0x9F, 0xA5, 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, + 0x1F, 0xE6, 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE6, 0x53, 0x81, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; return BN_bin2bn(RFC2409_PRIME_1024, sizeof(RFC2409_PRIME_1024), bn); } @@ -277,12 +76,10 @@ BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn) * RFC2312 specifies a generator of 22. */ -#ifndef FIPS_MODULE BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn) { return COPY_BN(bn, ossl_bignum_modp_1536_p); } -#endif /*- * "2048-bit MODP Group" from RFC3526, Section 3. diff --git a/crypto/openssl/crypto/bn/bn_mod.c b/crypto/openssl/crypto/bn/bn_mod.c index 3202d6232a51..8da15b16dad7 100644 --- a/crypto/openssl/crypto/bn/bn_mod.c +++ b/crypto/openssl/crypto/bn/bn_mod.c @@ -1,5 +1,5 @@ /* - * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -10,24 +10,24 @@ #include "internal/cryptlib.h" #include "bn_local.h" -int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx) +int BN_nnmod(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx) { /* - * like BN_mod, but returns non-negative remainder (i.e., 0 <= r < |d| + * like BN_mod, but returns non-negative remainder (i.e., 0 <= r < |m| * always holds) */ - if (r == d) { + if (r == m) { ERR_raise(ERR_LIB_BN, ERR_R_PASSED_INVALID_ARGUMENT); return 0; } - if (!(BN_mod(r, m, d, ctx))) + if (!(BN_mod(r, a, m, ctx))) return 0; if (!r->neg) return 1; - /* now -|d| < r < 0, so we have to set r := r + |d| */ - return (d->neg ? BN_sub : BN_add)(r, r, d); + /* now -|m| < r < 0, so we have to set r := r + |m| */ + return (m->neg ? BN_sub : BN_add)(r, r, m); } int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, diff --git a/crypto/openssl/crypto/cast/cast_s.h b/crypto/openssl/crypto/cast/cast_s.h index 345b4dd73176..5fc45eff8a4e 100644 --- a/crypto/openssl/crypto/cast/cast_s.h +++ b/crypto/openssl/crypto/cast/cast_s.h @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,2073 +8,281 @@ */ const CAST_LONG CAST_S_table0[256] = { - 0x30fb40d4, - 0x9fa0ff0b, - 0x6beccd2f, - 0x3f258c7a, - 0x1e213f2f, - 0x9c004dd3, - 0x6003e540, - 0xcf9fc949, - 0xbfd4af27, - 0x88bbbdb5, - 0xe2034090, - 0x98d09675, - 0x6e63a0e0, - 0x15c361d2, - 0xc2e7661d, - 0x22d4ff8e, - 0x28683b6f, - 0xc07fd059, - 0xff2379c8, - 0x775f50e2, - 0x43c340d3, - 0xdf2f8656, - 0x887ca41a, - 0xa2d2bd2d, - 0xa1c9e0d6, - 0x346c4819, - 0x61b76d87, - 0x22540f2f, - 0x2abe32e1, - 0xaa54166b, - 0x22568e3a, - 0xa2d341d0, - 0x66db40c8, - 0xa784392f, - 0x004dff2f, - 0x2db9d2de, - 0x97943fac, - 0x4a97c1d8, - 0x527644b7, - 0xb5f437a7, - 0xb82cbaef, - 0xd751d159, - 0x6ff7f0ed, - 0x5a097a1f, - 0x827b68d0, - 0x90ecf52e, - 0x22b0c054, - 0xbc8e5935, - 0x4b6d2f7f, - 0x50bb64a2, - 0xd2664910, - 0xbee5812d, - 0xb7332290, - 0xe93b159f, - 0xb48ee411, - 0x4bff345d, - 0xfd45c240, - 0xad31973f, - 0xc4f6d02e, - 0x55fc8165, - 0xd5b1caad, - 0xa1ac2dae, - 0xa2d4b76d, - 0xc19b0c50, - 0x882240f2, - 0x0c6e4f38, - 0xa4e4bfd7, - 0x4f5ba272, - 0x564c1d2f, - 0xc59c5319, - 0xb949e354, - 0xb04669fe, - 0xb1b6ab8a, - 0xc71358dd, - 0x6385c545, - 0x110f935d, - 0x57538ad5, - 0x6a390493, - 0xe63d37e0, - 0x2a54f6b3, - 0x3a787d5f, - 0x6276a0b5, - 0x19a6fcdf, - 0x7a42206a, - 0x29f9d4d5, - 0xf61b1891, - 0xbb72275e, - 0xaa508167, - 0x38901091, - 0xc6b505eb, - 0x84c7cb8c, - 0x2ad75a0f, - 0x874a1427, - 0xa2d1936b, - 0x2ad286af, - 0xaa56d291, - 0xd7894360, - 0x425c750d, - 0x93b39e26, - 0x187184c9, - 0x6c00b32d, - 0x73e2bb14, - 0xa0bebc3c, - 0x54623779, - 0x64459eab, - 0x3f328b82, - 0x7718cf82, - 0x59a2cea6, - 0x04ee002e, - 0x89fe78e6, - 0x3fab0950, - 0x325ff6c2, - 0x81383f05, - 0x6963c5c8, - 0x76cb5ad6, - 0xd49974c9, - 0xca180dcf, - 0x380782d5, - 0xc7fa5cf6, - 0x8ac31511, - 0x35e79e13, - 0x47da91d0, - 0xf40f9086, - 0xa7e2419e, - 0x31366241, - 0x051ef495, - 0xaa573b04, - 0x4a805d8d, - 0x548300d0, - 0x00322a3c, - 0xbf64cddf, - 0xba57a68e, - 0x75c6372b, - 0x50afd341, - 0xa7c13275, - 0x915a0bf5, - 0x6b54bfab, - 0x2b0b1426, - 0xab4cc9d7, - 0x449ccd82, - 0xf7fbf265, - 0xab85c5f3, - 0x1b55db94, - 0xaad4e324, - 0xcfa4bd3f, - 0x2deaa3e2, - 0x9e204d02, - 0xc8bd25ac, - 0xeadf55b3, - 0xd5bd9e98, - 0xe31231b2, - 0x2ad5ad6c, - 0x954329de, - 0xadbe4528, - 0xd8710f69, - 0xaa51c90f, - 0xaa786bf6, - 0x22513f1e, - 0xaa51a79b, - 0x2ad344cc, - 0x7b5a41f0, - 0xd37cfbad, - 0x1b069505, - 0x41ece491, - 0xb4c332e6, - 0x032268d4, - 0xc9600acc, - 0xce387e6d, - 0xbf6bb16c, - 0x6a70fb78, - 0x0d03d9c9, - 0xd4df39de, - 0xe01063da, - 0x4736f464, - 0x5ad328d8, - 0xb347cc96, - 0x75bb0fc3, - 0x98511bfb, - 0x4ffbcc35, - 0xb58bcf6a, - 0xe11f0abc, - 0xbfc5fe4a, - 0xa70aec10, - 0xac39570a, - 0x3f04442f, - 0x6188b153, - 0xe0397a2e, - 0x5727cb79, - 0x9ceb418f, - 0x1cacd68d, - 0x2ad37c96, - 0x0175cb9d, - 0xc69dff09, - 0xc75b65f0, - 0xd9db40d8, - 0xec0e7779, - 0x4744ead4, - 0xb11c3274, - 0xdd24cb9e, - 0x7e1c54bd, - 0xf01144f9, - 0xd2240eb1, - 0x9675b3fd, - 0xa3ac3755, - 0xd47c27af, - 0x51c85f4d, - 0x56907596, - 0xa5bb15e6, - 0x580304f0, - 0xca042cf1, - 0x011a37ea, - 0x8dbfaadb, - 0x35ba3e4a, - 0x3526ffa0, - 0xc37b4d09, - 0xbc306ed9, - 0x98a52666, - 0x5648f725, - 0xff5e569d, - 0x0ced63d0, - 0x7c63b2cf, - 0x700b45e1, - 0xd5ea50f1, - 0x85a92872, - 0xaf1fbda7, - 0xd4234870, - 0xa7870bf3, - 0x2d3b4d79, - 0x42e04198, - 0x0cd0ede7, - 0x26470db8, - 0xf881814c, - 0x474d6ad7, - 0x7c0c5e5c, - 0xd1231959, - 0x381b7298, - 0xf5d2f4db, - 0xab838653, - 0x6e2f1e23, - 0x83719c9e, - 0xbd91e046, - 0x9a56456e, - 0xdc39200c, - 0x20c8c571, - 0x962bda1c, - 0xe1e696ff, - 0xb141ab08, - 0x7cca89b9, - 0x1a69e783, - 0x02cc4843, - 0xa2f7c579, - 0x429ef47d, - 0x427b169c, - 0x5ac9f049, - 0xdd8f0f00, - 0x5c8165bf, + 0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949, + 0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e, + 0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d, + 0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0, + 0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7, + 0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935, + 0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d, + 0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50, + 0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe, + 0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3, + 0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167, + 0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291, + 0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779, + 0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2, + 0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511, + 0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d, + 0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5, + 0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324, + 0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c, + 0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc, + 0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d, + 0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96, + 0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a, + 0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d, + 0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd, + 0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6, + 0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9, + 0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872, + 0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c, + 0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e, + 0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9, + 0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf }; const CAST_LONG CAST_S_table1[256] = { - 0x1f201094, - 0xef0ba75b, - 0x69e3cf7e, - 0x393f4380, - 0xfe61cf7a, - 0xeec5207a, - 0x55889c94, - 0x72fc0651, - 0xada7ef79, - 0x4e1d7235, - 0xd55a63ce, - 0xde0436ba, - 0x99c430ef, - 0x5f0c0794, - 0x18dcdb7d, - 0xa1d6eff3, - 0xa0b52f7b, - 0x59e83605, - 0xee15b094, - 0xe9ffd909, - 0xdc440086, - 0xef944459, - 0xba83ccb3, - 0xe0c3cdfb, - 0xd1da4181, - 0x3b092ab1, - 0xf997f1c1, - 0xa5e6cf7b, - 0x01420ddb, - 0xe4e7ef5b, - 0x25a1ff41, - 0xe180f806, - 0x1fc41080, - 0x179bee7a, - 0xd37ac6a9, - 0xfe5830a4, - 0x98de8b7f, - 0x77e83f4e, - 0x79929269, - 0x24fa9f7b, - 0xe113c85b, - 0xacc40083, - 0xd7503525, - 0xf7ea615f, - 0x62143154, - 0x0d554b63, - 0x5d681121, - 0xc866c359, - 0x3d63cf73, - 0xcee234c0, - 0xd4d87e87, - 0x5c672b21, - 0x071f6181, - 0x39f7627f, - 0x361e3084, - 0xe4eb573b, - 0x602f64a4, - 0xd63acd9c, - 0x1bbc4635, - 0x9e81032d, - 0x2701f50c, - 0x99847ab4, - 0xa0e3df79, - 0xba6cf38c, - 0x10843094, - 0x2537a95e, - 0xf46f6ffe, - 0xa1ff3b1f, - 0x208cfb6a, - 0x8f458c74, - 0xd9e0a227, - 0x4ec73a34, - 0xfc884f69, - 0x3e4de8df, - 0xef0e0088, - 0x3559648d, - 0x8a45388c, - 0x1d804366, - 0x721d9bfd, - 0xa58684bb, - 0xe8256333, - 0x844e8212, - 0x128d8098, - 0xfed33fb4, - 0xce280ae1, - 0x27e19ba5, - 0xd5a6c252, - 0xe49754bd, - 0xc5d655dd, - 0xeb667064, - 0x77840b4d, - 0xa1b6a801, - 0x84db26a9, - 0xe0b56714, - 0x21f043b7, - 0xe5d05860, - 0x54f03084, - 0x066ff472, - 0xa31aa153, - 0xdadc4755, - 0xb5625dbf, - 0x68561be6, - 0x83ca6b94, - 0x2d6ed23b, - 0xeccf01db, - 0xa6d3d0ba, - 0xb6803d5c, - 0xaf77a709, - 0x33b4a34c, - 0x397bc8d6, - 0x5ee22b95, - 0x5f0e5304, - 0x81ed6f61, - 0x20e74364, - 0xb45e1378, - 0xde18639b, - 0x881ca122, - 0xb96726d1, - 0x8049a7e8, - 0x22b7da7b, - 0x5e552d25, - 0x5272d237, - 0x79d2951c, - 0xc60d894c, - 0x488cb402, - 0x1ba4fe5b, - 0xa4b09f6b, - 0x1ca815cf, - 0xa20c3005, - 0x8871df63, - 0xb9de2fcb, - 0x0cc6c9e9, - 0x0beeff53, - 0xe3214517, - 0xb4542835, - 0x9f63293c, - 0xee41e729, - 0x6e1d2d7c, - 0x50045286, - 0x1e6685f3, - 0xf33401c6, - 0x30a22c95, - 0x31a70850, - 0x60930f13, - 0x73f98417, - 0xa1269859, - 0xec645c44, - 0x52c877a9, - 0xcdff33a6, - 0xa02b1741, - 0x7cbad9a2, - 0x2180036f, - 0x50d99c08, - 0xcb3f4861, - 0xc26bd765, - 0x64a3f6ab, - 0x80342676, - 0x25a75e7b, - 0xe4e6d1fc, - 0x20c710e6, - 0xcdf0b680, - 0x17844d3b, - 0x31eef84d, - 0x7e0824e4, - 0x2ccb49eb, - 0x846a3bae, - 0x8ff77888, - 0xee5d60f6, - 0x7af75673, - 0x2fdd5cdb, - 0xa11631c1, - 0x30f66f43, - 0xb3faec54, - 0x157fd7fa, - 0xef8579cc, - 0xd152de58, - 0xdb2ffd5e, - 0x8f32ce19, - 0x306af97a, - 0x02f03ef8, - 0x99319ad5, - 0xc242fa0f, - 0xa7e3ebb0, - 0xc68e4906, - 0xb8da230c, - 0x80823028, - 0xdcdef3c8, - 0xd35fb171, - 0x088a1bc8, - 0xbec0c560, - 0x61a3c9e8, - 0xbca8f54d, - 0xc72feffa, - 0x22822e99, - 0x82c570b4, - 0xd8d94e89, - 0x8b1c34bc, - 0x301e16e6, - 0x273be979, - 0xb0ffeaa6, - 0x61d9b8c6, - 0x00b24869, - 0xb7ffce3f, - 0x08dc283b, - 0x43daf65a, - 0xf7e19798, - 0x7619b72f, - 0x8f1c9ba4, - 0xdc8637a0, - 0x16a7d3b1, - 0x9fc393b7, - 0xa7136eeb, - 0xc6bcc63e, - 0x1a513742, - 0xef6828bc, - 0x520365d6, - 0x2d6a77ab, - 0x3527ed4b, - 0x821fd216, - 0x095c6e2e, - 0xdb92f2fb, - 0x5eea29cb, - 0x145892f5, - 0x91584f7f, - 0x5483697b, - 0x2667a8cc, - 0x85196048, - 0x8c4bacea, - 0x833860d4, - 0x0d23e0f9, - 0x6c387e8a, - 0x0ae6d249, - 0xb284600c, - 0xd835731d, - 0xdcb1c647, - 0xac4c56ea, - 0x3ebd81b3, - 0x230eabb0, - 0x6438bc87, - 0xf0b5b1fa, - 0x8f5ea2b3, - 0xfc184642, - 0x0a036b7a, - 0x4fb089bd, - 0x649da589, - 0xa345415e, - 0x5c038323, - 0x3e5d3bb9, - 0x43d79572, - 0x7e6dd07c, - 0x06dfdf1e, - 0x6c6cc4ef, - 0x7160a539, - 0x73bfbe70, - 0x83877605, - 0x4523ecf1, + 0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651, + 0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3, + 0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb, + 0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806, + 0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b, + 0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359, + 0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b, + 0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c, + 0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34, + 0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb, + 0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd, + 0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860, + 0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b, + 0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304, + 0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b, + 0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf, + 0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c, + 0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13, + 0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f, + 0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6, + 0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6, + 0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58, + 0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906, + 0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d, + 0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6, + 0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4, + 0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6, + 0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f, + 0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249, + 0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa, + 0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9, + 0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1 }; const CAST_LONG CAST_S_table2[256] = { - 0x8defc240, - 0x25fa5d9f, - 0xeb903dbf, - 0xe810c907, - 0x47607fff, - 0x369fe44b, - 0x8c1fc644, - 0xaececa90, - 0xbeb1f9bf, - 0xeefbcaea, - 0xe8cf1950, - 0x51df07ae, - 0x920e8806, - 0xf0ad0548, - 0xe13c8d83, - 0x927010d5, - 0x11107d9f, - 0x07647db9, - 0xb2e3e4d4, - 0x3d4f285e, - 0xb9afa820, - 0xfade82e0, - 0xa067268b, - 0x8272792e, - 0x553fb2c0, - 0x489ae22b, - 0xd4ef9794, - 0x125e3fbc, - 0x21fffcee, - 0x825b1bfd, - 0x9255c5ed, - 0x1257a240, - 0x4e1a8302, - 0xbae07fff, - 0x528246e7, - 0x8e57140e, - 0x3373f7bf, - 0x8c9f8188, - 0xa6fc4ee8, - 0xc982b5a5, - 0xa8c01db7, - 0x579fc264, - 0x67094f31, - 0xf2bd3f5f, - 0x40fff7c1, - 0x1fb78dfc, - 0x8e6bd2c1, - 0x437be59b, - 0x99b03dbf, - 0xb5dbc64b, - 0x638dc0e6, - 0x55819d99, - 0xa197c81c, - 0x4a012d6e, - 0xc5884a28, - 0xccc36f71, - 0xb843c213, - 0x6c0743f1, - 0x8309893c, - 0x0feddd5f, - 0x2f7fe850, - 0xd7c07f7e, - 0x02507fbf, - 0x5afb9a04, - 0xa747d2d0, - 0x1651192e, - 0xaf70bf3e, - 0x58c31380, - 0x5f98302e, - 0x727cc3c4, - 0x0a0fb402, - 0x0f7fef82, - 0x8c96fdad, - 0x5d2c2aae, - 0x8ee99a49, - 0x50da88b8, - 0x8427f4a0, - 0x1eac5790, - 0x796fb449, - 0x8252dc15, - 0xefbd7d9b, - 0xa672597d, - 0xada840d8, - 0x45f54504, - 0xfa5d7403, - 0xe83ec305, - 0x4f91751a, - 0x925669c2, - 0x23efe941, - 0xa903f12e, - 0x60270df2, - 0x0276e4b6, - 0x94fd6574, - 0x927985b2, - 0x8276dbcb, - 0x02778176, - 0xf8af918d, - 0x4e48f79e, - 0x8f616ddf, - 0xe29d840e, - 0x842f7d83, - 0x340ce5c8, - 0x96bbb682, - 0x93b4b148, - 0xef303cab, - 0x984faf28, - 0x779faf9b, - 0x92dc560d, - 0x224d1e20, - 0x8437aa88, - 0x7d29dc96, - 0x2756d3dc, - 0x8b907cee, - 0xb51fd240, - 0xe7c07ce3, - 0xe566b4a1, - 0xc3e9615e, - 0x3cf8209d, - 0x6094d1e3, - 0xcd9ca341, - 0x5c76460e, - 0x00ea983b, - 0xd4d67881, - 0xfd47572c, - 0xf76cedd9, - 0xbda8229c, - 0x127dadaa, - 0x438a074e, - 0x1f97c090, - 0x081bdb8a, - 0x93a07ebe, - 0xb938ca15, - 0x97b03cff, - 0x3dc2c0f8, - 0x8d1ab2ec, - 0x64380e51, - 0x68cc7bfb, - 0xd90f2788, - 0x12490181, - 0x5de5ffd4, - 0xdd7ef86a, - 0x76a2e214, - 0xb9a40368, - 0x925d958f, - 0x4b39fffa, - 0xba39aee9, - 0xa4ffd30b, - 0xfaf7933b, - 0x6d498623, - 0x193cbcfa, - 0x27627545, - 0x825cf47a, - 0x61bd8ba0, - 0xd11e42d1, - 0xcead04f4, - 0x127ea392, - 0x10428db7, - 0x8272a972, - 0x9270c4a8, - 0x127de50b, - 0x285ba1c8, - 0x3c62f44f, - 0x35c0eaa5, - 0xe805d231, - 0x428929fb, - 0xb4fcdf82, - 0x4fb66a53, - 0x0e7dc15b, - 0x1f081fab, - 0x108618ae, - 0xfcfd086d, - 0xf9ff2889, - 0x694bcc11, - 0x236a5cae, - 0x12deca4d, - 0x2c3f8cc5, - 0xd2d02dfe, - 0xf8ef5896, - 0xe4cf52da, - 0x95155b67, - 0x494a488c, - 0xb9b6a80c, - 0x5c8f82bc, - 0x89d36b45, - 0x3a609437, - 0xec00c9a9, - 0x44715253, - 0x0a874b49, - 0xd773bc40, - 0x7c34671c, - 0x02717ef6, - 0x4feb5536, - 0xa2d02fff, - 0xd2bf60c4, - 0xd43f03c0, - 0x50b4ef6d, - 0x07478cd1, - 0x006e1888, - 0xa2e53f55, - 0xb9e6d4bc, - 0xa2048016, - 0x97573833, - 0xd7207d67, - 0xde0f8f3d, - 0x72f87b33, - 0xabcc4f33, - 0x7688c55d, - 0x7b00a6b0, - 0x947b0001, - 0x570075d2, - 0xf9bb88f8, - 0x8942019e, - 0x4264a5ff, - 0x856302e0, - 0x72dbd92b, - 0xee971b69, - 0x6ea22fde, - 0x5f08ae2b, - 0xaf7a616d, - 0xe5c98767, - 0xcf1febd2, - 0x61efc8c2, - 0xf1ac2571, - 0xcc8239c2, - 0x67214cb8, - 0xb1e583d1, - 0xb7dc3e62, - 0x7f10bdce, - 0xf90a5c38, - 0x0ff0443d, - 0x606e6dc6, - 0x60543a49, - 0x5727c148, - 0x2be98a1d, - 0x8ab41738, - 0x20e1be24, - 0xaf96da0f, - 0x68458425, - 0x99833be5, - 0x600d457d, - 0x282f9350, - 0x8334b362, - 0xd91d1120, - 0x2b6d8da0, - 0x642b1e31, - 0x9c305a00, - 0x52bce688, - 0x1b03588a, - 0xf7baefd5, - 0x4142ed9c, - 0xa4315c11, - 0x83323ec5, - 0xdfef4636, - 0xa133c501, - 0xe9d3531c, - 0xee353783, + 0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90, + 0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5, + 0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e, + 0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240, + 0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5, + 0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b, + 0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71, + 0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04, + 0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82, + 0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15, + 0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2, + 0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176, + 0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148, + 0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc, + 0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341, + 0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e, + 0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51, + 0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f, + 0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a, + 0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b, + 0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b, + 0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5, + 0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45, + 0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536, + 0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc, + 0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0, + 0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69, + 0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2, + 0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49, + 0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d, + 0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a, + 0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783 }; const CAST_LONG CAST_S_table3[256] = { - 0x9db30420, - 0x1fb6e9de, - 0xa7be7bef, - 0xd273a298, - 0x4a4f7bdb, - 0x64ad8c57, - 0x85510443, - 0xfa020ed1, - 0x7e287aff, - 0xe60fb663, - 0x095f35a1, - 0x79ebf120, - 0xfd059d43, - 0x6497b7b1, - 0xf3641f63, - 0x241e4adf, - 0x28147f5f, - 0x4fa2b8cd, - 0xc9430040, - 0x0cc32220, - 0xfdd30b30, - 0xc0a5374f, - 0x1d2d00d9, - 0x24147b15, - 0xee4d111a, - 0x0fca5167, - 0x71ff904c, - 0x2d195ffe, - 0x1a05645f, - 0x0c13fefe, - 0x081b08ca, - 0x05170121, - 0x80530100, - 0xe83e5efe, - 0xac9af4f8, - 0x7fe72701, - 0xd2b8ee5f, - 0x06df4261, - 0xbb9e9b8a, - 0x7293ea25, - 0xce84ffdf, - 0xf5718801, - 0x3dd64b04, - 0xa26f263b, - 0x7ed48400, - 0x547eebe6, - 0x446d4ca0, - 0x6cf3d6f5, - 0x2649abdf, - 0xaea0c7f5, - 0x36338cc1, - 0x503f7e93, - 0xd3772061, - 0x11b638e1, - 0x72500e03, - 0xf80eb2bb, - 0xabe0502e, - 0xec8d77de, - 0x57971e81, - 0xe14f6746, - 0xc9335400, - 0x6920318f, - 0x081dbb99, - 0xffc304a5, - 0x4d351805, - 0x7f3d5ce3, - 0xa6c866c6, - 0x5d5bcca9, - 0xdaec6fea, - 0x9f926f91, - 0x9f46222f, - 0x3991467d, - 0xa5bf6d8e, - 0x1143c44f, - 0x43958302, - 0xd0214eeb, - 0x022083b8, - 0x3fb6180c, - 0x18f8931e, - 0x281658e6, - 0x26486e3e, - 0x8bd78a70, - 0x7477e4c1, - 0xb506e07c, - 0xf32d0a25, - 0x79098b02, - 0xe4eabb81, - 0x28123b23, - 0x69dead38, - 0x1574ca16, - 0xdf871b62, - 0x211c40b7, - 0xa51a9ef9, - 0x0014377b, - 0x041e8ac8, - 0x09114003, - 0xbd59e4d2, - 0xe3d156d5, - 0x4fe876d5, - 0x2f91a340, - 0x557be8de, - 0x00eae4a7, - 0x0ce5c2ec, - 0x4db4bba6, - 0xe756bdff, - 0xdd3369ac, - 0xec17b035, - 0x06572327, - 0x99afc8b0, - 0x56c8c391, - 0x6b65811c, - 0x5e146119, - 0x6e85cb75, - 0xbe07c002, - 0xc2325577, - 0x893ff4ec, - 0x5bbfc92d, - 0xd0ec3b25, - 0xb7801ab7, - 0x8d6d3b24, - 0x20c763ef, - 0xc366a5fc, - 0x9c382880, - 0x0ace3205, - 0xaac9548a, - 0xeca1d7c7, - 0x041afa32, - 0x1d16625a, - 0x6701902c, - 0x9b757a54, - 0x31d477f7, - 0x9126b031, - 0x36cc6fdb, - 0xc70b8b46, - 0xd9e66a48, - 0x56e55a79, - 0x026a4ceb, - 0x52437eff, - 0x2f8f76b4, - 0x0df980a5, - 0x8674cde3, - 0xedda04eb, - 0x17a9be04, - 0x2c18f4df, - 0xb7747f9d, - 0xab2af7b4, - 0xefc34d20, - 0x2e096b7c, - 0x1741a254, - 0xe5b6a035, - 0x213d42f6, - 0x2c1c7c26, - 0x61c2f50f, - 0x6552daf9, - 0xd2c231f8, - 0x25130f69, - 0xd8167fa2, - 0x0418f2c8, - 0x001a96a6, - 0x0d1526ab, - 0x63315c21, - 0x5e0a72ec, - 0x49bafefd, - 0x187908d9, - 0x8d0dbd86, - 0x311170a7, - 0x3e9b640c, - 0xcc3e10d7, - 0xd5cad3b6, - 0x0caec388, - 0xf73001e1, - 0x6c728aff, - 0x71eae2a1, - 0x1f9af36e, - 0xcfcbd12f, - 0xc1de8417, - 0xac07be6b, - 0xcb44a1d8, - 0x8b9b0f56, - 0x013988c3, - 0xb1c52fca, - 0xb4be31cd, - 0xd8782806, - 0x12a3a4e2, - 0x6f7de532, - 0x58fd7eb6, - 0xd01ee900, - 0x24adffc2, - 0xf4990fc5, - 0x9711aac5, - 0x001d7b95, - 0x82e5e7d2, - 0x109873f6, - 0x00613096, - 0xc32d9521, - 0xada121ff, - 0x29908415, - 0x7fbb977f, - 0xaf9eb3db, - 0x29c9ed2a, - 0x5ce2a465, - 0xa730f32c, - 0xd0aa3fe8, - 0x8a5cc091, - 0xd49e2ce7, - 0x0ce454a9, - 0xd60acd86, - 0x015f1919, - 0x77079103, - 0xdea03af6, - 0x78a8565e, - 0xdee356df, - 0x21f05cbe, - 0x8b75e387, - 0xb3c50651, - 0xb8a5c3ef, - 0xd8eeb6d2, - 0xe523be77, - 0xc2154529, - 0x2f69efdf, - 0xafe67afb, - 0xf470c4b2, - 0xf3e0eb5b, - 0xd6cc9876, - 0x39e4460c, - 0x1fda8538, - 0x1987832f, - 0xca007367, - 0xa99144f8, - 0x296b299e, - 0x492fc295, - 0x9266beab, - 0xb5676e69, - 0x9bd3ddda, - 0xdf7e052f, - 0xdb25701c, - 0x1b5e51ee, - 0xf65324e6, - 0x6afce36c, - 0x0316cc04, - 0x8644213e, - 0xb7dc59d0, - 0x7965291f, - 0xccd6fd43, - 0x41823979, - 0x932bcdf6, - 0xb657c34d, - 0x4edfd282, - 0x7ae5290c, - 0x3cb9536b, - 0x851e20fe, - 0x9833557e, - 0x13ecf0b0, - 0xd3ffb372, - 0x3f85c5c1, - 0x0aef7ed2, + 0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1, + 0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf, + 0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15, + 0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121, + 0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25, + 0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5, + 0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb, + 0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5, + 0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d, + 0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6, + 0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23, + 0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003, + 0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6, + 0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119, + 0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24, + 0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a, + 0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79, + 0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df, + 0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26, + 0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab, + 0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7, + 0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417, + 0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2, + 0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2, + 0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a, + 0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919, + 0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef, + 0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876, + 0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab, + 0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04, + 0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282, + 0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2 }; const CAST_LONG CAST_S_table4[256] = { - 0x7ec90c04, - 0x2c6e74b9, - 0x9b0e66df, - 0xa6337911, - 0xb86a7fff, - 0x1dd358f5, - 0x44dd9d44, - 0x1731167f, - 0x08fbf1fa, - 0xe7f511cc, - 0xd2051b00, - 0x735aba00, - 0x2ab722d8, - 0x386381cb, - 0xacf6243a, - 0x69befd7a, - 0xe6a2e77f, - 0xf0c720cd, - 0xc4494816, - 0xccf5c180, - 0x38851640, - 0x15b0a848, - 0xe68b18cb, - 0x4caadeff, - 0x5f480a01, - 0x0412b2aa, - 0x259814fc, - 0x41d0efe2, - 0x4e40b48d, - 0x248eb6fb, - 0x8dba1cfe, - 0x41a99b02, - 0x1a550a04, - 0xba8f65cb, - 0x7251f4e7, - 0x95a51725, - 0xc106ecd7, - 0x97a5980a, - 0xc539b9aa, - 0x4d79fe6a, - 0xf2f3f763, - 0x68af8040, - 0xed0c9e56, - 0x11b4958b, - 0xe1eb5a88, - 0x8709e6b0, - 0xd7e07156, - 0x4e29fea7, - 0x6366e52d, - 0x02d1c000, - 0xc4ac8e05, - 0x9377f571, - 0x0c05372a, - 0x578535f2, - 0x2261be02, - 0xd642a0c9, - 0xdf13a280, - 0x74b55bd2, - 0x682199c0, - 0xd421e5ec, - 0x53fb3ce8, - 0xc8adedb3, - 0x28a87fc9, - 0x3d959981, - 0x5c1ff900, - 0xfe38d399, - 0x0c4eff0b, - 0x062407ea, - 0xaa2f4fb1, - 0x4fb96976, - 0x90c79505, - 0xb0a8a774, - 0xef55a1ff, - 0xe59ca2c2, - 0xa6b62d27, - 0xe66a4263, - 0xdf65001f, - 0x0ec50966, - 0xdfdd55bc, - 0x29de0655, - 0x911e739a, - 0x17af8975, - 0x32c7911c, - 0x89f89468, - 0x0d01e980, - 0x524755f4, - 0x03b63cc9, - 0x0cc844b2, - 0xbcf3f0aa, - 0x87ac36e9, - 0xe53a7426, - 0x01b3d82b, - 0x1a9e7449, - 0x64ee2d7e, - 0xcddbb1da, - 0x01c94910, - 0xb868bf80, - 0x0d26f3fd, - 0x9342ede7, - 0x04a5c284, - 0x636737b6, - 0x50f5b616, - 0xf24766e3, - 0x8eca36c1, - 0x136e05db, - 0xfef18391, - 0xfb887a37, - 0xd6e7f7d4, - 0xc7fb7dc9, - 0x3063fcdf, - 0xb6f589de, - 0xec2941da, - 0x26e46695, - 0xb7566419, - 0xf654efc5, - 0xd08d58b7, - 0x48925401, - 0xc1bacb7f, - 0xe5ff550f, - 0xb6083049, - 0x5bb5d0e8, - 0x87d72e5a, - 0xab6a6ee1, - 0x223a66ce, - 0xc62bf3cd, - 0x9e0885f9, - 0x68cb3e47, - 0x086c010f, - 0xa21de820, - 0xd18b69de, - 0xf3f65777, - 0xfa02c3f6, - 0x407edac3, - 0xcbb3d550, - 0x1793084d, - 0xb0d70eba, - 0x0ab378d5, - 0xd951fb0c, - 0xded7da56, - 0x4124bbe4, - 0x94ca0b56, - 0x0f5755d1, - 0xe0e1e56e, - 0x6184b5be, - 0x580a249f, - 0x94f74bc0, - 0xe327888e, - 0x9f7b5561, - 0xc3dc0280, - 0x05687715, - 0x646c6bd7, - 0x44904db3, - 0x66b4f0a3, - 0xc0f1648a, - 0x697ed5af, - 0x49e92ff6, - 0x309e374f, - 0x2cb6356a, - 0x85808573, - 0x4991f840, - 0x76f0ae02, - 0x083be84d, - 0x28421c9a, - 0x44489406, - 0x736e4cb8, - 0xc1092910, - 0x8bc95fc6, - 0x7d869cf4, - 0x134f616f, - 0x2e77118d, - 0xb31b2be1, - 0xaa90b472, - 0x3ca5d717, - 0x7d161bba, - 0x9cad9010, - 0xaf462ba2, - 0x9fe459d2, - 0x45d34559, - 0xd9f2da13, - 0xdbc65487, - 0xf3e4f94e, - 0x176d486f, - 0x097c13ea, - 0x631da5c7, - 0x445f7382, - 0x175683f4, - 0xcdc66a97, - 0x70be0288, - 0xb3cdcf72, - 0x6e5dd2f3, - 0x20936079, - 0x459b80a5, - 0xbe60e2db, - 0xa9c23101, - 0xeba5315c, - 0x224e42f2, - 0x1c5c1572, - 0xf6721b2c, - 0x1ad2fff3, - 0x8c25404e, - 0x324ed72f, - 0x4067b7fd, - 0x0523138e, - 0x5ca3bc78, - 0xdc0fd66e, - 0x75922283, - 0x784d6b17, - 0x58ebb16e, - 0x44094f85, - 0x3f481d87, - 0xfcfeae7b, - 0x77b5ff76, - 0x8c2302bf, - 0xaaf47556, - 0x5f46b02a, - 0x2b092801, - 0x3d38f5f7, - 0x0ca81f36, - 0x52af4a8a, - 0x66d5e7c0, - 0xdf3b0874, - 0x95055110, - 0x1b5ad7a8, - 0xf61ed5ad, - 0x6cf6e479, - 0x20758184, - 0xd0cefa65, - 0x88f7be58, - 0x4a046826, - 0x0ff6f8f3, - 0xa09c7f70, - 0x5346aba0, - 0x5ce96c28, - 0xe176eda3, - 0x6bac307f, - 0x376829d2, - 0x85360fa9, - 0x17e3fe2a, - 0x24b79767, - 0xf5a96b20, - 0xd6cd2595, - 0x68ff1ebf, - 0x7555442c, - 0xf19f06be, - 0xf9e0659a, - 0xeeb9491d, - 0x34010718, - 0xbb30cab8, - 0xe822fe15, - 0x88570983, - 0x750e6249, - 0xda627e55, - 0x5e76ffa8, - 0xb1534546, - 0x6d47de08, - 0xefe9e7d4, + 0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f, + 0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a, + 0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff, + 0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02, + 0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a, + 0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7, + 0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9, + 0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981, + 0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774, + 0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655, + 0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2, + 0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910, + 0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1, + 0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da, + 0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049, + 0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f, + 0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba, + 0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be, + 0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3, + 0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840, + 0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4, + 0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2, + 0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7, + 0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5, + 0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e, + 0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e, + 0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801, + 0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad, + 0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0, + 0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20, + 0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8, + 0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4 }; const CAST_LONG CAST_S_table5[256] = { - 0xf6fa8f9d, - 0x2cac6ce1, - 0x4ca34867, - 0xe2337f7c, - 0x95db08e7, - 0x016843b4, - 0xeced5cbc, - 0x325553ac, - 0xbf9f0960, - 0xdfa1e2ed, - 0x83f0579d, - 0x63ed86b9, - 0x1ab6a6b8, - 0xde5ebe39, - 0xf38ff732, - 0x8989b138, - 0x33f14961, - 0xc01937bd, - 0xf506c6da, - 0xe4625e7e, - 0xa308ea99, - 0x4e23e33c, - 0x79cbd7cc, - 0x48a14367, - 0xa3149619, - 0xfec94bd5, - 0xa114174a, - 0xeaa01866, - 0xa084db2d, - 0x09a8486f, - 0xa888614a, - 0x2900af98, - 0x01665991, - 0xe1992863, - 0xc8f30c60, - 0x2e78ef3c, - 0xd0d51932, - 0xcf0fec14, - 0xf7ca07d2, - 0xd0a82072, - 0xfd41197e, - 0x9305a6b0, - 0xe86be3da, - 0x74bed3cd, - 0x372da53c, - 0x4c7f4448, - 0xdab5d440, - 0x6dba0ec3, - 0x083919a7, - 0x9fbaeed9, - 0x49dbcfb0, - 0x4e670c53, - 0x5c3d9c01, - 0x64bdb941, - 0x2c0e636a, - 0xba7dd9cd, - 0xea6f7388, - 0xe70bc762, - 0x35f29adb, - 0x5c4cdd8d, - 0xf0d48d8c, - 0xb88153e2, - 0x08a19866, - 0x1ae2eac8, - 0x284caf89, - 0xaa928223, - 0x9334be53, - 0x3b3a21bf, - 0x16434be3, - 0x9aea3906, - 0xefe8c36e, - 0xf890cdd9, - 0x80226dae, - 0xc340a4a3, - 0xdf7e9c09, - 0xa694a807, - 0x5b7c5ecc, - 0x221db3a6, - 0x9a69a02f, - 0x68818a54, - 0xceb2296f, - 0x53c0843a, - 0xfe893655, - 0x25bfe68a, - 0xb4628abc, - 0xcf222ebf, - 0x25ac6f48, - 0xa9a99387, - 0x53bddb65, - 0xe76ffbe7, - 0xe967fd78, - 0x0ba93563, - 0x8e342bc1, - 0xe8a11be9, - 0x4980740d, - 0xc8087dfc, - 0x8de4bf99, - 0xa11101a0, - 0x7fd37975, - 0xda5a26c0, - 0xe81f994f, - 0x9528cd89, - 0xfd339fed, - 0xb87834bf, - 0x5f04456d, - 0x22258698, - 0xc9c4c83b, - 0x2dc156be, - 0x4f628daa, - 0x57f55ec5, - 0xe2220abe, - 0xd2916ebf, - 0x4ec75b95, - 0x24f2c3c0, - 0x42d15d99, - 0xcd0d7fa0, - 0x7b6e27ff, - 0xa8dc8af0, - 0x7345c106, - 0xf41e232f, - 0x35162386, - 0xe6ea8926, - 0x3333b094, - 0x157ec6f2, - 0x372b74af, - 0x692573e4, - 0xe9a9d848, - 0xf3160289, - 0x3a62ef1d, - 0xa787e238, - 0xf3a5f676, - 0x74364853, - 0x20951063, - 0x4576698d, - 0xb6fad407, - 0x592af950, - 0x36f73523, - 0x4cfb6e87, - 0x7da4cec0, - 0x6c152daa, - 0xcb0396a8, - 0xc50dfe5d, - 0xfcd707ab, - 0x0921c42f, - 0x89dff0bb, - 0x5fe2be78, - 0x448f4f33, - 0x754613c9, - 0x2b05d08d, - 0x48b9d585, - 0xdc049441, - 0xc8098f9b, - 0x7dede786, - 0xc39a3373, - 0x42410005, - 0x6a091751, - 0x0ef3c8a6, - 0x890072d6, - 0x28207682, - 0xa9a9f7be, - 0xbf32679d, - 0xd45b5b75, - 0xb353fd00, - 0xcbb0e358, - 0x830f220a, - 0x1f8fb214, - 0xd372cf08, - 0xcc3c4a13, - 0x8cf63166, - 0x061c87be, - 0x88c98f88, - 0x6062e397, - 0x47cf8e7a, - 0xb6c85283, - 0x3cc2acfb, - 0x3fc06976, - 0x4e8f0252, - 0x64d8314d, - 0xda3870e3, - 0x1e665459, - 0xc10908f0, - 0x513021a5, - 0x6c5b68b7, - 0x822f8aa0, - 0x3007cd3e, - 0x74719eef, - 0xdc872681, - 0x073340d4, - 0x7e432fd9, - 0x0c5ec241, - 0x8809286c, - 0xf592d891, - 0x08a930f6, - 0x957ef305, - 0xb7fbffbd, - 0xc266e96f, - 0x6fe4ac98, - 0xb173ecc0, - 0xbc60b42a, - 0x953498da, - 0xfba1ae12, - 0x2d4bd736, - 0x0f25faab, - 0xa4f3fceb, - 0xe2969123, - 0x257f0c3d, - 0x9348af49, - 0x361400bc, - 0xe8816f4a, - 0x3814f200, - 0xa3f94043, - 0x9c7a54c2, - 0xbc704f57, - 0xda41e7f9, - 0xc25ad33a, - 0x54f4a084, - 0xb17f5505, - 0x59357cbe, - 0xedbd15c8, - 0x7f97c5ab, - 0xba5ac7b5, - 0xb6f6deaf, - 0x3a479c3a, - 0x5302da25, - 0x653d7e6a, - 0x54268d49, - 0x51a477ea, - 0x5017d55b, - 0xd7d25d88, - 0x44136c76, - 0x0404a8c8, - 0xb8e5a121, - 0xb81a928a, - 0x60ed5869, - 0x97c55b96, - 0xeaec991b, - 0x29935913, - 0x01fdb7f1, - 0x088e8dfa, - 0x9ab6f6f5, - 0x3b4cbf9f, - 0x4a5de3ab, - 0xe6051d35, - 0xa0e1d855, - 0xd36b4cf1, - 0xf544edeb, - 0xb0e93524, - 0xbebb8fbd, - 0xa2d762cf, - 0x49c92f54, - 0x38b5f331, - 0x7128a454, - 0x48392905, - 0xa65b1db8, - 0x851c97bd, - 0xd675cf2f, + 0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac, + 0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138, + 0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367, + 0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98, + 0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072, + 0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3, + 0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd, + 0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8, + 0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9, + 0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54, + 0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387, + 0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc, + 0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf, + 0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf, + 0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f, + 0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289, + 0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950, + 0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f, + 0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b, + 0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be, + 0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13, + 0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976, + 0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0, + 0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891, + 0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da, + 0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc, + 0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084, + 0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25, + 0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121, + 0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5, + 0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd, + 0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f }; const CAST_LONG CAST_S_table6[256] = { - 0x85e04019, - 0x332bf567, - 0x662dbfff, - 0xcfc65693, - 0x2a8d7f6f, - 0xab9bc912, - 0xde6008a1, - 0x2028da1f, - 0x0227bce7, - 0x4d642916, - 0x18fac300, - 0x50f18b82, - 0x2cb2cb11, - 0xb232e75c, - 0x4b3695f2, - 0xb28707de, - 0xa05fbcf6, - 0xcd4181e9, - 0xe150210c, - 0xe24ef1bd, - 0xb168c381, - 0xfde4e789, - 0x5c79b0d8, - 0x1e8bfd43, - 0x4d495001, - 0x38be4341, - 0x913cee1d, - 0x92a79c3f, - 0x089766be, - 0xbaeeadf4, - 0x1286becf, - 0xb6eacb19, - 0x2660c200, - 0x7565bde4, - 0x64241f7a, - 0x8248dca9, - 0xc3b3ad66, - 0x28136086, - 0x0bd8dfa8, - 0x356d1cf2, - 0x107789be, - 0xb3b2e9ce, - 0x0502aa8f, - 0x0bc0351e, - 0x166bf52a, - 0xeb12ff82, - 0xe3486911, - 0xd34d7516, - 0x4e7b3aff, - 0x5f43671b, - 0x9cf6e037, - 0x4981ac83, - 0x334266ce, - 0x8c9341b7, - 0xd0d854c0, - 0xcb3a6c88, - 0x47bc2829, - 0x4725ba37, - 0xa66ad22b, - 0x7ad61f1e, - 0x0c5cbafa, - 0x4437f107, - 0xb6e79962, - 0x42d2d816, - 0x0a961288, - 0xe1a5c06e, - 0x13749e67, - 0x72fc081a, - 0xb1d139f7, - 0xf9583745, - 0xcf19df58, - 0xbec3f756, - 0xc06eba30, - 0x07211b24, - 0x45c28829, - 0xc95e317f, - 0xbc8ec511, - 0x38bc46e9, - 0xc6e6fa14, - 0xbae8584a, - 0xad4ebc46, - 0x468f508b, - 0x7829435f, - 0xf124183b, - 0x821dba9f, - 0xaff60ff4, - 0xea2c4e6d, - 0x16e39264, - 0x92544a8b, - 0x009b4fc3, - 0xaba68ced, - 0x9ac96f78, - 0x06a5b79a, - 0xb2856e6e, - 0x1aec3ca9, - 0xbe838688, - 0x0e0804e9, - 0x55f1be56, - 0xe7e5363b, - 0xb3a1f25d, - 0xf7debb85, - 0x61fe033c, - 0x16746233, - 0x3c034c28, - 0xda6d0c74, - 0x79aac56c, - 0x3ce4e1ad, - 0x51f0c802, - 0x98f8f35a, - 0x1626a49f, - 0xeed82b29, - 0x1d382fe3, - 0x0c4fb99a, - 0xbb325778, - 0x3ec6d97b, - 0x6e77a6a9, - 0xcb658b5c, - 0xd45230c7, - 0x2bd1408b, - 0x60c03eb7, - 0xb9068d78, - 0xa33754f4, - 0xf430c87d, - 0xc8a71302, - 0xb96d8c32, - 0xebd4e7be, - 0xbe8b9d2d, - 0x7979fb06, - 0xe7225308, - 0x8b75cf77, - 0x11ef8da4, - 0xe083c858, - 0x8d6b786f, - 0x5a6317a6, - 0xfa5cf7a0, - 0x5dda0033, - 0xf28ebfb0, - 0xf5b9c310, - 0xa0eac280, - 0x08b9767a, - 0xa3d9d2b0, - 0x79d34217, - 0x021a718d, - 0x9ac6336a, - 0x2711fd60, - 0x438050e3, - 0x069908a8, - 0x3d7fedc4, - 0x826d2bef, - 0x4eeb8476, - 0x488dcf25, - 0x36c9d566, - 0x28e74e41, - 0xc2610aca, - 0x3d49a9cf, - 0xbae3b9df, - 0xb65f8de6, - 0x92aeaf64, - 0x3ac7d5e6, - 0x9ea80509, - 0xf22b017d, - 0xa4173f70, - 0xdd1e16c3, - 0x15e0d7f9, - 0x50b1b887, - 0x2b9f4fd5, - 0x625aba82, - 0x6a017962, - 0x2ec01b9c, - 0x15488aa9, - 0xd716e740, - 0x40055a2c, - 0x93d29a22, - 0xe32dbf9a, - 0x058745b9, - 0x3453dc1e, - 0xd699296e, - 0x496cff6f, - 0x1c9f4986, - 0xdfe2ed07, - 0xb87242d1, - 0x19de7eae, - 0x053e561a, - 0x15ad6f8c, - 0x66626c1c, - 0x7154c24c, - 0xea082b2a, - 0x93eb2939, - 0x17dcb0f0, - 0x58d4f2ae, - 0x9ea294fb, - 0x52cf564c, - 0x9883fe66, - 0x2ec40581, - 0x763953c3, - 0x01d6692e, - 0xd3a0c108, - 0xa1e7160e, - 0xe4f2dfa6, - 0x693ed285, - 0x74904698, - 0x4c2b0edd, - 0x4f757656, - 0x5d393378, - 0xa132234f, - 0x3d321c5d, - 0xc3f5e194, - 0x4b269301, - 0xc79f022f, - 0x3c997e7e, - 0x5e4f9504, - 0x3ffafbbd, - 0x76f7ad0e, - 0x296693f4, - 0x3d1fce6f, - 0xc61e45be, - 0xd3b5ab34, - 0xf72bf9b7, - 0x1b0434c0, - 0x4e72b567, - 0x5592a33d, - 0xb5229301, - 0xcfd2a87f, - 0x60aeb767, - 0x1814386b, - 0x30bcc33d, - 0x38a0c07d, - 0xfd1606f2, - 0xc363519b, - 0x589dd390, - 0x5479f8e6, - 0x1cb8d647, - 0x97fd61a9, - 0xea7759f4, - 0x2d57539d, - 0x569a58cf, - 0xe84e63ad, - 0x462e1b78, - 0x6580f87e, - 0xf3817914, - 0x91da55f4, - 0x40a230f3, - 0xd1988f35, - 0xb6e318d2, - 0x3ffa50bc, - 0x3d40f021, - 0xc3c0bdae, - 0x4958c24c, - 0x518f36b2, - 0x84b1d370, - 0x0fedce83, - 0x878ddada, - 0xf2a279c7, - 0x94e01be8, - 0x90716f4b, - 0x954b8aa3, + 0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f, + 0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de, + 0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43, + 0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19, + 0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2, + 0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516, + 0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88, + 0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816, + 0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756, + 0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a, + 0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264, + 0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688, + 0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28, + 0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3, + 0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7, + 0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06, + 0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033, + 0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a, + 0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566, + 0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509, + 0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962, + 0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e, + 0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c, + 0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c, + 0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285, + 0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301, + 0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be, + 0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767, + 0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647, + 0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914, + 0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c, + 0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3 }; const CAST_LONG CAST_S_table7[256] = { - 0xe216300d, - 0xbbddfffc, - 0xa7ebdabd, - 0x35648095, - 0x7789f8b7, - 0xe6c1121b, - 0x0e241600, - 0x052ce8b5, - 0x11a9cfb0, - 0xe5952f11, - 0xece7990a, - 0x9386d174, - 0x2a42931c, - 0x76e38111, - 0xb12def3a, - 0x37ddddfc, - 0xde9adeb1, - 0x0a0cc32c, - 0xbe197029, - 0x84a00940, - 0xbb243a0f, - 0xb4d137cf, - 0xb44e79f0, - 0x049eedfd, - 0x0b15a15d, - 0x480d3168, - 0x8bbbde5a, - 0x669ded42, - 0xc7ece831, - 0x3f8f95e7, - 0x72df191b, - 0x7580330d, - 0x94074251, - 0x5c7dcdfa, - 0xabbe6d63, - 0xaa402164, - 0xb301d40a, - 0x02e7d1ca, - 0x53571dae, - 0x7a3182a2, - 0x12a8ddec, - 0xfdaa335d, - 0x176f43e8, - 0x71fb46d4, - 0x38129022, - 0xce949ad4, - 0xb84769ad, - 0x965bd862, - 0x82f3d055, - 0x66fb9767, - 0x15b80b4e, - 0x1d5b47a0, - 0x4cfde06f, - 0xc28ec4b8, - 0x57e8726e, - 0x647a78fc, - 0x99865d44, - 0x608bd593, - 0x6c200e03, - 0x39dc5ff6, - 0x5d0b00a3, - 0xae63aff2, - 0x7e8bd632, - 0x70108c0c, - 0xbbd35049, - 0x2998df04, - 0x980cf42a, - 0x9b6df491, - 0x9e7edd53, - 0x06918548, - 0x58cb7e07, - 0x3b74ef2e, - 0x522fffb1, - 0xd24708cc, - 0x1c7e27cd, - 0xa4eb215b, - 0x3cf1d2e2, - 0x19b47a38, - 0x424f7618, - 0x35856039, - 0x9d17dee7, - 0x27eb35e6, - 0xc9aff67b, - 0x36baf5b8, - 0x09c467cd, - 0xc18910b1, - 0xe11dbf7b, - 0x06cd1af8, - 0x7170c608, - 0x2d5e3354, - 0xd4de495a, - 0x64c6d006, - 0xbcc0c62c, - 0x3dd00db3, - 0x708f8f34, - 0x77d51b42, - 0x264f620f, - 0x24b8d2bf, - 0x15c1b79e, - 0x46a52564, - 0xf8d7e54e, - 0x3e378160, - 0x7895cda5, - 0x859c15a5, - 0xe6459788, - 0xc37bc75f, - 0xdb07ba0c, - 0x0676a3ab, - 0x7f229b1e, - 0x31842e7b, - 0x24259fd7, - 0xf8bef472, - 0x835ffcb8, - 0x6df4c1f2, - 0x96f5b195, - 0xfd0af0fc, - 0xb0fe134c, - 0xe2506d3d, - 0x4f9b12ea, - 0xf215f225, - 0xa223736f, - 0x9fb4c428, - 0x25d04979, - 0x34c713f8, - 0xc4618187, - 0xea7a6e98, - 0x7cd16efc, - 0x1436876c, - 0xf1544107, - 0xbedeee14, - 0x56e9af27, - 0xa04aa441, - 0x3cf7c899, - 0x92ecbae6, - 0xdd67016d, - 0x151682eb, - 0xa842eedf, - 0xfdba60b4, - 0xf1907b75, - 0x20e3030f, - 0x24d8c29e, - 0xe139673b, - 0xefa63fb8, - 0x71873054, - 0xb6f2cf3b, - 0x9f326442, - 0xcb15a4cc, - 0xb01a4504, - 0xf1e47d8d, - 0x844a1be5, - 0xbae7dfdc, - 0x42cbda70, - 0xcd7dae0a, - 0x57e85b7a, - 0xd53f5af6, - 0x20cf4d8c, - 0xcea4d428, - 0x79d130a4, - 0x3486ebfb, - 0x33d3cddc, - 0x77853b53, - 0x37effcb5, - 0xc5068778, - 0xe580b3e6, - 0x4e68b8f4, - 0xc5c8b37e, - 0x0d809ea2, - 0x398feb7c, - 0x132a4f94, - 0x43b7950e, - 0x2fee7d1c, - 0x223613bd, - 0xdd06caa2, - 0x37df932b, - 0xc4248289, - 0xacf3ebc3, - 0x5715f6b7, - 0xef3478dd, - 0xf267616f, - 0xc148cbe4, - 0x9052815e, - 0x5e410fab, - 0xb48a2465, - 0x2eda7fa4, - 0xe87b40e4, - 0xe98ea084, - 0x5889e9e1, - 0xefd390fc, - 0xdd07d35b, - 0xdb485694, - 0x38d7e5b2, - 0x57720101, - 0x730edebc, - 0x5b643113, - 0x94917e4f, - 0x503c2fba, - 0x646f1282, - 0x7523d24a, - 0xe0779695, - 0xf9c17a8f, - 0x7a5b2121, - 0xd187b896, - 0x29263a4d, - 0xba510cdf, - 0x81f47c9f, - 0xad1163ed, - 0xea7b5965, - 0x1a00726e, - 0x11403092, - 0x00da6d77, - 0x4a0cdd61, - 0xad1f4603, - 0x605bdfb0, - 0x9eedc364, - 0x22ebe6a8, - 0xcee7d28a, - 0xa0e736a0, - 0x5564a6b9, - 0x10853209, - 0xc7eb8f37, - 0x2de705ca, - 0x8951570f, - 0xdf09822b, - 0xbd691a6c, - 0xaa12e4f2, - 0x87451c0f, - 0xe0f6a27a, - 0x3ada4819, - 0x4cf1764f, - 0x0d771c2b, - 0x67cdb156, - 0x350d8384, - 0x5938fa0f, - 0x42399ef3, - 0x36997b07, - 0x0e84093d, - 0x4aa93e61, - 0x8360d87b, - 0x1fa98b0c, - 0x1149382c, - 0xe97625a5, - 0x0614d1b7, - 0x0e25244b, - 0x0c768347, - 0x589e8d82, - 0x0d2059d1, - 0xa466bb1e, - 0xf8da0a82, - 0x04f19130, - 0xba6e4ec0, - 0x99265164, - 0x1ee7230d, - 0x50b2ad80, - 0xeaee6801, - 0x8db2a283, - 0xea8bf59e, + 0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5, + 0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc, + 0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd, + 0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d, + 0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2, + 0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862, + 0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc, + 0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c, + 0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e, + 0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039, + 0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8, + 0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42, + 0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5, + 0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472, + 0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225, + 0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c, + 0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb, + 0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054, + 0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70, + 0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc, + 0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c, + 0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3, + 0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4, + 0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101, + 0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f, + 0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e, + 0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a, + 0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c, + 0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384, + 0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c, + 0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82, + 0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e }; diff --git a/crypto/openssl/crypto/cms/cms_enc.c b/crypto/openssl/crypto/cms/cms_enc.c index 367617576175..450d8df43f66 100644 --- a/crypto/openssl/crypto/cms/cms_enc.c +++ b/crypto/openssl/crypto/cms/cms_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/cms/cms_env.c b/crypto/openssl/crypto/cms/cms_env.c index d2eace4fef5d..42f2552e79e2 100644 --- a/crypto/openssl/crypto/cms/cms_env.c +++ b/crypto/openssl/crypto/cms/cms_env.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/cms/cms_pwri.c b/crypto/openssl/crypto/cms/cms_pwri.c index 8b0ea233fd6d..2f365b1a704c 100644 --- a/crypto/openssl/crypto/cms/cms_pwri.c +++ b/crypto/openssl/crypto/cms/cms_pwri.c @@ -1,5 +1,5 @@ /* - * Copyright 2009-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2009-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/crmf/crmf_lib.c b/crypto/openssl/crypto/crmf/crmf_lib.c index 2b57f9956f9f..2c42d374976f 100644 --- a/crypto/openssl/crypto/crmf/crmf_lib.c +++ b/crypto/openssl/crypto/crmf/crmf_lib.c @@ -1,5 +1,5 @@ /*- - * Copyright 2007-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2007-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright Nokia 2007-2018 * Copyright Siemens AG 2015-2019 * @@ -601,6 +601,7 @@ X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecer EVP_CIPHER *cipher = NULL; /* used cipher */ int cikeysize = 0; /* key size from cipher */ unsigned char *iv = NULL; /* initial vector for symmetric encryption */ + int iv_len; /* iv length */ unsigned char *outbuf = NULL; /* decryption output buffer */ const unsigned char *p = NULL; /* needed for decoding ASN1 */ int n, outlen = 0; @@ -655,11 +656,13 @@ X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecer } else { goto end; } - if ((iv = OPENSSL_malloc(EVP_CIPHER_get_iv_length(cipher))) == NULL) + + iv_len = EVP_CIPHER_get_iv_length(cipher); + if ((iv = OPENSSL_malloc(iv_len)) == NULL) goto end; - if (ASN1_TYPE_get_octetstring(ecert->symmAlg->parameter, iv, - EVP_CIPHER_get_iv_length(cipher)) - != EVP_CIPHER_get_iv_length(cipher)) { + if (ecert->symmAlg->parameter == NULL + || ASN1_TYPE_get_octetstring(ecert->symmAlg->parameter, iv, iv_len) + != iv_len) { ERR_raise(ERR_LIB_CRMF, CRMF_R_MALFORMED_IV); goto end; } diff --git a/crypto/openssl/crypto/des/fcrypt.c b/crypto/openssl/crypto/des/fcrypt.c index ebf5ce0ee000..09740de63060 100644 --- a/crypto/openssl/crypto/des/fcrypt.c +++ b/crypto/openssl/crypto/des/fcrypt.c @@ -1,5 +1,5 @@ /* - * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -32,134 +32,19 @@ * implementations do. */ static const unsigned char con_salt[128] = { - 0xD2, - 0xD3, - 0xD4, - 0xD5, - 0xD6, - 0xD7, - 0xD8, - 0xD9, - 0xDA, - 0xDB, - 0xDC, - 0xDD, - 0xDE, - 0xDF, - 0xE0, - 0xE1, - 0xE2, - 0xE3, - 0xE4, - 0xE5, - 0xE6, - 0xE7, - 0xE8, - 0xE9, - 0xEA, - 0xEB, - 0xEC, - 0xED, - 0xEE, - 0xEF, - 0xF0, - 0xF1, - 0xF2, - 0xF3, - 0xF4, - 0xF5, - 0xF6, - 0xF7, - 0xF8, - 0xF9, - 0xFA, - 0xFB, - 0xFC, - 0xFD, - 0xFE, - 0xFF, - 0x00, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0A, - 0x0B, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0A, - 0x0B, - 0x0C, - 0x0D, - 0x0E, - 0x0F, - 0x10, - 0x11, - 0x12, - 0x13, - 0x14, - 0x15, - 0x16, - 0x17, - 0x18, - 0x19, - 0x1A, - 0x1B, - 0x1C, - 0x1D, - 0x1E, - 0x1F, - 0x20, - 0x21, - 0x22, - 0x23, - 0x24, - 0x25, - 0x20, - 0x21, - 0x22, - 0x23, - 0x24, - 0x25, - 0x26, - 0x27, - 0x28, - 0x29, - 0x2A, - 0x2B, - 0x2C, - 0x2D, - 0x2E, - 0x2F, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, - 0x3A, - 0x3B, - 0x3C, - 0x3D, - 0x3E, - 0x3F, - 0x40, - 0x41, - 0x42, - 0x43, - 0x44, + 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, + 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, + 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, + 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0x00, 0x01, 0x02, 0x03, + 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x05, 0x06, + 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, + 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44 }; static const unsigned char cov_2char[64] = { diff --git a/crypto/openssl/crypto/ec/curve448/scalar.c b/crypto/openssl/crypto/ec/curve448/scalar.c index 191b0b4fd2cf..cad2a4c465b1 100644 --- a/crypto/openssl/crypto/ec/curve448/scalar.c +++ b/crypto/openssl/crypto/ec/curve448/scalar.c @@ -1,5 +1,5 @@ /* - * Copyright 2017-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2015-2016 Cryptography Research, Inc. * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -213,6 +213,7 @@ void ossl_curve448_scalar_halve(curve448_scalar_t out, const curve448_scalar_t a c448_dword_t chain = 0; unsigned int i; + mask = value_barrier_c448(mask); for (i = 0; i < C448_SCALAR_LIMBS; i++) { chain = (chain + a->limb[i]) + (sc_p->limb[i] & mask); out->limb[i] = (c448_word_t)chain; diff --git a/crypto/openssl/crypto/ec/curve448/word.h b/crypto/openssl/crypto/ec/curve448/word.h index 8137be6abb8e..df533f2b36d3 100644 --- a/crypto/openssl/crypto/ec/curve448/word.h +++ b/crypto/openssl/crypto/ec/curve448/word.h @@ -1,5 +1,5 @@ /* - * Copyright 2017-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2014 Cryptography Research, Inc. * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -18,6 +18,7 @@ #include <stdlib.h> #include <openssl/e_os2.h> #include "curve448utils.h" +#include "internal/constant_time.h" #ifdef INT128_MAX #include "arch_64/arch_intrinsics.h" @@ -53,6 +54,12 @@ typedef int64_t dsword_t; #error "For now we only support 32- and 64-bit architectures." #endif +#if C448_WORD_BITS == 64 +#define value_barrier_c448(x) value_barrier_64(x) +#elif C448_WORD_BITS == 32 +#define value_barrier_c448(x) value_barrier_32(x) +#endif + /* * The plan on booleans: The external interface uses c448_bool_t, but this * might be a different size than our particular arch's word_t (and thus diff --git a/crypto/openssl/crypto/ec/ec_curve.c b/crypto/openssl/crypto/ec/ec_curve.c index 3ba009db7b02..842d74028800 100644 --- a/crypto/openssl/crypto/ec/ec_curve.c +++ b/crypto/openssl/crypto/ec/ec_curve.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -2487,208 +2487,38 @@ static const struct { unsigned char data[0 + 32 * 6]; } _EC_sm2p256v1 = { { NID_X9_62_prime_field, 0, 32, 1 }, - { - /* no seed */ + { /* no seed */ /* p */ - 0xff, - 0xff, - 0xff, - 0xfe, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0x00, - 0x00, - 0x00, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, + 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, /* a */ - 0xff, - 0xff, - 0xff, - 0xfe, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0x00, - 0x00, - 0x00, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xfc, + 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfc, /* b */ - 0x28, - 0xe9, - 0xfa, - 0x9e, - 0x9d, - 0x9f, - 0x5e, - 0x34, - 0x4d, - 0x5a, - 0x9e, - 0x4b, - 0xcf, - 0x65, - 0x09, - 0xa7, - 0xf3, - 0x97, - 0x89, - 0xf5, - 0x15, - 0xab, - 0x8f, - 0x92, - 0xdd, - 0xbc, - 0xbd, - 0x41, - 0x4d, - 0x94, - 0x0e, - 0x93, + 0x28, 0xe9, 0xfa, 0x9e, 0x9d, 0x9f, 0x5e, 0x34, 0x4d, 0x5a, + 0x9e, 0x4b, 0xcf, 0x65, 0x09, 0xa7, 0xf3, 0x97, 0x89, 0xf5, + 0x15, 0xab, 0x8f, 0x92, 0xdd, 0xbc, 0xbd, 0x41, 0x4d, 0x94, + 0x0e, 0x93, /* x */ - 0x32, - 0xc4, - 0xae, - 0x2c, - 0x1f, - 0x19, - 0x81, - 0x19, - 0x5f, - 0x99, - 0x04, - 0x46, - 0x6a, - 0x39, - 0xc9, - 0x94, - 0x8f, - 0xe3, - 0x0b, - 0xbf, - 0xf2, - 0x66, - 0x0b, - 0xe1, - 0x71, - 0x5a, - 0x45, - 0x89, - 0x33, - 0x4c, - 0x74, - 0xc7, + 0x32, 0xc4, 0xae, 0x2c, 0x1f, 0x19, 0x81, 0x19, 0x5f, 0x99, + 0x04, 0x46, 0x6a, 0x39, 0xc9, 0x94, 0x8f, 0xe3, 0x0b, 0xbf, + 0xf2, 0x66, 0x0b, 0xe1, 0x71, 0x5a, 0x45, 0x89, 0x33, 0x4c, + 0x74, 0xc7, /* y */ - 0xbc, - 0x37, - 0x36, - 0xa2, - 0xf4, - 0xf6, - 0x77, - 0x9c, - 0x59, - 0xbd, - 0xce, - 0xe3, - 0x6b, - 0x69, - 0x21, - 0x53, - 0xd0, - 0xa9, - 0x87, - 0x7c, - 0xc6, - 0x2a, - 0x47, - 0x40, - 0x02, - 0xdf, - 0x32, - 0xe5, - 0x21, - 0x39, - 0xf0, - 0xa0, + 0xbc, 0x37, 0x36, 0xa2, 0xf4, 0xf6, 0x77, 0x9c, 0x59, 0xbd, + 0xce, 0xe3, 0x6b, 0x69, 0x21, 0x53, 0xd0, 0xa9, 0x87, 0x7c, + 0xc6, 0x2a, 0x47, 0x40, 0x02, 0xdf, 0x32, 0xe5, 0x21, 0x39, + 0xf0, 0xa0, /* order */ - 0xff, - 0xff, - 0xff, - 0xfe, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0x72, - 0x03, - 0xdf, - 0x6b, - 0x21, - 0xc6, - 0x05, - 0x2b, - 0x53, - 0xbb, - 0xf4, - 0x09, - 0x39, - 0xd5, - 0x41, - 0x23, - } + 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x72, 0x03, 0xdf, 0x6b, + 0x21, 0xc6, 0x05, 0x2b, 0x53, 0xbb, 0xf4, 0x09, 0x39, 0xd5, + 0x41, 0x23 } }; #endif /* OPENSSL_NO_SM2 */ diff --git a/crypto/openssl/crypto/ec/ec_lib.c b/crypto/openssl/crypto/ec/ec_lib.c index b59f180c3da8..0b23391c159c 100644 --- a/crypto/openssl/crypto/ec/ec_lib.c +++ b/crypto/openssl/crypto/ec/ec_lib.c @@ -1680,7 +1680,8 @@ EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[], /* generator base point */ ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_GENERATOR); if (ptmp == NULL - || ptmp->data_type != OSSL_PARAM_OCTET_STRING) { + || ptmp->data_type != OSSL_PARAM_OCTET_STRING + || ptmp->data_size == 0) { ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR); goto err; } diff --git a/crypto/openssl/crypto/ec/ecp_s390x_nistp.c b/crypto/openssl/crypto/ec/ecp_s390x_nistp.c index bfcbbe171662..e3651d718e0c 100644 --- a/crypto/openssl/crypto/ec/ecp_s390x_nistp.c +++ b/crypto/openssl/crypto/ec/ecp_s390x_nistp.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -142,9 +142,24 @@ static ECDSA_SIG *ecdsa_s390x_nistp_sign_sig(const unsigned char *dgst, const BIGNUM *privkey; int off; + if (dgstlen < 0) { + ERR_raise(ERR_LIB_EC, EC_R_INVALID_LENGTH); + return NULL; + } + + if (eckey == NULL) { + ERR_raise(ERR_LIB_EC, EC_R_MISSING_PARAMETERS); + return NULL; + } + group = EC_KEY_get0_group(eckey); + if (group == NULL) { + ERR_raise(ERR_LIB_EC, EC_R_MISSING_PARAMETERS); + return NULL; + } + privkey = EC_KEY_get0_private_key(eckey); - if (group == NULL || privkey == NULL) { + if (privkey == NULL) { ERR_raise(ERR_LIB_EC, EC_R_MISSING_PARAMETERS); return NULL; } @@ -239,9 +254,24 @@ static int ecdsa_s390x_nistp_verify_sig(const unsigned char *dgst, int dgstlen, const EC_POINT *pubkey; int off; + if (dgstlen < 0) { + ERR_raise(ERR_LIB_EC, EC_R_INVALID_LENGTH); + return -1; + } + + if (sig == NULL || eckey == NULL) { + ERR_raise(ERR_LIB_EC, EC_R_MISSING_PARAMETERS); + return -1; + } + group = EC_KEY_get0_group(eckey); + if (group == NULL) { + ERR_raise(ERR_LIB_EC, EC_R_MISSING_PARAMETERS); + return -1; + } + pubkey = EC_KEY_get0_public_key(eckey); - if (eckey == NULL || group == NULL || pubkey == NULL || sig == NULL) { + if (pubkey == NULL) { ERR_raise(ERR_LIB_EC, EC_R_MISSING_PARAMETERS); return -1; } diff --git a/crypto/openssl/crypto/evp/e_aes.c b/crypto/openssl/crypto/evp/e_aes.c index f7b6ffbb43c1..875061e7d886 100644 --- a/crypto/openssl/crypto/evp/e_aes.c +++ b/crypto/openssl/crypto/evp/e_aes.c @@ -1376,7 +1376,7 @@ static int s390x_aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) return 1; case EVP_CTRL_AEAD_SET_IVLEN: - if (arg <= 0) + if (arg <= 0 || arg > EVP_MAX_IV_LENGTH) return 0; if (arg != 12) { diff --git a/crypto/openssl/crypto/evp/encode.c b/crypto/openssl/crypto/evp/encode.c index 8e20873e2711..a0180c43db1c 100644 --- a/crypto/openssl/crypto/evp/encode.c +++ b/crypto/openssl/crypto/evp/encode.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -67,265 +67,35 @@ static const unsigned char srpdata_bin2ascii[65] = "0123456789ABCDEFGHIJKLMNOPQR #define B64_BASE64(a) (!B64_NOT_BASE64(a)) static const unsigned char data_ascii2bin[128] = { - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xE0, - 0xF0, - 0xFF, - 0xFF, - 0xF1, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xE0, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0x3E, - 0xFF, - 0xF2, - 0xFF, - 0x3F, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, - 0x3A, - 0x3B, - 0x3C, - 0x3D, - 0xFF, - 0xFF, - 0xFF, - 0x00, - 0xFF, - 0xFF, - 0xFF, - 0x00, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0A, - 0x0B, - 0x0C, - 0x0D, - 0x0E, - 0x0F, - 0x10, - 0x11, - 0x12, - 0x13, - 0x14, - 0x15, - 0x16, - 0x17, - 0x18, - 0x19, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0x1A, - 0x1B, - 0x1C, - 0x1D, - 0x1E, - 0x1F, - 0x20, - 0x21, - 0x22, - 0x23, - 0x24, - 0x25, - 0x26, - 0x27, - 0x28, - 0x29, - 0x2A, - 0x2B, - 0x2C, - 0x2D, - 0x2E, - 0x2F, - 0x30, - 0x31, - 0x32, - 0x33, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, + 0xF0, 0xFF, 0xFF, 0xF1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x3E, 0xFF, 0xF2, 0xFF, 0x3F, 0x34, 0x35, + 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0xFF, 0xFF, + 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, + 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, + 0x31, 0x32, 0x33, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; static const unsigned char srpdata_ascii2bin[128] = { - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xE0, - 0xF0, - 0xFF, - 0xFF, - 0xF1, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xE0, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xF2, - 0x3E, - 0x3F, - 0x00, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0xFF, - 0xFF, - 0xFF, - 0x00, - 0xFF, - 0xFF, - 0xFF, - 0x0A, - 0x0B, - 0x0C, - 0x0D, - 0x0E, - 0x0F, - 0x10, - 0x11, - 0x12, - 0x13, - 0x14, - 0x15, - 0x16, - 0x17, - 0x18, - 0x19, - 0x1A, - 0x1B, - 0x1C, - 0x1D, - 0x1E, - 0x1F, - 0x20, - 0x21, - 0x22, - 0x23, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0x24, - 0x25, - 0x26, - 0x27, - 0x28, - 0x29, - 0x2A, - 0x2B, - 0x2C, - 0x2D, - 0x2E, - 0x2F, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, - 0x3A, - 0x3B, - 0x3C, - 0x3D, - 0xFF, - 0xFF, - 0xFF, - 0xFF, - 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, + 0xF0, 0xFF, 0xFF, 0xF1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x3E, 0x3F, 0x00, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0xFF, + 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, + 0x23, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, + 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, + 0x3B, 0x3C, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; #ifndef CHARSET_EBCDIC diff --git a/crypto/openssl/crypto/evp/evp_lib.c b/crypto/openssl/crypto/evp/evp_lib.c index 060f92b328ee..95b8bf327488 100644 --- a/crypto/openssl/crypto/evp/evp_lib.c +++ b/crypto/openssl/crypto/evp/evp_lib.c @@ -318,7 +318,7 @@ int EVP_CIPHER_get_type(const EVP_CIPHER *cipher) case NID_des_ede3_cfb8: case NID_des_ede3_cfb1: - return NID_des_cfb64; + return NID_des_ede3_cfb64; default: #ifdef FIPS_MODULE diff --git a/crypto/openssl/crypto/ffc/ffc_params.c b/crypto/openssl/crypto/ffc/ffc_params.c index 88b0612d4182..0936875ea05c 100644 --- a/crypto/openssl/crypto/ffc/ffc_params.c +++ b/crypto/openssl/crypto/ffc/ffc_params.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -178,8 +178,10 @@ int ossl_ffc_params_copy(FFC_PARAMS *dst, const FFC_PARAMS *src) if (!ffc_bn_cpy(&dst->p, src->p) || !ffc_bn_cpy(&dst->g, src->g) || !ffc_bn_cpy(&dst->q, src->q) - || !ffc_bn_cpy(&dst->j, src->j)) + || !ffc_bn_cpy(&dst->j, src->j)) { + ossl_ffc_params_cleanup(dst); return 0; + } dst->mdname = src->mdname; dst->mdprops = src->mdprops; @@ -187,8 +189,10 @@ int ossl_ffc_params_copy(FFC_PARAMS *dst, const FFC_PARAMS *src) dst->seedlen = src->seedlen; if (src->seed != NULL) { dst->seed = OPENSSL_memdup(src->seed, src->seedlen); - if (dst->seed == NULL) + if (dst->seed == NULL) { + ossl_ffc_params_cleanup(dst); return 0; + } } else { dst->seed = NULL; } diff --git a/crypto/openssl/crypto/http/http_client.c b/crypto/openssl/crypto/http/http_client.c index 615df58a80a2..251e05414048 100644 --- a/crypto/openssl/crypto/http/http_client.c +++ b/crypto/openssl/crypto/http/http_client.c @@ -87,6 +87,16 @@ struct ossl_http_req_ctx_st { /* Low-level HTTP API implementation */ +static int no_crlf(const char *component, const char *value) +{ + if (value != NULL && strpbrk(value, "\r\n") != NULL) { + ERR_raise_data(ERR_LIB_HTTP, ERR_R_PASSED_INVALID_ARGUMENT, + "CR or LF character in %s", component); + return 0; + } + return 1; +} + OSSL_HTTP_REQ_CTX *OSSL_HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int buf_size) { OSSL_HTTP_REQ_CTX *rctx; @@ -175,6 +185,10 @@ int OSSL_HTTP_REQ_CTX_set_request_line(OSSL_HTTP_REQ_CTX *rctx, int method_POST, ERR_raise(ERR_LIB_HTTP, ERR_R_PASSED_NULL_PARAMETER); return 0; } + if (!no_crlf("server", server) + || !no_crlf("port", port) + || !no_crlf("path", path)) + return 0; BIO_free(rctx->mem); if ((rctx->mem = BIO_new(BIO_s_mem())) == NULL) return 0; @@ -228,6 +242,9 @@ int OSSL_HTTP_REQ_CTX_add1_header(OSSL_HTTP_REQ_CTX *rctx, ERR_raise(ERR_LIB_HTTP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; } + if (!no_crlf("header name", name) + || !no_crlf("header value", value)) + return 0; if (BIO_puts(rctx->mem, name) <= 0) return 0; @@ -297,7 +314,7 @@ static int set1_content(OSSL_HTTP_REQ_CTX *rctx, } if (content_type != NULL - && BIO_printf(rctx->mem, "Content-Type: %s\r\n", content_type) <= 0) + && !OSSL_HTTP_REQ_CTX_add1_header(rctx, "Content-Type", content_type)) return 0; /* @@ -1307,11 +1324,11 @@ int OSSL_HTTP_proxy_connect(BIO *bio, const char *server, const char *port, { #undef BUF_SIZE #define BUF_SIZE (8 * 1024) - char *mbuf = OPENSSL_malloc(BUF_SIZE); + char *mbuf = NULL; char *mbufp; int read_len = 0; int ret = 0; - BIO *fbio = BIO_new(BIO_f_buffer()); + BIO *fbio = NULL; int rv; time_t max_time = timeout > 0 ? time(NULL) + timeout : 0; @@ -1322,8 +1339,11 @@ int OSSL_HTTP_proxy_connect(BIO *bio, const char *server, const char *port, } if (port == NULL || *port == '\0') port = OSSL_HTTPS_PORT; + if (!no_crlf("server", server) || !no_crlf("port", port)) + goto end; - if (mbuf == NULL || fbio == NULL) { + if ((mbuf = OPENSSL_malloc(BUF_SIZE)) == NULL + || (fbio = BIO_new(BIO_f_buffer())) == NULL) { BIO_printf(bio_err /* may be NULL */, "%s: out of memory", prog); goto end; } diff --git a/crypto/openssl/crypto/http/http_lib.c b/crypto/openssl/crypto/http/http_lib.c index 8a5f1e3f32b1..d1bdcab87629 100644 --- a/crypto/openssl/crypto/http/http_lib.c +++ b/crypto/openssl/crypto/http/http_lib.c @@ -275,6 +275,9 @@ static int use_proxy(const char *no_proxy, const char *server) server = host; } + if (sl == 0) + return 1; + /* * using environment variable names, both lowercase and uppercase variants, * compatible with other HTTP client implementations like wget, curl and git diff --git a/crypto/openssl/crypto/md2/md2_dgst.c b/crypto/openssl/crypto/md2/md2_dgst.c index 61c4b72507a7..6fb24e32dd5e 100644 --- a/crypto/openssl/crypto/md2/md2_dgst.c +++ b/crypto/openssl/crypto/md2/md2_dgst.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -32,262 +32,32 @@ static void md2_block(MD2_CTX *c, const unsigned char *d); * a random byte string. */ static const MD2_INT S[256] = { - 0x29, - 0x2E, - 0x43, - 0xC9, - 0xA2, - 0xD8, - 0x7C, - 0x01, - 0x3D, - 0x36, - 0x54, - 0xA1, - 0xEC, - 0xF0, - 0x06, - 0x13, - 0x62, - 0xA7, - 0x05, - 0xF3, - 0xC0, - 0xC7, - 0x73, - 0x8C, - 0x98, - 0x93, - 0x2B, - 0xD9, - 0xBC, - 0x4C, - 0x82, - 0xCA, - 0x1E, - 0x9B, - 0x57, - 0x3C, - 0xFD, - 0xD4, - 0xE0, - 0x16, - 0x67, - 0x42, - 0x6F, - 0x18, - 0x8A, - 0x17, - 0xE5, - 0x12, - 0xBE, - 0x4E, - 0xC4, - 0xD6, - 0xDA, - 0x9E, - 0xDE, - 0x49, - 0xA0, - 0xFB, - 0xF5, - 0x8E, - 0xBB, - 0x2F, - 0xEE, - 0x7A, - 0xA9, - 0x68, - 0x79, - 0x91, - 0x15, - 0xB2, - 0x07, - 0x3F, - 0x94, - 0xC2, - 0x10, - 0x89, - 0x0B, - 0x22, - 0x5F, - 0x21, - 0x80, - 0x7F, - 0x5D, - 0x9A, - 0x5A, - 0x90, - 0x32, - 0x27, - 0x35, - 0x3E, - 0xCC, - 0xE7, - 0xBF, - 0xF7, - 0x97, - 0x03, - 0xFF, - 0x19, - 0x30, - 0xB3, - 0x48, - 0xA5, - 0xB5, - 0xD1, - 0xD7, - 0x5E, - 0x92, - 0x2A, - 0xAC, - 0x56, - 0xAA, - 0xC6, - 0x4F, - 0xB8, - 0x38, - 0xD2, - 0x96, - 0xA4, - 0x7D, - 0xB6, - 0x76, - 0xFC, - 0x6B, - 0xE2, - 0x9C, - 0x74, - 0x04, - 0xF1, - 0x45, - 0x9D, - 0x70, - 0x59, - 0x64, - 0x71, - 0x87, - 0x20, - 0x86, - 0x5B, - 0xCF, - 0x65, - 0xE6, - 0x2D, - 0xA8, - 0x02, - 0x1B, - 0x60, - 0x25, - 0xAD, - 0xAE, - 0xB0, - 0xB9, - 0xF6, - 0x1C, - 0x46, - 0x61, - 0x69, - 0x34, - 0x40, - 0x7E, - 0x0F, - 0x55, - 0x47, - 0xA3, - 0x23, - 0xDD, - 0x51, - 0xAF, - 0x3A, - 0xC3, - 0x5C, - 0xF9, - 0xCE, - 0xBA, - 0xC5, - 0xEA, - 0x26, - 0x2C, - 0x53, - 0x0D, - 0x6E, - 0x85, - 0x28, - 0x84, - 0x09, - 0xD3, - 0xDF, - 0xCD, - 0xF4, - 0x41, - 0x81, - 0x4D, - 0x52, - 0x6A, - 0xDC, - 0x37, - 0xC8, - 0x6C, - 0xC1, - 0xAB, - 0xFA, - 0x24, - 0xE1, - 0x7B, - 0x08, - 0x0C, - 0xBD, - 0xB1, - 0x4A, - 0x78, - 0x88, - 0x95, - 0x8B, - 0xE3, - 0x63, - 0xE8, - 0x6D, - 0xE9, - 0xCB, - 0xD5, - 0xFE, - 0x3B, - 0x00, - 0x1D, - 0x39, - 0xF2, - 0xEF, - 0xB7, - 0x0E, - 0x66, - 0x58, - 0xD0, - 0xE4, - 0xA6, - 0x77, - 0x72, - 0xF8, - 0xEB, - 0x75, - 0x4B, - 0x0A, - 0x31, - 0x44, - 0x50, - 0xB4, - 0x8F, - 0xED, - 0x1F, - 0x1A, - 0xDB, - 0x99, - 0x8D, - 0x33, - 0x9F, - 0x11, - 0x83, - 0x14, + 0x29, 0x2E, 0x43, 0xC9, 0xA2, 0xD8, 0x7C, 0x01, 0x3D, 0x36, + 0x54, 0xA1, 0xEC, 0xF0, 0x06, 0x13, 0x62, 0xA7, 0x05, 0xF3, + 0xC0, 0xC7, 0x73, 0x8C, 0x98, 0x93, 0x2B, 0xD9, 0xBC, 0x4C, + 0x82, 0xCA, 0x1E, 0x9B, 0x57, 0x3C, 0xFD, 0xD4, 0xE0, 0x16, + 0x67, 0x42, 0x6F, 0x18, 0x8A, 0x17, 0xE5, 0x12, 0xBE, 0x4E, + 0xC4, 0xD6, 0xDA, 0x9E, 0xDE, 0x49, 0xA0, 0xFB, 0xF5, 0x8E, + 0xBB, 0x2F, 0xEE, 0x7A, 0xA9, 0x68, 0x79, 0x91, 0x15, 0xB2, + 0x07, 0x3F, 0x94, 0xC2, 0x10, 0x89, 0x0B, 0x22, 0x5F, 0x21, + 0x80, 0x7F, 0x5D, 0x9A, 0x5A, 0x90, 0x32, 0x27, 0x35, 0x3E, + 0xCC, 0xE7, 0xBF, 0xF7, 0x97, 0x03, 0xFF, 0x19, 0x30, 0xB3, + 0x48, 0xA5, 0xB5, 0xD1, 0xD7, 0x5E, 0x92, 0x2A, 0xAC, 0x56, + 0xAA, 0xC6, 0x4F, 0xB8, 0x38, 0xD2, 0x96, 0xA4, 0x7D, 0xB6, + 0x76, 0xFC, 0x6B, 0xE2, 0x9C, 0x74, 0x04, 0xF1, 0x45, 0x9D, + 0x70, 0x59, 0x64, 0x71, 0x87, 0x20, 0x86, 0x5B, 0xCF, 0x65, + 0xE6, 0x2D, 0xA8, 0x02, 0x1B, 0x60, 0x25, 0xAD, 0xAE, 0xB0, + 0xB9, 0xF6, 0x1C, 0x46, 0x61, 0x69, 0x34, 0x40, 0x7E, 0x0F, + 0x55, 0x47, 0xA3, 0x23, 0xDD, 0x51, 0xAF, 0x3A, 0xC3, 0x5C, + 0xF9, 0xCE, 0xBA, 0xC5, 0xEA, 0x26, 0x2C, 0x53, 0x0D, 0x6E, + 0x85, 0x28, 0x84, 0x09, 0xD3, 0xDF, 0xCD, 0xF4, 0x41, 0x81, + 0x4D, 0x52, 0x6A, 0xDC, 0x37, 0xC8, 0x6C, 0xC1, 0xAB, 0xFA, + 0x24, 0xE1, 0x7B, 0x08, 0x0C, 0xBD, 0xB1, 0x4A, 0x78, 0x88, + 0x95, 0x8B, 0xE3, 0x63, 0xE8, 0x6D, 0xE9, 0xCB, 0xD5, 0xFE, + 0x3B, 0x00, 0x1D, 0x39, 0xF2, 0xEF, 0xB7, 0x0E, 0x66, 0x58, + 0xD0, 0xE4, 0xA6, 0x77, 0x72, 0xF8, 0xEB, 0x75, 0x4B, 0x0A, + 0x31, 0x44, 0x50, 0xB4, 0x8F, 0xED, 0x1F, 0x1A, 0xDB, 0x99, + 0x8D, 0x33, 0x9F, 0x11, 0x83, 0x14 }; const char *MD2_options(void) diff --git a/crypto/openssl/crypto/modes/wrap128.c b/crypto/openssl/crypto/modes/wrap128.c index 8b84e4709c62..0df4dfe786ae 100644 --- a/crypto/openssl/crypto/modes/wrap128.c +++ b/crypto/openssl/crypto/modes/wrap128.c @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2013-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -18,14 +18,7 @@ /** RFC 3394 section 2.2.3.1 Default Initial Value */ static const unsigned char default_iv[] = { - 0xA6, - 0xA6, - 0xA6, - 0xA6, - 0xA6, - 0xA6, - 0xA6, - 0xA6, + 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6 }; /** RFC 5649 section 3 Alternative Initial Value 32-bit constant */ @@ -178,7 +171,9 @@ size_t CRYPTO_128_unwrap(void *key, const unsigned char *iv, * * @param[in] key Key value. * @param[in] icv (Non-standard) IV, 4 bytes. NULL = use default_aiv. - * @param[out] out Ciphertext. Minimal buffer length = (inlen + 15) bytes. + * @param[out] out Ciphertext. Minimal buffer length = + * (inlen rounded up to 8 + 8) bytes, i.e. + * ((inlen + 7) / 8) * 8 + 8. * Input and output buffers can overlap if block function * supports that. * @param[in] in Plaintext as n 64-bit blocks, n >= 2. diff --git a/crypto/openssl/crypto/objects/obj_dat.c b/crypto/openssl/crypto/objects/obj_dat.c index f74f932b68d0..a797b8ed7771 100644 --- a/crypto/openssl/crypto/objects/obj_dat.c +++ b/crypto/openssl/crypto/objects/obj_dat.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -637,8 +637,8 @@ const void *OBJ_bsearch_ex_(const void *key, const void *base, int num, */ if (p == NULL) { const char *base_ = base; - int l, h, i = 0, c = 0; - char *p1; + int i = 0, c = 0; + const char *p1; for (i = 0; i < num; ++i) { p1 = &(base_[i * size]); diff --git a/crypto/openssl/crypto/param_build_set.c b/crypto/openssl/crypto/param_build_set.c index 75af15d943bc..0dc195d365eb 100644 --- a/crypto/openssl/crypto/param_build_set.c +++ b/crypto/openssl/crypto/param_build_set.c @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2020-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -73,6 +73,11 @@ int ossl_param_build_set_bn_pad(OSSL_PARAM_BLD *bld, OSSL_PARAM *p, return OSSL_PARAM_BLD_push_BN_pad(bld, key, bn, sz); p = OSSL_PARAM_locate(p, key); if (p != NULL) { + /* Size probe: NULL data means "report the required size". */ + if (p->data == NULL) { + p->return_size = sz; + return 1; + } if (sz > p->data_size) return 0; p->data_size = sz; diff --git a/crypto/openssl/crypto/pkcs12/p12_decr.c b/crypto/openssl/crypto/pkcs12/p12_decr.c index bb3542494e35..730048b839b3 100644 --- a/crypto/openssl/crypto/pkcs12/p12_decr.c +++ b/crypto/openssl/crypto/pkcs12/p12_decr.c @@ -97,7 +97,7 @@ unsigned char *PKCS12_pbe_crypt_ex(const X509_ALGOR *algor, if (EVP_CIPHER_CTX_is_encrypting(ctx)) { if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, (int)mac_len, out + outlen) - < 0) { + <= 0) { OPENSSL_free(out); out = NULL; ERR_raise(ERR_LIB_PKCS12, ERR_R_INTERNAL_ERROR); diff --git a/crypto/openssl/crypto/pkcs7/pk7_smime.c b/crypto/openssl/crypto/pkcs7/pk7_smime.c index fadf543e9db7..413ec1afe0bb 100644 --- a/crypto/openssl/crypto/pkcs7/pk7_smime.c +++ b/crypto/openssl/crypto/pkcs7/pk7_smime.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/rc2/rc2_skey.c b/crypto/openssl/crypto/rc2/rc2_skey.c index e82a7627a052..148753e55385 100644 --- a/crypto/openssl/crypto/rc2/rc2_skey.c +++ b/crypto/openssl/crypto/rc2/rc2_skey.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -17,262 +17,32 @@ #include "rc2_local.h" static const unsigned char key_table[256] = { - 0xd9, - 0x78, - 0xf9, - 0xc4, - 0x19, - 0xdd, - 0xb5, - 0xed, - 0x28, - 0xe9, - 0xfd, - 0x79, - 0x4a, - 0xa0, - 0xd8, - 0x9d, - 0xc6, - 0x7e, - 0x37, - 0x83, - 0x2b, - 0x76, - 0x53, - 0x8e, - 0x62, - 0x4c, - 0x64, - 0x88, - 0x44, - 0x8b, - 0xfb, - 0xa2, - 0x17, - 0x9a, - 0x59, - 0xf5, - 0x87, - 0xb3, - 0x4f, - 0x13, - 0x61, - 0x45, - 0x6d, - 0x8d, - 0x09, - 0x81, - 0x7d, - 0x32, - 0xbd, - 0x8f, - 0x40, - 0xeb, - 0x86, - 0xb7, - 0x7b, - 0x0b, - 0xf0, - 0x95, - 0x21, - 0x22, - 0x5c, - 0x6b, - 0x4e, - 0x82, - 0x54, - 0xd6, - 0x65, - 0x93, - 0xce, - 0x60, - 0xb2, - 0x1c, - 0x73, - 0x56, - 0xc0, - 0x14, - 0xa7, - 0x8c, - 0xf1, - 0xdc, - 0x12, - 0x75, - 0xca, - 0x1f, - 0x3b, - 0xbe, - 0xe4, - 0xd1, - 0x42, - 0x3d, - 0xd4, - 0x30, - 0xa3, - 0x3c, - 0xb6, - 0x26, - 0x6f, - 0xbf, - 0x0e, - 0xda, - 0x46, - 0x69, - 0x07, - 0x57, - 0x27, - 0xf2, - 0x1d, - 0x9b, - 0xbc, - 0x94, - 0x43, - 0x03, - 0xf8, - 0x11, - 0xc7, - 0xf6, - 0x90, - 0xef, - 0x3e, - 0xe7, - 0x06, - 0xc3, - 0xd5, - 0x2f, - 0xc8, - 0x66, - 0x1e, - 0xd7, - 0x08, - 0xe8, - 0xea, - 0xde, - 0x80, - 0x52, - 0xee, - 0xf7, - 0x84, - 0xaa, - 0x72, - 0xac, - 0x35, - 0x4d, - 0x6a, - 0x2a, - 0x96, - 0x1a, - 0xd2, - 0x71, - 0x5a, - 0x15, - 0x49, - 0x74, - 0x4b, - 0x9f, - 0xd0, - 0x5e, - 0x04, - 0x18, - 0xa4, - 0xec, - 0xc2, - 0xe0, - 0x41, - 0x6e, - 0x0f, - 0x51, - 0xcb, - 0xcc, - 0x24, - 0x91, - 0xaf, - 0x50, - 0xa1, - 0xf4, - 0x70, - 0x39, - 0x99, - 0x7c, - 0x3a, - 0x85, - 0x23, - 0xb8, - 0xb4, - 0x7a, - 0xfc, - 0x02, - 0x36, - 0x5b, - 0x25, - 0x55, - 0x97, - 0x31, - 0x2d, - 0x5d, - 0xfa, - 0x98, - 0xe3, - 0x8a, - 0x92, - 0xae, - 0x05, - 0xdf, - 0x29, - 0x10, - 0x67, - 0x6c, - 0xba, - 0xc9, - 0xd3, - 0x00, - 0xe6, - 0xcf, - 0xe1, - 0x9e, - 0xa8, - 0x2c, - 0x63, - 0x16, - 0x01, - 0x3f, - 0x58, - 0xe2, - 0x89, - 0xa9, - 0x0d, - 0x38, - 0x34, - 0x1b, - 0xab, - 0x33, - 0xff, - 0xb0, - 0xbb, - 0x48, - 0x0c, - 0x5f, - 0xb9, - 0xb1, - 0xcd, - 0x2e, - 0xc5, - 0xf3, - 0xdb, - 0x47, - 0xe5, - 0xa5, - 0x9c, - 0x77, - 0x0a, - 0xa6, - 0x20, - 0x68, - 0xfe, - 0x7f, - 0xc1, - 0xad, + 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, + 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d, 0xc6, 0x7e, 0x37, 0x83, + 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, + 0xfb, 0xa2, 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, + 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32, 0xbd, 0x8f, + 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, + 0x5c, 0x6b, 0x4e, 0x82, 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, + 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc, + 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, + 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26, 0x6f, 0xbf, 0x0e, 0xda, + 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, + 0x43, 0x03, 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, + 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7, 0x08, 0xe8, + 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, + 0x35, 0x4d, 0x6a, 0x2a, 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, + 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec, + 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, + 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39, 0x99, 0x7c, 0x3a, 0x85, + 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, + 0x97, 0x31, 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, + 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9, 0xd3, 0x00, + 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, + 0x58, 0xe2, 0x89, 0xa9, 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, + 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e, + 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, + 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad }; #if defined(_MSC_VER) && defined(_ARM_) diff --git a/crypto/openssl/crypto/sm2/sm2_crypt.c b/crypto/openssl/crypto/sm2/sm2_crypt.c index d1e8a1f42b2c..16c921b7c58a 100644 --- a/crypto/openssl/crypto/sm2/sm2_crypt.c +++ b/crypto/openssl/crypto/sm2/sm2_crypt.c @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2017 Ribose Inc. All Rights Reserved. * Ported from Ribose contributions from Botan. * @@ -261,12 +261,23 @@ again: goto done; } - ciphertext_leni = i2d_SM2_Ciphertext(&ctext_struct, &ciphertext_buf); + ciphertext_leni = i2d_SM2_Ciphertext(&ctext_struct, NULL); /* Ensure cast to size_t is safe */ if (ciphertext_leni < 0) { ERR_raise(ERR_LIB_SM2, ERR_R_INTERNAL_ERROR); goto done; } + + if (*ciphertext_len < (size_t)ciphertext_leni) { + ERR_raise(ERR_LIB_SM2, SM2_R_BUFFER_TOO_SMALL); + goto done; + } + + ciphertext_leni = i2d_SM2_Ciphertext(&ctext_struct, &ciphertext_buf); + if (ciphertext_leni < 0) { + ERR_raise(ERR_LIB_SM2, ERR_R_INTERNAL_ERROR); + goto done; + } *ciphertext_len = (size_t)ciphertext_leni; rc = 1; @@ -279,6 +290,7 @@ done: OPENSSL_free(x2y2); OPENSSL_free(C3); EVP_MD_CTX_free(hash); + BN_CTX_end(ctx); BN_CTX_free(ctx); EC_POINT_free(kG); EC_POINT_free(kP); @@ -421,6 +433,7 @@ done: OPENSSL_free(x2y2); OPENSSL_free(computed_C3); EC_POINT_free(C1); + BN_CTX_end(ctx); BN_CTX_free(ctx); SM2_Ciphertext_free(sm2_ctext); EVP_MD_CTX_free(hash); diff --git a/crypto/openssl/crypto/sm2/sm2_sign.c b/crypto/openssl/crypto/sm2/sm2_sign.c index de780d87328b..022b9c172532 100644 --- a/crypto/openssl/crypto/sm2/sm2_sign.c +++ b/crypto/openssl/crypto/sm2/sm2_sign.c @@ -1,5 +1,5 @@ /* - * Copyright 2017-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2017 Ribose Inc. All Rights Reserved. * Ported from Ribose contributions from Botan. * @@ -57,6 +57,7 @@ int ossl_sm2_compute_z_digest(uint8_t *out, goto done; } + BN_CTX_start(ctx); p = BN_CTX_get(ctx); a = BN_CTX_get(ctx); b = BN_CTX_get(ctx); @@ -140,6 +141,7 @@ int ossl_sm2_compute_z_digest(uint8_t *out, done: OPENSSL_free(buf); + BN_CTX_end(ctx); BN_CTX_free(ctx); EVP_MD_CTX_free(hash); return rc; @@ -315,6 +317,7 @@ done: BN_free(s); } + BN_CTX_end(ctx); BN_CTX_free(ctx); EC_POINT_free(kG); return sig; @@ -399,6 +402,7 @@ static int sm2_sig_verify(const EC_KEY *key, const ECDSA_SIG *sig, done: EC_POINT_free(pt); + BN_CTX_end(ctx); BN_CTX_free(ctx); return ret; } diff --git a/crypto/openssl/crypto/x509/v3_ist.c b/crypto/openssl/crypto/x509/v3_ist.c index 05baf8a0ff69..a474af92249a 100644 --- a/crypto/openssl/crypto/x509/v3_ist.c +++ b/crypto/openssl/crypto/x509/v3_ist.c @@ -48,7 +48,6 @@ static ISSUER_SIGN_TOOL *v2i_issuer_sign_tool(X509V3_EXT_METHOD *method, X509V3_ continue; } if (strcmp(cnf->name, "signTool") == 0) { - ist->signTool = ASN1_UTF8STRING_new(); if (ist->signTool == NULL || cnf->value == NULL || !ASN1_STRING_set(ist->signTool, cnf->value, strlen(cnf->value))) { @@ -56,7 +55,6 @@ static ISSUER_SIGN_TOOL *v2i_issuer_sign_tool(X509V3_EXT_METHOD *method, X509V3_ goto err; } } else if (strcmp(cnf->name, "cATool") == 0) { - ist->cATool = ASN1_UTF8STRING_new(); if (ist->cATool == NULL || cnf->value == NULL || !ASN1_STRING_set(ist->cATool, cnf->value, strlen(cnf->value))) { @@ -64,7 +62,6 @@ static ISSUER_SIGN_TOOL *v2i_issuer_sign_tool(X509V3_EXT_METHOD *method, X509V3_ goto err; } } else if (strcmp(cnf->name, "signToolCert") == 0) { - ist->signToolCert = ASN1_UTF8STRING_new(); if (ist->signToolCert == NULL || cnf->value == NULL || !ASN1_STRING_set(ist->signToolCert, cnf->value, strlen(cnf->value))) { @@ -72,7 +69,6 @@ static ISSUER_SIGN_TOOL *v2i_issuer_sign_tool(X509V3_EXT_METHOD *method, X509V3_ goto err; } } else if (strcmp(cnf->name, "cAToolCert") == 0) { - ist->cAToolCert = ASN1_UTF8STRING_new(); if (ist->cAToolCert == NULL || cnf->value == NULL || !ASN1_STRING_set(ist->cAToolCert, cnf->value, strlen(cnf->value))) { diff --git a/crypto/openssl/demos/cipher/aeskeywrap.c b/crypto/openssl/demos/cipher/aeskeywrap.c index a475debe84bc..12a471f93468 100644 --- a/crypto/openssl/demos/cipher/aeskeywrap.c +++ b/crypto/openssl/demos/cipher/aeskeywrap.c @@ -1,5 +1,5 @@ /* - * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2022-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -27,102 +27,24 @@ static const unsigned char wrap_key[] = { /* Unique initialisation vector */ static const unsigned char wrap_iv[] = { - 0x99, - 0xaa, - 0x3e, - 0x68, - 0xed, - 0x81, - 0x73, - 0xa0, - 0xee, - 0xd0, - 0x66, - 0x84, - 0x99, - 0xaa, - 0x3e, - 0x68, + 0x99, 0xaa, 0x3e, 0x68, 0xed, 0x81, 0x73, 0xa0, 0xee, 0xd0, + 0x66, 0x84, 0x99, 0xaa, 0x3e, 0x68 }; /* Example plaintext to encrypt */ static const unsigned char wrap_pt[] = { - 0xad, - 0x4f, - 0xc9, - 0xfc, - 0x77, - 0x69, - 0xc9, - 0xea, - 0xfc, - 0xdf, - 0x00, - 0xac, - 0x34, - 0xec, - 0x40, - 0xbc, - 0x28, - 0x3f, - 0xa4, - 0x5e, - 0xd8, - 0x99, - 0xe4, - 0x5d, - 0x5e, - 0x7a, - 0xc4, - 0xe6, - 0xca, - 0x7b, - 0xa5, - 0xb7, + 0xad, 0x4f, 0xc9, 0xfc, 0x77, 0x69, 0xc9, 0xea, 0xfc, 0xdf, + 0x00, 0xac, 0x34, 0xec, 0x40, 0xbc, 0x28, 0x3f, 0xa4, 0x5e, + 0xd8, 0x99, 0xe4, 0x5d, 0x5e, 0x7a, 0xc4, 0xe6, 0xca, 0x7b, + 0xa5, 0xb7 }; /* Expected ciphertext value */ static const unsigned char wrap_ct[] = { - 0x97, - 0x99, - 0x55, - 0xca, - 0xf6, - 0x3e, - 0x95, - 0x54, - 0x39, - 0xd6, - 0xaf, - 0x63, - 0xff, - 0x2c, - 0xe3, - 0x96, - 0xf7, - 0x0d, - 0x2c, - 0x9c, - 0xc7, - 0x43, - 0xc0, - 0xb6, - 0x31, - 0x43, - 0xb9, - 0x20, - 0xac, - 0x6b, - 0xd3, - 0x67, - 0xad, - 0x01, - 0xaf, - 0xa7, - 0x32, - 0x74, - 0x26, - 0x92, + 0x97, 0x99, 0x55, 0xca, 0xf6, 0x3e, 0x95, 0x54, 0x39, 0xd6, + 0xaf, 0x63, 0xff, 0x2c, 0xe3, 0x96, 0xf7, 0x0d, 0x2c, 0x9c, + 0xc7, 0x43, 0xc0, 0xb6, 0x31, 0x43, 0xb9, 0x20, 0xac, 0x6b, + 0xd3, 0x67, 0xad, 0x01, 0xaf, 0xa7, 0x32, 0x74, 0x26, 0x92 }; /* diff --git a/crypto/openssl/demos/cipher/ariacbc.c b/crypto/openssl/demos/cipher/ariacbc.c index 6504b9dff64c..9e64f62121c4 100644 --- a/crypto/openssl/demos/cipher/ariacbc.c +++ b/crypto/openssl/demos/cipher/ariacbc.c @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2012-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -27,22 +27,8 @@ static const unsigned char cbc_key[] = { /* Unique initialisation vector */ static const unsigned char cbc_iv[] = { - 0x99, - 0xaa, - 0x3e, - 0x68, - 0xed, - 0x81, - 0x73, - 0xa0, - 0xee, - 0xd0, - 0x66, - 0x84, - 0x99, - 0xaa, - 0x3e, - 0x68, + 0x99, 0xaa, 0x3e, 0x68, 0xed, 0x81, 0x73, 0xa0, 0xee, 0xd0, + 0x66, 0x84, 0x99, 0xaa, 0x3e, 0x68 }; /* Example plaintext to encrypt */ diff --git a/crypto/openssl/demos/digest/EVP_MD_demo.c b/crypto/openssl/demos/digest/EVP_MD_demo.c index efc2cd340273..04c52284ca1d 100644 --- a/crypto/openssl/demos/digest/EVP_MD_demo.c +++ b/crypto/openssl/demos/digest/EVP_MD_demo.c @@ -1,5 +1,5 @@ /*- - * Copyright 2021-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2021-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -61,71 +61,14 @@ const char *hamlet_2 = "The insolence of Office, and the spurns\n" "Be all my sins remember'd.\n"; /* The known value of the SHA3-512 digest of the above soliloqy */ -const unsigned char known_answer[] = { - 0xbb, - 0x69, - 0xf8, - 0x09, - 0x9c, - 0x2e, - 0x00, - 0x3d, - 0xa4, - 0x29, - 0x5f, - 0x59, - 0x4b, - 0x89, - 0xe4, - 0xd9, - 0xdb, - 0xa2, - 0xe5, - 0xaf, - 0xa5, - 0x87, - 0x73, - 0x9d, - 0x83, - 0x72, - 0xcf, - 0xea, - 0x84, - 0x66, - 0xc1, - 0xf9, - 0xc9, - 0x78, - 0xef, - 0xba, - 0x3d, - 0xe9, - 0xc1, - 0xff, - 0xa3, - 0x75, - 0xc7, - 0x58, - 0x74, - 0x8e, - 0x9c, - 0x1d, - 0x14, - 0xd9, - 0xdd, - 0xd1, - 0xfd, - 0x24, - 0x30, - 0xd6, - 0x81, - 0xca, - 0x8f, - 0x78, - 0x29, - 0x19, - 0x9a, - 0xfe, +static const unsigned char known_answer[] = { + 0xbb, 0x69, 0xf8, 0x09, 0x9c, 0x2e, 0x00, 0x3d, 0xa4, 0x29, + 0x5f, 0x59, 0x4b, 0x89, 0xe4, 0xd9, 0xdb, 0xa2, 0xe5, 0xaf, + 0xa5, 0x87, 0x73, 0x9d, 0x83, 0x72, 0xcf, 0xea, 0x84, 0x66, + 0xc1, 0xf9, 0xc9, 0x78, 0xef, 0xba, 0x3d, 0xe9, 0xc1, 0xff, + 0xa3, 0x75, 0xc7, 0x58, 0x74, 0x8e, 0x9c, 0x1d, 0x14, 0xd9, + 0xdd, 0xd1, 0xfd, 0x24, 0x30, 0xd6, 0x81, 0xca, 0x8f, 0x78, + 0x29, 0x19, 0x9a, 0xfe }; int demonstrate_digest(void) diff --git a/crypto/openssl/demos/mac/cmac-aes256.c b/crypto/openssl/demos/mac/cmac-aes256.c index 770aea3d3f41..ac53e9f6204a 100644 --- a/crypto/openssl/demos/mac/cmac-aes256.c +++ b/crypto/openssl/demos/mac/cmac-aes256.c @@ -1,5 +1,5 @@ /*- - * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2022-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -26,38 +26,10 @@ * It is done here solely for educational purposes. */ static unsigned char key[] = { - 0x6c, - 0xde, - 0x14, - 0xf5, - 0xd5, - 0x2a, - 0x4a, - 0xdf, - 0x12, - 0x39, - 0x1e, - 0xbf, - 0x36, - 0xf9, - 0x6a, - 0x46, - 0x48, - 0xd0, - 0xb6, - 0x51, - 0x89, - 0xfc, - 0x24, - 0x85, - 0xa8, - 0x8d, - 0xdf, - 0x7e, - 0x80, - 0x14, - 0xc8, - 0xce, + 0x6c, 0xde, 0x14, 0xf5, 0xd5, 0x2a, 0x4a, 0xdf, 0x12, 0x39, + 0x1e, 0xbf, 0x36, 0xf9, 0x6a, 0x46, 0x48, 0xd0, 0xb6, 0x51, + 0x89, 0xfc, 0x24, 0x85, 0xa8, 0x8d, 0xdf, 0x7e, 0x80, 0x14, + 0xc8, 0xce }; static const unsigned char data[] = "To be, or not to be, that is the question,\n" @@ -80,22 +52,8 @@ static const unsigned char data[] = "To be, or not to be, that is the question,\ /* The known value of the CMAC/AES256 MAC of the above soliloqy */ static const unsigned char expected_output[] = { - 0x67, - 0x92, - 0x32, - 0x23, - 0x50, - 0x3d, - 0xc5, - 0xba, - 0x78, - 0xd4, - 0x6d, - 0x63, - 0xf2, - 0x2b, - 0xe9, - 0x56, + 0x67, 0x92, 0x32, 0x23, 0x50, 0x3d, 0xc5, 0xba, 0x78, 0xd4, + 0x6d, 0x63, 0xf2, 0x2b, 0xe9, 0x56 }; /* diff --git a/crypto/openssl/demos/mac/hmac-sha512.c b/crypto/openssl/demos/mac/hmac-sha512.c index b23a0ec7740b..ac95e2446057 100644 --- a/crypto/openssl/demos/mac/hmac-sha512.c +++ b/crypto/openssl/demos/mac/hmac-sha512.c @@ -1,5 +1,5 @@ /*- - * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2022-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -26,70 +26,13 @@ * It is done here solely for educational purposes. */ static unsigned char key[] = { - 0x25, - 0xfd, - 0x12, - 0x99, - 0xdf, - 0xad, - 0x1a, - 0x03, - 0x0a, - 0x81, - 0x3c, - 0x2d, - 0xcc, - 0x05, - 0xd1, - 0x5c, - 0x17, - 0x7a, - 0x36, - 0x73, - 0x17, - 0xef, - 0x41, - 0x75, - 0x71, - 0x18, - 0xe0, - 0x1a, - 0xda, - 0x99, - 0xc3, - 0x61, - 0x38, - 0xb5, - 0xb1, - 0xe0, - 0x82, - 0x2c, - 0x70, - 0xa4, - 0xc0, - 0x8e, - 0x5e, - 0xf9, - 0x93, - 0x9f, - 0xcf, - 0xf7, - 0x32, - 0x4d, - 0x0c, - 0xbd, - 0x31, - 0x12, - 0x0f, - 0x9a, - 0x15, - 0xee, - 0x82, - 0xdb, - 0x8d, - 0x29, - 0x54, - 0x14, + 0x25, 0xfd, 0x12, 0x99, 0xdf, 0xad, 0x1a, 0x03, 0x0a, 0x81, + 0x3c, 0x2d, 0xcc, 0x05, 0xd1, 0x5c, 0x17, 0x7a, 0x36, 0x73, + 0x17, 0xef, 0x41, 0x75, 0x71, 0x18, 0xe0, 0x1a, 0xda, 0x99, + 0xc3, 0x61, 0x38, 0xb5, 0xb1, 0xe0, 0x82, 0x2c, 0x70, 0xa4, + 0xc0, 0x8e, 0x5e, 0xf9, 0x93, 0x9f, 0xcf, 0xf7, 0x32, 0x4d, + 0x0c, 0xbd, 0x31, 0x12, 0x0f, 0x9a, 0x15, 0xee, 0x82, 0xdb, + 0x8d, 0x29, 0x54, 0x14 }; static const unsigned char data[] = "To be, or not to be, that is the question,\n" @@ -112,70 +55,13 @@ static const unsigned char data[] = "To be, or not to be, that is the question,\ /* The known value of the HMAC/SHA3-512 MAC of the above soliloqy */ static const unsigned char expected_output[] = { - 0x3b, - 0x77, - 0x5f, - 0xf1, - 0x4f, - 0x9e, - 0xb9, - 0x23, - 0x8f, - 0xdc, - 0xa0, - 0x68, - 0x15, - 0x7b, - 0x8a, - 0xf1, - 0x96, - 0x23, - 0xaa, - 0x3c, - 0x1f, - 0xe9, - 0xdc, - 0x89, - 0x11, - 0x7d, - 0x58, - 0x07, - 0xe7, - 0x96, - 0x17, - 0xe3, - 0x44, - 0x8b, - 0x03, - 0x37, - 0x91, - 0xc0, - 0x6e, - 0x06, - 0x7c, - 0x54, - 0xe4, - 0xa4, - 0xcc, - 0xd5, - 0x16, - 0xbb, - 0x5e, - 0x4d, - 0x64, - 0x7d, - 0x88, - 0x23, - 0xc9, - 0xb7, - 0x25, - 0xda, - 0xbe, - 0x4b, - 0xe4, - 0xd5, - 0x34, - 0x30, + 0x3b, 0x77, 0x5f, 0xf1, 0x4f, 0x9e, 0xb9, 0x23, 0x8f, 0xdc, + 0xa0, 0x68, 0x15, 0x7b, 0x8a, 0xf1, 0x96, 0x23, 0xaa, 0x3c, + 0x1f, 0xe9, 0xdc, 0x89, 0x11, 0x7d, 0x58, 0x07, 0xe7, 0x96, + 0x17, 0xe3, 0x44, 0x8b, 0x03, 0x37, 0x91, 0xc0, 0x6e, 0x06, + 0x7c, 0x54, 0xe4, 0xa4, 0xcc, 0xd5, 0x16, 0xbb, 0x5e, 0x4d, + 0x64, 0x7d, 0x88, 0x23, 0xc9, 0xb7, 0x25, 0xda, 0xbe, 0x4b, + 0xe4, 0xd5, 0x34, 0x30 }; /* diff --git a/crypto/openssl/demos/signature/EVP_Signature_demo.h b/crypto/openssl/demos/signature/EVP_Signature_demo.h index 81957567931b..33e08b9507d5 100644 --- a/crypto/openssl/demos/signature/EVP_Signature_demo.h +++ b/crypto/openssl/demos/signature/EVP_Signature_demo.h @@ -1,5 +1,5 @@ /*- - * Copyright 2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2021-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -9,707 +9,79 @@ /* Signers private EC key */ static const unsigned char priv_key_der[] = { - 0x30, - 0x82, - 0x01, - 0x68, - 0x02, - 0x01, - 0x01, - 0x04, - 0x20, - 0x51, - 0x77, - 0xae, - 0xf4, - 0x18, - 0xf4, - 0x6b, - 0xc4, - 0xe5, - 0xbb, - 0xe9, - 0xe6, - 0x9e, - 0x6d, - 0xb0, - 0xea, - 0x12, - 0xf9, - 0xf3, - 0xdb, - 0x9d, - 0x56, - 0x59, - 0xf7, - 0x5a, - 0x17, - 0xd7, - 0xd1, - 0xe4, - 0xd7, - 0x47, - 0x28, - 0xa0, - 0x81, - 0xfa, - 0x30, - 0x81, - 0xf7, - 0x02, - 0x01, - 0x01, - 0x30, - 0x2c, - 0x06, - 0x07, - 0x2a, - 0x86, - 0x48, - 0xce, - 0x3d, - 0x01, - 0x01, - 0x02, - 0x21, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0x00, - 0x00, - 0x00, - 0x01, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0x30, - 0x5b, - 0x04, - 0x20, - 0xff, - 0xff, - 0xff, - 0xff, - 0x00, - 0x00, - 0x00, - 0x01, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xfc, - 0x04, - 0x20, - 0x5a, - 0xc6, - 0x35, - 0xd8, - 0xaa, - 0x3a, - 0x93, - 0xe7, - 0xb3, - 0xeb, - 0xbd, - 0x55, - 0x76, - 0x98, - 0x86, - 0xbc, - 0x65, - 0x1d, - 0x06, - 0xb0, - 0xcc, - 0x53, - 0xb0, - 0xf6, - 0x3b, - 0xce, - 0x3c, - 0x3e, - 0x27, - 0xd2, - 0x60, - 0x4b, - 0x03, - 0x15, - 0x00, - 0xc4, - 0x9d, - 0x36, - 0x08, - 0x86, - 0xe7, - 0x04, - 0x93, - 0x6a, - 0x66, - 0x78, - 0xe1, - 0x13, - 0x9d, - 0x26, - 0xb7, - 0x81, - 0x9f, - 0x7e, - 0x90, - 0x04, - 0x41, - 0x04, - 0x6b, - 0x17, - 0xd1, - 0xf2, - 0xe1, - 0x2c, - 0x42, - 0x47, - 0xf8, - 0xbc, - 0xe6, - 0xe5, - 0x63, - 0xa4, - 0x40, - 0xf2, - 0x77, - 0x03, - 0x7d, - 0x81, - 0x2d, - 0xeb, - 0x33, - 0xa0, - 0xf4, - 0xa1, - 0x39, - 0x45, - 0xd8, - 0x98, - 0xc2, - 0x96, - 0x4f, - 0xe3, - 0x42, - 0xe2, - 0xfe, - 0x1a, - 0x7f, - 0x9b, - 0x8e, - 0xe7, - 0xeb, - 0x4a, - 0x7c, - 0x0f, - 0x9e, - 0x16, - 0x2b, - 0xce, - 0x33, - 0x57, - 0x6b, - 0x31, - 0x5e, - 0xce, - 0xcb, - 0xb6, - 0x40, - 0x68, - 0x37, - 0xbf, - 0x51, - 0xf5, - 0x02, - 0x21, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0x00, - 0x00, - 0x00, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xbc, - 0xe6, - 0xfa, - 0xad, - 0xa7, - 0x17, - 0x9e, - 0x84, - 0xf3, - 0xb9, - 0xca, - 0xc2, - 0xfc, - 0x63, - 0x25, - 0x51, - 0x02, - 0x01, - 0x01, - 0xa1, - 0x44, - 0x03, - 0x42, - 0x00, - 0x04, - 0x4f, - 0xe7, - 0x7b, - 0xb6, - 0xbb, - 0x54, - 0x42, - 0x39, - 0xed, - 0x5d, - 0xe5, - 0x40, - 0xc8, - 0xd8, - 0x71, - 0xca, - 0x6d, - 0x83, - 0x71, - 0xd1, - 0x88, - 0x2a, - 0x65, - 0x00, - 0x6c, - 0xc6, - 0x2f, - 0x01, - 0x31, - 0x49, - 0xbe, - 0x76, - 0x7a, - 0x67, - 0x6a, - 0x28, - 0x33, - 0xc7, - 0x5b, - 0xb9, - 0x24, - 0x45, - 0x24, - 0x6e, - 0xf0, - 0x6d, - 0x2f, - 0x34, - 0x06, - 0x53, - 0x73, - 0x6a, - 0xff, - 0x90, - 0x90, - 0xc1, - 0x6d, - 0x9b, - 0x94, - 0x0d, - 0x0e, - 0x1f, - 0x95, - 0x65, + 0x30, 0x82, 0x01, 0x68, 0x02, 0x01, 0x01, 0x04, 0x20, 0x51, + 0x77, 0xae, 0xf4, 0x18, 0xf4, 0x6b, 0xc4, 0xe5, 0xbb, 0xe9, + 0xe6, 0x9e, 0x6d, 0xb0, 0xea, 0x12, 0xf9, 0xf3, 0xdb, 0x9d, + 0x56, 0x59, 0xf7, 0x5a, 0x17, 0xd7, 0xd1, 0xe4, 0xd7, 0x47, + 0x28, 0xa0, 0x81, 0xfa, 0x30, 0x81, 0xf7, 0x02, 0x01, 0x01, + 0x30, 0x2c, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x01, + 0x01, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x5b, 0x04, 0x20, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfc, 0x04, 0x20, 0x5a, 0xc6, 0x35, 0xd8, 0xaa, 0x3a, + 0x93, 0xe7, 0xb3, 0xeb, 0xbd, 0x55, 0x76, 0x98, 0x86, 0xbc, + 0x65, 0x1d, 0x06, 0xb0, 0xcc, 0x53, 0xb0, 0xf6, 0x3b, 0xce, + 0x3c, 0x3e, 0x27, 0xd2, 0x60, 0x4b, 0x03, 0x15, 0x00, 0xc4, + 0x9d, 0x36, 0x08, 0x86, 0xe7, 0x04, 0x93, 0x6a, 0x66, 0x78, + 0xe1, 0x13, 0x9d, 0x26, 0xb7, 0x81, 0x9f, 0x7e, 0x90, 0x04, + 0x41, 0x04, 0x6b, 0x17, 0xd1, 0xf2, 0xe1, 0x2c, 0x42, 0x47, + 0xf8, 0xbc, 0xe6, 0xe5, 0x63, 0xa4, 0x40, 0xf2, 0x77, 0x03, + 0x7d, 0x81, 0x2d, 0xeb, 0x33, 0xa0, 0xf4, 0xa1, 0x39, 0x45, + 0xd8, 0x98, 0xc2, 0x96, 0x4f, 0xe3, 0x42, 0xe2, 0xfe, 0x1a, + 0x7f, 0x9b, 0x8e, 0xe7, 0xeb, 0x4a, 0x7c, 0x0f, 0x9e, 0x16, + 0x2b, 0xce, 0x33, 0x57, 0x6b, 0x31, 0x5e, 0xce, 0xcb, 0xb6, + 0x40, 0x68, 0x37, 0xbf, 0x51, 0xf5, 0x02, 0x21, 0x00, 0xff, + 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xbc, 0xe6, 0xfa, 0xad, 0xa7, + 0x17, 0x9e, 0x84, 0xf3, 0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, + 0x51, 0x02, 0x01, 0x01, 0xa1, 0x44, 0x03, 0x42, 0x00, 0x04, + 0x4f, 0xe7, 0x7b, 0xb6, 0xbb, 0x54, 0x42, 0x39, 0xed, 0x5d, + 0xe5, 0x40, 0xc8, 0xd8, 0x71, 0xca, 0x6d, 0x83, 0x71, 0xd1, + 0x88, 0x2a, 0x65, 0x00, 0x6c, 0xc6, 0x2f, 0x01, 0x31, 0x49, + 0xbe, 0x76, 0x7a, 0x67, 0x6a, 0x28, 0x33, 0xc7, 0x5b, 0xb9, + 0x24, 0x45, 0x24, 0x6e, 0xf0, 0x6d, 0x2f, 0x34, 0x06, 0x53, + 0x73, 0x6a, 0xff, 0x90, 0x90, 0xc1, 0x6d, 0x9b, 0x94, 0x0d, + 0x0e, 0x1f, 0x95, 0x65 }; /* The matching public key used for verifying */ static const unsigned char pub_key_der[] = { - 0x30, - 0x82, - 0x01, - 0x4b, - 0x30, - 0x82, - 0x01, - 0x03, - 0x06, - 0x07, - 0x2a, - 0x86, - 0x48, - 0xce, - 0x3d, - 0x02, - 0x01, - 0x30, - 0x81, - 0xf7, - 0x02, - 0x01, - 0x01, - 0x30, - 0x2c, - 0x06, - 0x07, - 0x2a, - 0x86, - 0x48, - 0xce, - 0x3d, - 0x01, - 0x01, - 0x02, - 0x21, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0x00, - 0x00, - 0x00, - 0x01, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0x30, - 0x5b, - 0x04, - 0x20, - 0xff, - 0xff, - 0xff, - 0xff, - 0x00, - 0x00, - 0x00, - 0x01, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xfc, - 0x04, - 0x20, - 0x5a, - 0xc6, - 0x35, - 0xd8, - 0xaa, - 0x3a, - 0x93, - 0xe7, - 0xb3, - 0xeb, - 0xbd, - 0x55, - 0x76, - 0x98, - 0x86, - 0xbc, - 0x65, - 0x1d, - 0x06, - 0xb0, - 0xcc, - 0x53, - 0xb0, - 0xf6, - 0x3b, - 0xce, - 0x3c, - 0x3e, - 0x27, - 0xd2, - 0x60, - 0x4b, - 0x03, - 0x15, - 0x00, - 0xc4, - 0x9d, - 0x36, - 0x08, - 0x86, - 0xe7, - 0x04, - 0x93, - 0x6a, - 0x66, - 0x78, - 0xe1, - 0x13, - 0x9d, - 0x26, - 0xb7, - 0x81, - 0x9f, - 0x7e, - 0x90, - 0x04, - 0x41, - 0x04, - 0x6b, - 0x17, - 0xd1, - 0xf2, - 0xe1, - 0x2c, - 0x42, - 0x47, - 0xf8, - 0xbc, - 0xe6, - 0xe5, - 0x63, - 0xa4, - 0x40, - 0xf2, - 0x77, - 0x03, - 0x7d, - 0x81, - 0x2d, - 0xeb, - 0x33, - 0xa0, - 0xf4, - 0xa1, - 0x39, - 0x45, - 0xd8, - 0x98, - 0xc2, - 0x96, - 0x4f, - 0xe3, - 0x42, - 0xe2, - 0xfe, - 0x1a, - 0x7f, - 0x9b, - 0x8e, - 0xe7, - 0xeb, - 0x4a, - 0x7c, - 0x0f, - 0x9e, - 0x16, - 0x2b, - 0xce, - 0x33, - 0x57, - 0x6b, - 0x31, - 0x5e, - 0xce, - 0xcb, - 0xb6, - 0x40, - 0x68, - 0x37, - 0xbf, - 0x51, - 0xf5, - 0x02, - 0x21, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0x00, - 0x00, - 0x00, - 0x00, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xbc, - 0xe6, - 0xfa, - 0xad, - 0xa7, - 0x17, - 0x9e, - 0x84, - 0xf3, - 0xb9, - 0xca, - 0xc2, - 0xfc, - 0x63, - 0x25, - 0x51, - 0x02, - 0x01, - 0x01, - 0x03, - 0x42, - 0x00, - 0x04, - 0x4f, - 0xe7, - 0x7b, - 0xb6, - 0xbb, - 0x54, - 0x42, - 0x39, - 0xed, - 0x5d, - 0xe5, - 0x40, - 0xc8, - 0xd8, - 0x71, - 0xca, - 0x6d, - 0x83, - 0x71, - 0xd1, - 0x88, - 0x2a, - 0x65, - 0x00, - 0x6c, - 0xc6, - 0x2f, - 0x01, - 0x31, - 0x49, - 0xbe, - 0x76, - 0x7a, - 0x67, - 0x6a, - 0x28, - 0x33, - 0xc7, - 0x5b, - 0xb9, - 0x24, - 0x45, - 0x24, - 0x6e, - 0xf0, - 0x6d, - 0x2f, - 0x34, - 0x06, - 0x53, - 0x73, - 0x6a, - 0xff, - 0x90, - 0x90, - 0xc1, - 0x6d, - 0x9b, - 0x94, - 0x0d, - 0x0e, - 0x1f, - 0x95, - 0x65, + 0x30, 0x82, 0x01, 0x4b, 0x30, 0x82, 0x01, 0x03, 0x06, 0x07, + 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x30, 0x81, 0xf7, + 0x02, 0x01, 0x01, 0x30, 0x2c, 0x06, 0x07, 0x2a, 0x86, 0x48, + 0xce, 0x3d, 0x01, 0x01, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, + 0x5b, 0x04, 0x20, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfc, 0x04, 0x20, 0x5a, 0xc6, 0x35, + 0xd8, 0xaa, 0x3a, 0x93, 0xe7, 0xb3, 0xeb, 0xbd, 0x55, 0x76, + 0x98, 0x86, 0xbc, 0x65, 0x1d, 0x06, 0xb0, 0xcc, 0x53, 0xb0, + 0xf6, 0x3b, 0xce, 0x3c, 0x3e, 0x27, 0xd2, 0x60, 0x4b, 0x03, + 0x15, 0x00, 0xc4, 0x9d, 0x36, 0x08, 0x86, 0xe7, 0x04, 0x93, + 0x6a, 0x66, 0x78, 0xe1, 0x13, 0x9d, 0x26, 0xb7, 0x81, 0x9f, + 0x7e, 0x90, 0x04, 0x41, 0x04, 0x6b, 0x17, 0xd1, 0xf2, 0xe1, + 0x2c, 0x42, 0x47, 0xf8, 0xbc, 0xe6, 0xe5, 0x63, 0xa4, 0x40, + 0xf2, 0x77, 0x03, 0x7d, 0x81, 0x2d, 0xeb, 0x33, 0xa0, 0xf4, + 0xa1, 0x39, 0x45, 0xd8, 0x98, 0xc2, 0x96, 0x4f, 0xe3, 0x42, + 0xe2, 0xfe, 0x1a, 0x7f, 0x9b, 0x8e, 0xe7, 0xeb, 0x4a, 0x7c, + 0x0f, 0x9e, 0x16, 0x2b, 0xce, 0x33, 0x57, 0x6b, 0x31, 0x5e, + 0xce, 0xcb, 0xb6, 0x40, 0x68, 0x37, 0xbf, 0x51, 0xf5, 0x02, + 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbc, 0xe6, + 0xfa, 0xad, 0xa7, 0x17, 0x9e, 0x84, 0xf3, 0xb9, 0xca, 0xc2, + 0xfc, 0x63, 0x25, 0x51, 0x02, 0x01, 0x01, 0x03, 0x42, 0x00, + 0x04, 0x4f, 0xe7, 0x7b, 0xb6, 0xbb, 0x54, 0x42, 0x39, 0xed, + 0x5d, 0xe5, 0x40, 0xc8, 0xd8, 0x71, 0xca, 0x6d, 0x83, 0x71, + 0xd1, 0x88, 0x2a, 0x65, 0x00, 0x6c, 0xc6, 0x2f, 0x01, 0x31, + 0x49, 0xbe, 0x76, 0x7a, 0x67, 0x6a, 0x28, 0x33, 0xc7, 0x5b, + 0xb9, 0x24, 0x45, 0x24, 0x6e, 0xf0, 0x6d, 0x2f, 0x34, 0x06, + 0x53, 0x73, 0x6a, 0xff, 0x90, 0x90, 0xc1, 0x6d, 0x9b, 0x94, + 0x0d, 0x0e, 0x1f, 0x95, 0x65 }; diff --git a/crypto/openssl/doc/fingerprints.txt b/crypto/openssl/doc/fingerprints.txt index bdcad1472309..e8015f26b9ac 100644 --- a/crypto/openssl/doc/fingerprints.txt +++ b/crypto/openssl/doc/fingerprints.txt @@ -13,6 +13,9 @@ The following is the list of fingerprints for the keys that are currently in use to sign OpenSSL distributions: OpenSSL: +B146 647E 45A7 B339 47AB 226B 2A2C 87D1 6169 2D40 + +OpenSSL (old keys): BA54 73A2 B058 7B07 FB27 CF2D 2160 94DF D0CB 81EF Richard Levitte: diff --git a/crypto/openssl/doc/man1/openssl-format-options.pod b/crypto/openssl/doc/man1/openssl-format-options.pod index 115aa9936f8f..e97cc3b51e91 100644 --- a/crypto/openssl/doc/man1/openssl-format-options.pod +++ b/crypto/openssl/doc/man1/openssl-format-options.pod @@ -84,11 +84,11 @@ a block of base-64 encoding (defined in IETF RFC 4648), with specific lines used to mark the start and end: Text before the BEGIN line is ignored. - ----- BEGIN object-type ----- + -----BEGIN object-type----- OT43gQKBgQC/2OHZoko6iRlNOAQ/tMVFNq7fL81GivoQ9F1U0Qr+DH3ZfaH8eIkX xT0ToMPJUzWAn8pZv0snA0um6SIgvkCuxO84OkANCVbttzXImIsL7pFzfcwV/ERK UM6j0ZuSMFOCr/lGPAoOQU0fskidGEHi1/kW+suSr28TqsyYZpwBDQ== - ----- END object-type ----- + -----END object-type----- Text after the END line is also ignored The I<object-type> must match the type of object that is expected. diff --git a/crypto/openssl/doc/man1/openssl-pkcs8.pod.in b/crypto/openssl/doc/man1/openssl-pkcs8.pod.in index 2af61203e9a7..dc58b24dfaea 100644 --- a/crypto/openssl/doc/man1/openssl-pkcs8.pod.in +++ b/crypto/openssl/doc/man1/openssl-pkcs8.pod.in @@ -73,7 +73,7 @@ is included. =item B<-traditional> -When this option is present and B<-topk8> is not a traditional format private +When this option is present and B<-topk8> is not, a traditional format private key is written. =item B<-in> I<filename> @@ -278,7 +278,7 @@ The B<-engine> option was deprecated in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man1/openssl-rehash.pod.in b/crypto/openssl/doc/man1/openssl-rehash.pod.in index 380ad6dd2a46..bd0f245cc4ac 100644 --- a/crypto/openssl/doc/man1/openssl-rehash.pod.in +++ b/crypto/openssl/doc/man1/openssl-rehash.pod.in @@ -47,8 +47,8 @@ directories to be set up like this in order to find certificates. If any directories are named on the command line, then those are processed in turn. If not, then the B<SSL_CERT_DIR> environment variable -is consulted; this should be a colon-separated list of directories, -like the Unix B<PATH> variable. +is consulted; this should be a colon-separated list of directories +(or semicolon-separated on Windows), like the B<PATH> variable. If that is not set then the default directory (installation-specific but often F</usr/local/ssl/certs>) is processed. @@ -147,7 +147,7 @@ L<openssl-x509(1)> =head1 COPYRIGHT -Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2015-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man1/openssl-s_client.pod.in b/crypto/openssl/doc/man1/openssl-s_client.pod.in index 29025ef1161b..250732ffb206 100644 --- a/crypto/openssl/doc/man1/openssl-s_client.pod.in +++ b/crypto/openssl/doc/man1/openssl-s_client.pod.in @@ -323,6 +323,12 @@ see L<openssl-verify(1)> for more information. The URI of a store containing trusted certificates to use for verifying the server's certificate. +When any of B<-verifyCAfile>, B<-verifyCApath>, or B<-verifyCAstore> is +specified, they are loaded into a separate verification store (via +L<SSL_CTX_set1_verify_cert_store(3)>) and used for server certificate +verification instead of the store built from B<-CAfile>, B<-CApath>, and +B<-CAstore>. + =item B<-chainCAfile> I<file> A file in PEM format containing trusted certificates to use @@ -720,9 +726,6 @@ The I<protocols> list is a comma-separated list of protocol names that the client should advertise support for. The list should contain the most desirable protocols first. Protocol names are printable ASCII strings, for example "http/1.1" or "spdy/3". -An empty list of protocols is treated specially and will cause the -client to advertise support for the TLS extension but disconnect just -after receiving ServerHello with a list of server supported protocols. The flag B<-nextprotoneg> cannot be specified if B<-tls1_3> is used. =item B<-ct>, B<-noct> @@ -971,7 +974,7 @@ The B<-engine> option was deprecated in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2000-2025 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man1/openssl-s_server.pod.in b/crypto/openssl/doc/man1/openssl-s_server.pod.in index f0825ad33d1f..edb3df5e0aad 100644 --- a/crypto/openssl/doc/man1/openssl-s_server.pod.in +++ b/crypto/openssl/doc/man1/openssl-s_server.pod.in @@ -342,8 +342,8 @@ Download CRLs from distribution points given in CDP extensions of certificates =item B<-verifyCAfile> I<filename> -A file in PEM format CA containing trusted certificates to use -for verifying client certificates. +A file in PEM format containing trusted CA certificates (root and/or +intermediate) used to verify the client certificate chain. =item B<-verifyCApath> I<dir> @@ -357,6 +357,15 @@ see L<openssl-verify(1)> for more information. The URI of a store containing trusted certificates to use for verifying client certificates. +When any of B<-verifyCAfile>, B<-verifyCApath>, or B<-verifyCAstore> is +specified, they are loaded into a separate verification store (via +L<SSL_CTX_set1_verify_cert_store(3)>) and used for client certificate +verification instead of the store built from B<-CAfile>, B<-CApath>, and +B<-CAstore>. Note that B<-CAfile> is the sole source of acceptable issuing +CA names sent to the client in the Certificate Request message during the +handshake; B<-CApath>, B<-CAstore>, and the B<-verifyCA*> options do not +contribute to this list. + =item B<-chainCAfile> I<file> A file in PEM format containing trusted certificates to use @@ -938,7 +947,7 @@ option were deprecated in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2000-2024 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man1/openssl-smime.pod.in b/crypto/openssl/doc/man1/openssl-smime.pod.in index ffd09704f834..6bf6fff00029 100644 --- a/crypto/openssl/doc/man1/openssl-smime.pod.in +++ b/crypto/openssl/doc/man1/openssl-smime.pod.in @@ -54,8 +54,9 @@ I<recipcert> ... =head1 DESCRIPTION -This command handles S/MIME mail. It can encrypt, decrypt, sign -and verify S/MIME messages. +This command handles S/MIME according to RFC 2311 (1998) with no CMS support. +It can encrypt, decrypt, sign and verify S/MIME 2.0 messages. For newer messages +use the OpenSSL CMS tool. =head1 OPTIONS @@ -474,7 +475,7 @@ The B<-engine> option was deprecated in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2000-2024 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/BIO_s_bio.pod b/crypto/openssl/doc/man3/BIO_s_bio.pod index 653fe4785a49..494b3632ee93 100644 --- a/crypto/openssl/doc/man3/BIO_s_bio.pod +++ b/crypto/openssl/doc/man3/BIO_s_bio.pod @@ -5,7 +5,8 @@ BIO_s_bio, BIO_make_bio_pair, BIO_destroy_bio_pair, BIO_shutdown_wr, BIO_set_write_buf_size, BIO_get_write_buf_size, BIO_new_bio_pair, BIO_get_write_guarantee, BIO_ctrl_get_write_guarantee, BIO_get_read_request, -BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request - BIO pair BIO +BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request, +BIO_nread0, BIO_nread, BIO_nwrite0, BIO_nwrite - BIO pair BIO =head1 SYNOPSIS @@ -28,6 +29,11 @@ BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request - BIO pair BIO size_t BIO_ctrl_get_read_request(BIO *b); int BIO_ctrl_reset_read_request(BIO *b); + int BIO_nread0(BIO *bio, char **buf); + int BIO_nread(BIO *bio, char **buf, int num); + int BIO_nwrite0(BIO *bio, char **buf); + int BIO_nwrite(BIO *bio, char **buf, int num); + =head1 DESCRIPTION BIO_s_bio() returns the method for a BIO pair. A BIO pair is a pair of source/sink @@ -98,6 +104,44 @@ than that returned by BIO_get_write_guarantee(). BIO_ctrl_reset_read_request() can also be used to reset the value returned by BIO_get_read_request() to zero. +=head2 Non-copying Interface + +BIO_nread0(), BIO_nread(), BIO_nwrite0(), and BIO_nwrite() provide a non-copying +interface for reading from and writing to BIO pairs. These functions allow +direct access to the internal buffer, avoiding the overhead of copying data. + +BIO_nread0() returns in B<*buf> a pointer to the start of the available data +in the peer's write buffer and returns the number of bytes available. +This allows reading directly from the buffer without copying. +It does not consume the data; a subsequent call to BIO_nread() is needed +to advance the buffer position. + +BIO_nread() is similar to BIO_nread0() but also advances the read position +by up to B<num> bytes. The actual number of bytes consumed is returned. +The B<*buf> pointer is set to the start of the data that was consumed. +Since the data is considered consumed after this call, the pointer returned +by BIO_nread() should not be used afterwards unless the caller also +controls the writing side. The typical pattern is to call BIO_nread0() first, +use the data, and then call BIO_nread() to consume it. + +BIO_nwrite0() returns in B<*buf> a pointer to the start of the available +space in the write buffer and returns the number of bytes that can be written. +This allows writing directly to the buffer without copying. +It does not commit the data; a subsequent call to BIO_nwrite() is needed +to update the buffer length. + +BIO_nwrite() is similar to BIO_nwrite0() but also commits up to B<num> bytes +as written. The actual number of bytes committed is returned. +The B<*buf> pointer is set to the start of the region that was committed. +BIO_nwrite() should only be called after the data has actually been written +to the buffer obtained from BIO_nwrite0(), since committing signals data +availability to the reading side. + +Note that due to the ring buffer implementation, if wrapping around would be +required, BIO_nread0() and BIO_nwrite0() may return less than the total +available space. In such cases, a second call may be needed to access the +remaining data or space. + =head1 NOTES Both halves of a BIO pair should be freed. That is even if one half is implicit @@ -133,6 +177,17 @@ locations for B<bio1> and B<bio2>. Check the error stack for more information. [XXXXX: More return values need to be added here] +BIO_nread0() returns the number of bytes available for reading, 0 if the peer +has closed and no data remains (EOF), or -1 if no data is currently available +(retry may be appropriate). If the BIO is not initialized, -2 is returned. + +BIO_nwrite0() returns the number of bytes of space available for writing, or -1 +if no space is currently available (retry may be appropriate) or the BIO has +been closed. If the BIO is not initialized, -2 is returned. + +BIO_nread() and BIO_nwrite() return the number of bytes consumed or committed +respectively, or the same error values as BIO_nread0() and BIO_nwrite0(). + =head1 EXAMPLES The BIO pair can be used to have full control over the network access of an @@ -176,6 +231,30 @@ and must be transferred to the network. Use BIO_ctrl_get_read_request() to find out, how many bytes must be written into the buffer before the SSL_operation() can successfully be continued. +A typical usage pattern for the non-copying write interface is: + + int ret; + char *buf; + + ret = BIO_nwrite0(bio, &buf); + if (ret > 0) { + /* write up to 'ret' bytes directly to 'buf' */ + memcpy(buf, data, len); + BIO_nwrite(bio, &buf, len); /* commit the write */ + } + +A typical usage pattern for the non-copying read interface is: + + int ret; + char *buf; + + ret = BIO_nread0(bio, &buf); + if (ret > 0) { + /* read up to 'ret' bytes directly from 'buf' */ + process_data(buf, ret); + BIO_nread(bio, &buf, ret); /* consume the data */ + } + =head1 WARNINGS As the data is buffered, SSL_operation() may return with an ERROR_SSL_WANT_READ @@ -191,7 +270,7 @@ L<BIO_should_retry(3)>, L<BIO_read_ex(3)> =head1 COPYRIGHT -Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/BN_add.pod b/crypto/openssl/doc/man3/BN_add.pod index 46966d996379..a7ff19565f49 100644 --- a/crypto/openssl/doc/man3/BN_add.pod +++ b/crypto/openssl/doc/man3/BN_add.pod @@ -108,8 +108,10 @@ BN_gcd() computes the greatest common divisor of I<a> and I<b> and places the result in I<r>. I<r> may be the same B<BIGNUM> as I<a> or I<b>. -For all functions, I<ctx> is a previously allocated B<BN_CTX> used for -temporary variables; see L<BN_CTX_new(3)>. +For all functions that take a I<ctx> parameter, it must be a previously +allocated B<BN_CTX> used for temporary variables; see L<BN_CTX_new(3)>. +Unless stated otherwise in the documentation for a specific function, +the I<ctx> parameter must not be NULL. Unless noted otherwise, the result B<BIGNUM> must be different from the arguments. @@ -135,7 +137,7 @@ L<BN_add_word(3)>, L<BN_set_bit(3)> =head1 COPYRIGHT -Copyright 2000-2024 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/EVP_EncryptInit.pod b/crypto/openssl/doc/man3/EVP_EncryptInit.pod index 75aef98363e3..2e1ca4e44112 100644 --- a/crypto/openssl/doc/man3/EVP_EncryptInit.pod +++ b/crypto/openssl/doc/man3/EVP_EncryptInit.pod @@ -371,7 +371,8 @@ encrypted data. For most ciphers and modes, the amount of data written can be anything from zero bytes to (inl + cipher_block_size - 1) bytes. For wrap cipher modes, the amount of data written can be anything -from zero bytes to (inl + cipher_block_size) bytes. +from zero bytes to (inl rounded up to cipher_block_size + cipher_block_size) +bytes. For stream ciphers, the amount of data written can be anything from zero bytes to inl bytes. Thus, the buffer pointed to by I<out> must contain sufficient room for the diff --git a/crypto/openssl/doc/man3/OSSL_HTTP_REQ_CTX.pod b/crypto/openssl/doc/man3/OSSL_HTTP_REQ_CTX.pod index d6c4cdfa0ca7..54773be6dec0 100644 --- a/crypto/openssl/doc/man3/OSSL_HTTP_REQ_CTX.pod +++ b/crypto/openssl/doc/man3/OSSL_HTTP_REQ_CTX.pod @@ -83,9 +83,12 @@ For backward compatibility, I<path> may begin with C<http://> and thus convey an absoluteURI. In this case it indicates HTTP proxy use and provides also the server (and optionally the port) that the proxy shall forward the request to. In this case the I<server> and I<port> arguments must be NULL. +The I<server>, I<port>, and I<path> arguments must not contain CR or LF +characters. OSSL_HTTP_REQ_CTX_add1_header() adds header I<name> with value I<value> to the context I<rctx>. It can be called more than once to add multiple header lines. +The I<name> and I<value> arguments must not contain CR or LF characters. For example, to add a C<Host> header for C<example.com> you would call: OSSL_HTTP_REQ_CTX_add1_header(ctx, "Host", "example.com"); @@ -129,6 +132,7 @@ The HTTP header C<Content-Length> is filled out with the length of the request. I<content_type> must be NULL if I<req> is NULL. If I<content_type> isn't NULL, the HTTP header C<Content-Type> is also added with the given string value. +The I<content_type> argument must not contain CR or LF characters. The header lines are added to the internal memory B<BIO> for the request header. OSSL_HTTP_REQ_CTX_nbio() attempts to send the request prepared in I<rctx> @@ -261,7 +265,7 @@ The functions described here were added in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2015-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/OSSL_HTTP_parse_url.pod b/crypto/openssl/doc/man3/OSSL_HTTP_parse_url.pod index 4379c122d66a..60d9fcdd6401 100644 --- a/crypto/openssl/doc/man3/OSSL_HTTP_parse_url.pod +++ b/crypto/openssl/doc/man3/OSSL_HTTP_parse_url.pod @@ -32,7 +32,9 @@ see L<openssl_user_macros(7)>: =head1 DESCRIPTION -OSSL_HTTP_adapt_proxy() takes an optional proxy hostname I<proxy> +OSSL_HTTP_adapt_proxy() determines whether a proxy should be used +when connecting to the given I<server>. +It takes an optional proxy hostname I<proxy> and returns it transformed according to the optional I<no_proxy> parameter, I<server>, I<use_ssl>, and the applicable environment variable, as follows. If I<proxy> is NULL, take any default value from the C<http_proxy> @@ -40,11 +42,13 @@ environment variable, or from C<https_proxy> if I<use_ssl> is nonzero. If this still does not yield a proxy hostname, take any further default value from the C<HTTP_PROXY> environment variable, or from C<HTTPS_PROXY> if I<use_ssl> is nonzero. -If I<no_proxy> is NULL, take any default exclusion value from the C<no_proxy> -environment variable, or else from C<NO_PROXY>. -Return the determined proxy host unless the exclusion value, -which is a list of proxy hosts separated by C<,> and/or whitespace, -contains I<server>. +Return the determined proxy host if I<server> is the empty string +or I<server> is not in the exclusion list. +The exclusion list is a list of server hosts separated by C<,> +and/or whitespace. +They may be given via the I<no_proxy> parameter. +If it is NULL, the exclusion list is taken from the C<no_proxy> +environment variable if set, otherwise from C<NO_PROXY>. Otherwise return NULL. When I<server> is a string delimited by C<[> and C<]>, which are used for IPv6 addresses, the enclosing C<[> and C<]> are stripped prior to comparison. @@ -102,7 +106,7 @@ OCSP_parse_url() was deprecated in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/OSSL_HTTP_transfer.pod b/crypto/openssl/doc/man3/OSSL_HTTP_transfer.pod index 6da1d91b9f37..aa5d640f092f 100644 --- a/crypto/openssl/doc/man3/OSSL_HTTP_transfer.pod +++ b/crypto/openssl/doc/man3/OSSL_HTTP_transfer.pod @@ -154,6 +154,7 @@ pre-established with a TLS proxy using the HTTP CONNECT method, optionally using proxy client credentials I<proxyuser> and I<proxypass>, to connect with TLS protection ultimately to I<server> and I<port>. If the I<port> argument is NULL or the empty string it defaults to "443". +The I<server> and I<port> arguments must not contain CR or LF characters. If the I<timeout> parameter is > 0 this indicates the maximum number of seconds the connection setup is allowed to take. A value <= 0 enables waiting indefinitely, i.e., no timeout. @@ -174,6 +175,10 @@ else HTTP POST with the contents of I<req> and optional I<content_type>, where the length of the data in I<req> does not need to be determined in advance: the BIO will be read on-the-fly while sending the request, which supports streaming. The optional list I<headers> may contain additional custom HTTP header lines. + +The I<path>, I<headers> names and values, and I<content_type> must not contain +CR or LF characters. + If the parameter I<expected_content_type> is not NULL then the client will check that the given content type string is included in the HTTP header of the response and return an error if not. @@ -279,7 +284,7 @@ All the functions described here were added in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/PKCS7_decrypt.pod b/crypto/openssl/doc/man3/PKCS7_decrypt.pod index aea15937ab86..a5d58a70bb44 100644 --- a/crypto/openssl/doc/man3/PKCS7_decrypt.pod +++ b/crypto/openssl/doc/man3/PKCS7_decrypt.pod @@ -38,16 +38,13 @@ The error can be obtained from ERR_get_error(3) PKCS7_decrypt() must be passed the correct recipient key and certificate. It would be better if it could look up the correct key and certificate from a database. -The lack of single pass processing and need to hold all data in memory as -mentioned in PKCS7_sign() also applies to PKCS7_verify(). - =head1 SEE ALSO L<ERR_get_error(3)>, L<PKCS7_encrypt(3)> =head1 COPYRIGHT -Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2002-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/SSL_CTX_set_session_cache_mode.pod b/crypto/openssl/doc/man3/SSL_CTX_set_session_cache_mode.pod index 25b588f58091..839f787d9d3c 100644 --- a/crypto/openssl/doc/man3/SSL_CTX_set_session_cache_mode.pod +++ b/crypto/openssl/doc/man3/SSL_CTX_set_session_cache_mode.pod @@ -8,8 +8,8 @@ SSL_CTX_set_session_cache_mode, SSL_CTX_get_session_cache_mode - enable/disable #include <openssl/ssl.h> - long SSL_CTX_set_session_cache_mode(SSL_CTX ctx, long mode); - long SSL_CTX_get_session_cache_mode(SSL_CTX ctx); + long SSL_CTX_set_session_cache_mode(SSL_CTX *ctx, long mode); + long SSL_CTX_get_session_cache_mode(SSL_CTX *ctx); =head1 DESCRIPTION @@ -136,7 +136,7 @@ L<SSL_CTX_flush_sessions(3)> =head1 COPYRIGHT -Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2001-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/SSL_CTX_set_session_id_context.pod b/crypto/openssl/doc/man3/SSL_CTX_set_session_id_context.pod index c9572bd0d83f..35b06ef2037f 100644 --- a/crypto/openssl/doc/man3/SSL_CTX_set_session_id_context.pod +++ b/crypto/openssl/doc/man3/SSL_CTX_set_session_id_context.pod @@ -38,9 +38,6 @@ is set by the SSL/TLS server. The SSL_CTX_set_session_id_context() and SSL_set_session_id_context() functions are therefore only useful on the server side. -OpenSSL clients will check the session id context returned by the server -when reusing a session. - The maximum length of the B<sid_ctx> is limited to B<SSL_MAX_SID_CTX_LENGTH>. @@ -51,11 +48,24 @@ certificates are used, stored sessions will not be reused but a fatal error will be flagged and the handshake will fail. -If a server returns a different session id context to an OpenSSL client -when reusing a session, an error will be flagged and the handshake will -fail. OpenSSL servers will always return the correct session id context, -as an OpenSSL server checks the session id context itself before reusing -a session as described above. +If a client attempts to resume a session and the server detects that the session +id context associated with the session is different to the current session id +context then the resumption will fail. The handshake will continue normally but +no resumption will occur. + +It is vital that the session id context is set before any session resumption +occurs. Sessions get created early in the handshake. If the session id context +is not set by the time the session gets created then the session will be +associated with an empty session id context. The already created session will +not get updated if the session id context is later set. In particular the +callback set via the L<SSL_CTX_set_tlsext_servername_callback(3)> function will +be invoked after the session gets created, so if the session id context is set +in the callback then this will be too late for the current handshake and the +session id context setting will be ignored with respect to resumption. Typically +the session id context should be set before the TLS handshake starts, but it may +occur as late as in the callback set via the L<SSL_CTX_set_client_hello_cb(3)> +function. + =head1 RETURN VALUES @@ -82,7 +92,7 @@ L<ssl(7)> =head1 COPYRIGHT -Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2001-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod b/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod index a0a4bd636785..a1b3f58994b5 100644 --- a/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod +++ b/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod @@ -29,7 +29,11 @@ still necessary in order to acknowledge the servername requested by the client. SSL_CTX_set_tlsext_servername_callback() sets the application callback B<cb> used by a server to perform any actions or configuration required based on the servername extension received in the incoming connection. When B<cb> -is NULL, SNI is not used. +is NULL, SNI is not used. Note that this callback occurs late in the processing +of the ClientHello message. In particular it happens after session resumption +has occurred, and so typically this callback should not call functions such +as L<SSL_set_session_id_context(3)> since it is too late to affect the session +resumption for the current handshake. The servername callback should return one of the following values: @@ -169,7 +173,7 @@ NULL. =head1 COPYRIGHT -Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man3/d2i_X509.pod b/crypto/openssl/doc/man3/d2i_X509.pod index 2d21b799a100..87f857b394b5 100644 --- a/crypto/openssl/doc/man3/d2i_X509.pod +++ b/crypto/openssl/doc/man3/d2i_X509.pod @@ -383,21 +383,29 @@ encoding. Unlike the C structures which can have pointers to sub-objects within, the DER is a serialized encoding, suitable for sending over the network, writing to a file, and so on. -B<d2i_I<TYPE>>() attempts to decode I<len> bytes at I<*ppin>. If successful a -pointer to the B<I<TYPE>> structure is returned and I<*ppin> is incremented to -the byte following the parsed data. If I<a> is not NULL then a pointer -to the returned structure is also written to I<*a>. If an error occurred -then NULL is returned. The caller retains ownership of the -returned object and needs to free it when it is no longer needed, e.g. -using X509_free() for X509 objects or DSA_SIG_free() for DSA_SIG objects. +B<d2i_I<TYPE>>() attempts to decode I<len> bytes at I<*ppin>. +When there is no error, a pointer to a B<I<TYPE>> object is returned and I<*ppin> is +incremented to the byte following the parsed data. +The caller owns the returned object and needs to free it when it is no longer needed, +e.g., via X509_free() for B<X509> objects. -On a successful return, if I<*a> is not NULL then it is assumed that I<*a> -contains a valid B<I<TYPE>> structure and an attempt is made to reuse it. -For B<I<TYPE>> structures where it matters it is possible to set up a library -context on the decoded structure this way (see the B<EXAMPLES> section). -However using the "reuse" capability for other purposes is B<strongly -discouraged> (see B<BUGS> below, and the discussion in the B<RETURN VALUES> -section). +If either I<a> or I<*a> is NULL, then fresh storage is allocated for the +returned object, and if I<a> is not NULL then I<*a> is set equal to the +returned pointer. + +When both I<a> and I<*a> are not NULL, I<*a> MUST be a pointer to an +existing I<TYPE> object, which is reused to hold the decoded result. +On error (NULL return value), the object is freed and I<*a> is set to NULL. + +From OpenSSL 3.x onwards, reuse is only supported when I<*a> points to a newly +allocated, and not otherwise modified, I<TYPE> object. +Allocation can be via one of the various _ex() routines, which make it possible +to associate the allocated object with a chosen I<libctx> (library context) +or I<propq> (property query), see the B<EXAMPLES> section. +No other reuse is supported (see B<BUGS> below, and the discussion in the +B<RETURN VALUES> section). +The returned object is not suitable for another reuse: each reuse attempt MUST +start with a newly allocated object. B<d2i_I<TYPE>_bio>() is similar to B<d2i_I<TYPE>>() except it attempts to parse data from BIO I<bp>. @@ -618,7 +626,7 @@ efficiency reasons. =head1 COPYRIGHT -Copyright 1998-2025 The OpenSSL Project Authors. All Rights Reserved. +Copyright 1998-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man7/EVP_CIPHER-AES.pod b/crypto/openssl/doc/man7/EVP_CIPHER-AES.pod index 3313245f9842..e83dd937aaa1 100644 --- a/crypto/openssl/doc/man7/EVP_CIPHER-AES.pod +++ b/crypto/openssl/doc/man7/EVP_CIPHER-AES.pod @@ -67,6 +67,10 @@ The AES-SIV and AES-WRAP mode implementations do not support streaming. That means to obtain correct results there can be only one L<EVP_EncryptUpdate(3)> or L<EVP_DecryptUpdate(3)> call after the initialization of the context. +When wrapping with AES-WRAP-PAD ciphers, the output buffer must be at least +I<inl> rounded up to the cipher block size (8 bytes) plus the block size. +That is, the minimum output buffer size is C<((inl + 7) / 8) * 8 + 8> bytes. + The AES-XTS implementations allow streaming to be performed, but each L<EVP_EncryptUpdate(3)> or L<EVP_DecryptUpdate(3)> call requires each input to be a multiple of the blocksize. Only the final EVP_EncryptUpdate() or @@ -80,7 +84,7 @@ L<provider-cipher(7)>, L<OSSL_PROVIDER-FIPS(7)>, L<OSSL_PROVIDER-default(7)> =head1 COPYRIGHT -Copyright 2021-2022 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2021-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/doc/man7/openssl-env.pod b/crypto/openssl/doc/man7/openssl-env.pod index a71fc2c9a85f..b51a9b73e164 100644 --- a/crypto/openssl/doc/man7/openssl-env.pod +++ b/crypto/openssl/doc/man7/openssl-env.pod @@ -161,6 +161,8 @@ See L<RAND_load_file(3)>. =item B<SSL_CERT_DIR>, B<SSL_CERT_FILE> Specify the default directory or file containing CA certificates. +B<SSL_CERT_DIR> can contain multiple directories separated by colons +(or semicolons on Windows). See L<SSL_CTX_load_verify_locations(3)>. =item B<TSGET> diff --git a/crypto/openssl/doc/man7/provider-asym_cipher.pod b/crypto/openssl/doc/man7/provider-asym_cipher.pod index 0976a263a883..61c938ca9705 100644 --- a/crypto/openssl/doc/man7/provider-asym_cipher.pod +++ b/crypto/openssl/doc/man7/provider-asym_cipher.pod @@ -38,9 +38,9 @@ provider-asym_cipher - The asym_cipher library E<lt>-E<gt> provider functions /* Asymmetric Cipher parameters */ int OSSL_FUNC_asym_cipher_get_ctx_params(void *ctx, OSSL_PARAM params[]); - const OSSL_PARAM *OSSL_FUNC_asym_cipher_gettable_ctx_params(void *provctx); + const OSSL_PARAM *OSSL_FUNC_asym_cipher_gettable_ctx_params(void *ctx, void *provctx); int OSSL_FUNC_asym_cipher_set_ctx_params(void *ctx, const OSSL_PARAM params[]); - const OSSL_PARAM *OSSL_FUNC_asym_cipher_settable_ctx_params(void *provctx); + const OSSL_PARAM *OSSL_FUNC_asym_cipher_settable_ctx_params(void *ctx, void *provctx); =head1 DESCRIPTION @@ -258,7 +258,7 @@ The provider ASYM_CIPHER interface was introduced in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/fuzz/server.c b/crypto/openssl/fuzz/server.c index a15ce803f3b3..550e07d893a4 100644 --- a/crypto/openssl/fuzz/server.c +++ b/crypto/openssl/fuzz/server.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,1974 +26,257 @@ #include "fuzzer.h" static const uint8_t kCertificateDER[] = { - 0x30, - 0x82, - 0x02, - 0xff, - 0x30, - 0x82, - 0x01, - 0xe7, - 0xa0, - 0x03, - 0x02, - 0x01, - 0x02, - 0x02, - 0x11, - 0x00, - 0xb1, - 0x84, - 0xee, - 0x34, - 0x99, - 0x98, - 0x76, - 0xfb, - 0x6f, - 0xb2, - 0x15, - 0xc8, - 0x47, - 0x79, - 0x05, - 0x9b, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x0b, - 0x05, - 0x00, - 0x30, - 0x12, - 0x31, - 0x10, - 0x30, - 0x0e, - 0x06, - 0x03, - 0x55, - 0x04, - 0x0a, - 0x13, - 0x07, - 0x41, - 0x63, - 0x6d, - 0x65, - 0x20, - 0x43, - 0x6f, - 0x30, - 0x1e, - 0x17, - 0x0d, - 0x31, - 0x35, - 0x31, - 0x31, - 0x30, - 0x37, - 0x30, - 0x30, - 0x32, - 0x34, - 0x35, - 0x36, - 0x5a, - 0x17, - 0x0d, - 0x31, - 0x36, - 0x31, - 0x31, - 0x30, - 0x36, - 0x30, - 0x30, - 0x32, - 0x34, - 0x35, - 0x36, - 0x5a, - 0x30, - 0x12, - 0x31, - 0x10, - 0x30, - 0x0e, - 0x06, - 0x03, - 0x55, - 0x04, - 0x0a, - 0x13, - 0x07, - 0x41, - 0x63, - 0x6d, - 0x65, - 0x20, - 0x43, - 0x6f, - 0x30, - 0x82, - 0x01, - 0x22, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x01, - 0x05, - 0x00, - 0x03, - 0x82, - 0x01, - 0x0f, - 0x00, - 0x30, - 0x82, - 0x01, - 0x0a, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0xce, - 0x47, - 0xcb, - 0x11, - 0xbb, - 0xd2, - 0x9d, - 0x8e, - 0x9e, - 0xd2, - 0x1e, - 0x14, - 0xaf, - 0xc7, - 0xea, - 0xb6, - 0xc9, - 0x38, - 0x2a, - 0x6f, - 0xb3, - 0x7e, - 0xfb, - 0xbc, - 0xfc, - 0x59, - 0x42, - 0xb9, - 0x56, - 0xf0, - 0x4c, - 0x3f, - 0xf7, - 0x31, - 0x84, - 0xbe, - 0xac, - 0x03, - 0x9e, - 0x71, - 0x91, - 0x85, - 0xd8, - 0x32, - 0xbd, - 0x00, - 0xea, - 0xac, - 0x65, - 0xf6, - 0x03, - 0xc8, - 0x0f, - 0x8b, - 0xfd, - 0x6e, - 0x58, - 0x88, - 0x04, - 0x41, - 0x92, - 0x74, - 0xa6, - 0x57, - 0x2e, - 0x8e, - 0x88, - 0xd5, - 0x3d, - 0xda, - 0x14, - 0x3e, - 0x63, - 0x88, - 0x22, - 0xe3, - 0x53, - 0xe9, - 0xba, - 0x39, - 0x09, - 0xac, - 0xfb, - 0xd0, - 0x4c, - 0xf2, - 0x3c, - 0x20, - 0xd6, - 0x97, - 0xe6, - 0xed, - 0xf1, - 0x62, - 0x1e, - 0xe5, - 0xc9, - 0x48, - 0xa0, - 0xca, - 0x2e, - 0x3c, - 0x14, - 0x5a, - 0x82, - 0xd4, - 0xed, - 0xb1, - 0xe3, - 0x43, - 0xc1, - 0x2a, - 0x59, - 0xa5, - 0xb9, - 0xc8, - 0x48, - 0xa7, - 0x39, - 0x23, - 0x74, - 0xa7, - 0x37, - 0xb0, - 0x6f, - 0xc3, - 0x64, - 0x99, - 0x6c, - 0xa2, - 0x82, - 0xc8, - 0xf6, - 0xdb, - 0x86, - 0x40, - 0xce, - 0xd1, - 0x85, - 0x9f, - 0xce, - 0x69, - 0xf4, - 0x15, - 0x2a, - 0x23, - 0xca, - 0xea, - 0xb7, - 0x7b, - 0xdf, - 0xfb, - 0x43, - 0x5f, - 0xff, - 0x7a, - 0x49, - 0x49, - 0x0e, - 0xe7, - 0x02, - 0x51, - 0x45, - 0x13, - 0xe8, - 0x90, - 0x64, - 0x21, - 0x0c, - 0x26, - 0x2b, - 0x5d, - 0xfc, - 0xe4, - 0xb5, - 0x86, - 0x89, - 0x43, - 0x22, - 0x4c, - 0xf3, - 0x3b, - 0xf3, - 0x09, - 0xc4, - 0xa4, - 0x10, - 0x80, - 0xf2, - 0x46, - 0xe2, - 0x46, - 0x8f, - 0x76, - 0x50, - 0xbf, - 0xaf, - 0x2b, - 0x90, - 0x1b, - 0x78, - 0xc7, - 0xcf, - 0xc1, - 0x77, - 0xd0, - 0xfb, - 0xa9, - 0xfb, - 0xc9, - 0x66, - 0x5a, - 0xc5, - 0x9b, - 0x31, - 0x41, - 0x67, - 0x01, - 0xbe, - 0x33, - 0x10, - 0xba, - 0x05, - 0x58, - 0xed, - 0x76, - 0x53, - 0xde, - 0x5d, - 0xc1, - 0xe8, - 0xbb, - 0x9f, - 0xf1, - 0xcd, - 0xfb, - 0xdf, - 0x64, - 0x7f, - 0xd7, - 0x18, - 0xab, - 0x0f, - 0x94, - 0x28, - 0x95, - 0x4a, - 0xcc, - 0x6a, - 0xa9, - 0x50, - 0xc7, - 0x05, - 0x47, - 0x10, - 0x41, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0xa3, - 0x50, - 0x30, - 0x4e, - 0x30, - 0x0e, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x0f, - 0x01, - 0x01, - 0xff, - 0x04, - 0x04, - 0x03, - 0x02, - 0x05, - 0xa0, - 0x30, - 0x13, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x25, - 0x04, - 0x0c, - 0x30, - 0x0a, - 0x06, - 0x08, - 0x2b, - 0x06, - 0x01, - 0x05, - 0x05, - 0x07, - 0x03, - 0x01, - 0x30, - 0x0c, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x13, - 0x01, - 0x01, - 0xff, - 0x04, - 0x02, - 0x30, - 0x00, - 0x30, - 0x19, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x11, - 0x04, - 0x12, - 0x30, - 0x10, - 0x82, - 0x0e, - 0x66, - 0x75, - 0x7a, - 0x7a, - 0x2e, - 0x62, - 0x6f, - 0x72, - 0x69, - 0x6e, - 0x67, - 0x73, - 0x73, - 0x6c, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x0b, - 0x05, - 0x00, - 0x03, - 0x82, - 0x01, - 0x01, - 0x00, - 0x92, - 0xde, - 0xef, - 0x96, - 0x06, - 0x7b, - 0xff, - 0x71, - 0x7d, - 0x4e, - 0xa0, - 0x7d, - 0xae, - 0xb8, - 0x22, - 0xb4, - 0x2c, - 0xf7, - 0x96, - 0x9c, - 0x37, - 0x1d, - 0x8f, - 0xe7, - 0xd9, - 0x47, - 0xff, - 0x3f, - 0xe9, - 0x35, - 0x95, - 0x0e, - 0xdd, - 0xdc, - 0x7f, - 0xc8, - 0x8a, - 0x1e, - 0x36, - 0x1d, - 0x38, - 0x47, - 0xfc, - 0x76, - 0xd2, - 0x1f, - 0x98, - 0xa1, - 0x36, - 0xac, - 0xc8, - 0x70, - 0x38, - 0x0a, - 0x3d, - 0x51, - 0x8d, - 0x0f, - 0x03, - 0x1b, - 0xef, - 0x62, - 0xa1, - 0xcb, - 0x2b, - 0x4a, - 0x8c, - 0x12, - 0x2b, - 0x54, - 0x50, - 0x9a, - 0x6b, - 0xfe, - 0xaf, - 0xd9, - 0xf6, - 0xbf, - 0x58, - 0x11, - 0x58, - 0x5e, - 0xe5, - 0x86, - 0x1e, - 0x3b, - 0x6b, - 0x30, - 0x7e, - 0x72, - 0x89, - 0xe8, - 0x6b, - 0x7b, - 0xb7, - 0xaf, - 0xef, - 0x8b, - 0xa9, - 0x3e, - 0xb0, - 0xcd, - 0x0b, - 0xef, - 0xb0, - 0x0c, - 0x96, - 0x2b, - 0xc5, - 0x3b, - 0xd5, - 0xf1, - 0xc2, - 0xae, - 0x3a, - 0x60, - 0xd9, - 0x0f, - 0x75, - 0x37, - 0x55, - 0x4d, - 0x62, - 0xd2, - 0xed, - 0x96, - 0xac, - 0x30, - 0x6b, - 0xda, - 0xa1, - 0x48, - 0x17, - 0x96, - 0x23, - 0x85, - 0x9a, - 0x57, - 0x77, - 0xe9, - 0x22, - 0xa2, - 0x37, - 0x03, - 0xba, - 0x49, - 0x77, - 0x40, - 0x3b, - 0x76, - 0x4b, - 0xda, - 0xc1, - 0x04, - 0x57, - 0x55, - 0x34, - 0x22, - 0x83, - 0x45, - 0x29, - 0xab, - 0x2e, - 0x11, - 0xff, - 0x0d, - 0xab, - 0x55, - 0xb1, - 0xa7, - 0x58, - 0x59, - 0x05, - 0x25, - 0xf9, - 0x1e, - 0x3d, - 0xb7, - 0xac, - 0x04, - 0x39, - 0x2c, - 0xf9, - 0xaf, - 0xb8, - 0x68, - 0xfb, - 0x8e, - 0x35, - 0x71, - 0x32, - 0xff, - 0x70, - 0xe9, - 0x46, - 0x6d, - 0x5c, - 0x06, - 0x90, - 0x88, - 0x23, - 0x48, - 0x0c, - 0x50, - 0xeb, - 0x0a, - 0xa9, - 0xae, - 0xe8, - 0xfc, - 0xbe, - 0xa5, - 0x76, - 0x94, - 0xd7, - 0x64, - 0x22, - 0x38, - 0x98, - 0x17, - 0xa4, - 0x3a, - 0xa7, - 0x59, - 0x9f, - 0x1d, - 0x3b, - 0x75, - 0x90, - 0x1a, - 0x81, - 0xef, - 0x19, - 0xfb, - 0x2b, - 0xb7, - 0xa7, - 0x64, - 0x61, - 0x22, - 0xa4, - 0x6f, - 0x7b, - 0xfa, - 0x58, - 0xbb, - 0x8c, - 0x4e, - 0x77, - 0x67, - 0xd0, - 0x5d, - 0x58, - 0x76, - 0x8a, - 0xbb, + 0x30, 0x82, 0x02, 0xff, 0x30, 0x82, 0x01, 0xe7, + 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x11, 0x00, + 0xb1, 0x84, 0xee, 0x34, 0x99, 0x98, 0x76, 0xfb, + 0x6f, 0xb2, 0x15, 0xc8, 0x47, 0x79, 0x05, 0x9b, + 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, + 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, + 0x12, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, + 0x04, 0x0a, 0x13, 0x07, 0x41, 0x63, 0x6d, 0x65, + 0x20, 0x43, 0x6f, 0x30, 0x1e, 0x17, 0x0d, 0x31, + 0x35, 0x31, 0x31, 0x30, 0x37, 0x30, 0x30, 0x32, + 0x34, 0x35, 0x36, 0x5a, 0x17, 0x0d, 0x31, 0x36, + 0x31, 0x31, 0x30, 0x36, 0x30, 0x30, 0x32, 0x34, + 0x35, 0x36, 0x5a, 0x30, 0x12, 0x31, 0x10, 0x30, + 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07, + 0x41, 0x63, 0x6d, 0x65, 0x20, 0x43, 0x6f, 0x30, + 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, + 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, + 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, + 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, + 0xce, 0x47, 0xcb, 0x11, 0xbb, 0xd2, 0x9d, 0x8e, + 0x9e, 0xd2, 0x1e, 0x14, 0xaf, 0xc7, 0xea, 0xb6, + 0xc9, 0x38, 0x2a, 0x6f, 0xb3, 0x7e, 0xfb, 0xbc, + 0xfc, 0x59, 0x42, 0xb9, 0x56, 0xf0, 0x4c, 0x3f, + 0xf7, 0x31, 0x84, 0xbe, 0xac, 0x03, 0x9e, 0x71, + 0x91, 0x85, 0xd8, 0x32, 0xbd, 0x00, 0xea, 0xac, + 0x65, 0xf6, 0x03, 0xc8, 0x0f, 0x8b, 0xfd, 0x6e, + 0x58, 0x88, 0x04, 0x41, 0x92, 0x74, 0xa6, 0x57, + 0x2e, 0x8e, 0x88, 0xd5, 0x3d, 0xda, 0x14, 0x3e, + 0x63, 0x88, 0x22, 0xe3, 0x53, 0xe9, 0xba, 0x39, + 0x09, 0xac, 0xfb, 0xd0, 0x4c, 0xf2, 0x3c, 0x20, + 0xd6, 0x97, 0xe6, 0xed, 0xf1, 0x62, 0x1e, 0xe5, + 0xc9, 0x48, 0xa0, 0xca, 0x2e, 0x3c, 0x14, 0x5a, + 0x82, 0xd4, 0xed, 0xb1, 0xe3, 0x43, 0xc1, 0x2a, + 0x59, 0xa5, 0xb9, 0xc8, 0x48, 0xa7, 0x39, 0x23, + 0x74, 0xa7, 0x37, 0xb0, 0x6f, 0xc3, 0x64, 0x99, + 0x6c, 0xa2, 0x82, 0xc8, 0xf6, 0xdb, 0x86, 0x40, + 0xce, 0xd1, 0x85, 0x9f, 0xce, 0x69, 0xf4, 0x15, + 0x2a, 0x23, 0xca, 0xea, 0xb7, 0x7b, 0xdf, 0xfb, + 0x43, 0x5f, 0xff, 0x7a, 0x49, 0x49, 0x0e, 0xe7, + 0x02, 0x51, 0x45, 0x13, 0xe8, 0x90, 0x64, 0x21, + 0x0c, 0x26, 0x2b, 0x5d, 0xfc, 0xe4, 0xb5, 0x86, + 0x89, 0x43, 0x22, 0x4c, 0xf3, 0x3b, 0xf3, 0x09, + 0xc4, 0xa4, 0x10, 0x80, 0xf2, 0x46, 0xe2, 0x46, + 0x8f, 0x76, 0x50, 0xbf, 0xaf, 0x2b, 0x90, 0x1b, + 0x78, 0xc7, 0xcf, 0xc1, 0x77, 0xd0, 0xfb, 0xa9, + 0xfb, 0xc9, 0x66, 0x5a, 0xc5, 0x9b, 0x31, 0x41, + 0x67, 0x01, 0xbe, 0x33, 0x10, 0xba, 0x05, 0x58, + 0xed, 0x76, 0x53, 0xde, 0x5d, 0xc1, 0xe8, 0xbb, + 0x9f, 0xf1, 0xcd, 0xfb, 0xdf, 0x64, 0x7f, 0xd7, + 0x18, 0xab, 0x0f, 0x94, 0x28, 0x95, 0x4a, 0xcc, + 0x6a, 0xa9, 0x50, 0xc7, 0x05, 0x47, 0x10, 0x41, + 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x50, 0x30, + 0x4e, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, + 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x05, + 0xa0, 0x30, 0x13, 0x06, 0x03, 0x55, 0x1d, 0x25, + 0x04, 0x0c, 0x30, 0x0a, 0x06, 0x08, 0x2b, 0x06, + 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x30, 0x0c, + 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, + 0x04, 0x02, 0x30, 0x00, 0x30, 0x19, 0x06, 0x03, + 0x55, 0x1d, 0x11, 0x04, 0x12, 0x30, 0x10, 0x82, + 0x0e, 0x66, 0x75, 0x7a, 0x7a, 0x2e, 0x62, 0x6f, + 0x72, 0x69, 0x6e, 0x67, 0x73, 0x73, 0x6c, 0x30, + 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, + 0x01, 0x01, 0x00, 0x92, 0xde, 0xef, 0x96, 0x06, + 0x7b, 0xff, 0x71, 0x7d, 0x4e, 0xa0, 0x7d, 0xae, + 0xb8, 0x22, 0xb4, 0x2c, 0xf7, 0x96, 0x9c, 0x37, + 0x1d, 0x8f, 0xe7, 0xd9, 0x47, 0xff, 0x3f, 0xe9, + 0x35, 0x95, 0x0e, 0xdd, 0xdc, 0x7f, 0xc8, 0x8a, + 0x1e, 0x36, 0x1d, 0x38, 0x47, 0xfc, 0x76, 0xd2, + 0x1f, 0x98, 0xa1, 0x36, 0xac, 0xc8, 0x70, 0x38, + 0x0a, 0x3d, 0x51, 0x8d, 0x0f, 0x03, 0x1b, 0xef, + 0x62, 0xa1, 0xcb, 0x2b, 0x4a, 0x8c, 0x12, 0x2b, + 0x54, 0x50, 0x9a, 0x6b, 0xfe, 0xaf, 0xd9, 0xf6, + 0xbf, 0x58, 0x11, 0x58, 0x5e, 0xe5, 0x86, 0x1e, + 0x3b, 0x6b, 0x30, 0x7e, 0x72, 0x89, 0xe8, 0x6b, + 0x7b, 0xb7, 0xaf, 0xef, 0x8b, 0xa9, 0x3e, 0xb0, + 0xcd, 0x0b, 0xef, 0xb0, 0x0c, 0x96, 0x2b, 0xc5, + 0x3b, 0xd5, 0xf1, 0xc2, 0xae, 0x3a, 0x60, 0xd9, + 0x0f, 0x75, 0x37, 0x55, 0x4d, 0x62, 0xd2, 0xed, + 0x96, 0xac, 0x30, 0x6b, 0xda, 0xa1, 0x48, 0x17, + 0x96, 0x23, 0x85, 0x9a, 0x57, 0x77, 0xe9, 0x22, + 0xa2, 0x37, 0x03, 0xba, 0x49, 0x77, 0x40, 0x3b, + 0x76, 0x4b, 0xda, 0xc1, 0x04, 0x57, 0x55, 0x34, + 0x22, 0x83, 0x45, 0x29, 0xab, 0x2e, 0x11, 0xff, + 0x0d, 0xab, 0x55, 0xb1, 0xa7, 0x58, 0x59, 0x05, + 0x25, 0xf9, 0x1e, 0x3d, 0xb7, 0xac, 0x04, 0x39, + 0x2c, 0xf9, 0xaf, 0xb8, 0x68, 0xfb, 0x8e, 0x35, + 0x71, 0x32, 0xff, 0x70, 0xe9, 0x46, 0x6d, 0x5c, + 0x06, 0x90, 0x88, 0x23, 0x48, 0x0c, 0x50, 0xeb, + 0x0a, 0xa9, 0xae, 0xe8, 0xfc, 0xbe, 0xa5, 0x76, + 0x94, 0xd7, 0x64, 0x22, 0x38, 0x98, 0x17, 0xa4, + 0x3a, 0xa7, 0x59, 0x9f, 0x1d, 0x3b, 0x75, 0x90, + 0x1a, 0x81, 0xef, 0x19, 0xfb, 0x2b, 0xb7, 0xa7, + 0x64, 0x61, 0x22, 0xa4, 0x6f, 0x7b, 0xfa, 0x58, + 0xbb, 0x8c, 0x4e, 0x77, 0x67, 0xd0, 0x5d, 0x58, + 0x76, 0x8a, 0xbb }; #ifndef OPENSSL_NO_DEPRECATED_3_0 static const uint8_t kRSAPrivateKeyDER[] = { - 0x30, - 0x82, - 0x04, - 0xa5, - 0x02, - 0x01, - 0x00, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0xce, - 0x47, - 0xcb, - 0x11, - 0xbb, - 0xd2, - 0x9d, - 0x8e, - 0x9e, - 0xd2, - 0x1e, - 0x14, - 0xaf, - 0xc7, - 0xea, - 0xb6, - 0xc9, - 0x38, - 0x2a, - 0x6f, - 0xb3, - 0x7e, - 0xfb, - 0xbc, - 0xfc, - 0x59, - 0x42, - 0xb9, - 0x56, - 0xf0, - 0x4c, - 0x3f, - 0xf7, - 0x31, - 0x84, - 0xbe, - 0xac, - 0x03, - 0x9e, - 0x71, - 0x91, - 0x85, - 0xd8, - 0x32, - 0xbd, - 0x00, - 0xea, - 0xac, - 0x65, - 0xf6, - 0x03, - 0xc8, - 0x0f, - 0x8b, - 0xfd, - 0x6e, - 0x58, - 0x88, - 0x04, - 0x41, - 0x92, - 0x74, - 0xa6, - 0x57, - 0x2e, - 0x8e, - 0x88, - 0xd5, - 0x3d, - 0xda, - 0x14, - 0x3e, - 0x63, - 0x88, - 0x22, - 0xe3, - 0x53, - 0xe9, - 0xba, - 0x39, - 0x09, - 0xac, - 0xfb, - 0xd0, - 0x4c, - 0xf2, - 0x3c, - 0x20, - 0xd6, - 0x97, - 0xe6, - 0xed, - 0xf1, - 0x62, - 0x1e, - 0xe5, - 0xc9, - 0x48, - 0xa0, - 0xca, - 0x2e, - 0x3c, - 0x14, - 0x5a, - 0x82, - 0xd4, - 0xed, - 0xb1, - 0xe3, - 0x43, - 0xc1, - 0x2a, - 0x59, - 0xa5, - 0xb9, - 0xc8, - 0x48, - 0xa7, - 0x39, - 0x23, - 0x74, - 0xa7, - 0x37, - 0xb0, - 0x6f, - 0xc3, - 0x64, - 0x99, - 0x6c, - 0xa2, - 0x82, - 0xc8, - 0xf6, - 0xdb, - 0x86, - 0x40, - 0xce, - 0xd1, - 0x85, - 0x9f, - 0xce, - 0x69, - 0xf4, - 0x15, - 0x2a, - 0x23, - 0xca, - 0xea, - 0xb7, - 0x7b, - 0xdf, - 0xfb, - 0x43, - 0x5f, - 0xff, - 0x7a, - 0x49, - 0x49, - 0x0e, - 0xe7, - 0x02, - 0x51, - 0x45, - 0x13, - 0xe8, - 0x90, - 0x64, - 0x21, - 0x0c, - 0x26, - 0x2b, - 0x5d, - 0xfc, - 0xe4, - 0xb5, - 0x86, - 0x89, - 0x43, - 0x22, - 0x4c, - 0xf3, - 0x3b, - 0xf3, - 0x09, - 0xc4, - 0xa4, - 0x10, - 0x80, - 0xf2, - 0x46, - 0xe2, - 0x46, - 0x8f, - 0x76, - 0x50, - 0xbf, - 0xaf, - 0x2b, - 0x90, - 0x1b, - 0x78, - 0xc7, - 0xcf, - 0xc1, - 0x77, - 0xd0, - 0xfb, - 0xa9, - 0xfb, - 0xc9, - 0x66, - 0x5a, - 0xc5, - 0x9b, - 0x31, - 0x41, - 0x67, - 0x01, - 0xbe, - 0x33, - 0x10, - 0xba, - 0x05, - 0x58, - 0xed, - 0x76, - 0x53, - 0xde, - 0x5d, - 0xc1, - 0xe8, - 0xbb, - 0x9f, - 0xf1, - 0xcd, - 0xfb, - 0xdf, - 0x64, - 0x7f, - 0xd7, - 0x18, - 0xab, - 0x0f, - 0x94, - 0x28, - 0x95, - 0x4a, - 0xcc, - 0x6a, - 0xa9, - 0x50, - 0xc7, - 0x05, - 0x47, - 0x10, - 0x41, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0xa8, - 0x47, - 0xb9, - 0x4a, - 0x06, - 0x47, - 0x93, - 0x71, - 0x3d, - 0xef, - 0x7b, - 0xca, - 0xb4, - 0x7c, - 0x0a, - 0xe6, - 0x82, - 0xd0, - 0xe7, - 0x0d, - 0xa9, - 0x08, - 0xf6, - 0xa4, - 0xfd, - 0xd8, - 0x73, - 0xae, - 0x6f, - 0x56, - 0x29, - 0x5e, - 0x25, - 0x72, - 0xa8, - 0x30, - 0x44, - 0x73, - 0xcf, - 0x56, - 0x26, - 0xb9, - 0x61, - 0xde, - 0x42, - 0x81, - 0xf4, - 0xf0, - 0x1f, - 0x5d, - 0xcb, - 0x47, - 0xf2, - 0x26, - 0xe9, - 0xe0, - 0x93, - 0x28, - 0xa3, - 0x10, - 0x3b, - 0x42, - 0x1e, - 0x51, - 0x11, - 0x12, - 0x06, - 0x5e, - 0xaf, - 0xce, - 0xb0, - 0xa5, - 0x14, - 0xdd, - 0x82, - 0x58, - 0xa1, - 0xa4, - 0x12, - 0xdf, - 0x65, - 0x1d, - 0x51, - 0x70, - 0x64, - 0xd5, - 0x58, - 0x68, - 0x11, - 0xa8, - 0x6a, - 0x23, - 0xc2, - 0xbf, - 0xa1, - 0x25, - 0x24, - 0x47, - 0xb3, - 0xa4, - 0x3c, - 0x83, - 0x96, - 0xb7, - 0x1f, - 0xf4, - 0x44, - 0xd4, - 0xd1, - 0xe9, - 0xfc, - 0x33, - 0x68, - 0x5e, - 0xe2, - 0x68, - 0x99, - 0x9c, - 0x91, - 0xe8, - 0x72, - 0xc9, - 0xd7, - 0x8c, - 0x80, - 0x20, - 0x8e, - 0x77, - 0x83, - 0x4d, - 0xe4, - 0xab, - 0xf9, - 0x74, - 0xa1, - 0xdf, - 0xd3, - 0xc0, - 0x0d, - 0x5b, - 0x05, - 0x51, - 0xc2, - 0x6f, - 0xb2, - 0x91, - 0x02, - 0xec, - 0xc0, - 0x02, - 0x1a, - 0x5c, - 0x91, - 0x05, - 0xf1, - 0xe3, - 0xfa, - 0x65, - 0xc2, - 0xad, - 0x24, - 0xe6, - 0xe5, - 0x3c, - 0xb6, - 0x16, - 0xf1, - 0xa1, - 0x67, - 0x1a, - 0x9d, - 0x37, - 0x56, - 0xbf, - 0x01, - 0xd7, - 0x3b, - 0x35, - 0x30, - 0x57, - 0x73, - 0xf4, - 0xf0, - 0x5e, - 0xa7, - 0xe8, - 0x0a, - 0xc1, - 0x94, - 0x17, - 0xcf, - 0x0a, - 0xbd, - 0xf5, - 0x31, - 0xa7, - 0x2d, - 0xf7, - 0xf5, - 0xd9, - 0x8c, - 0xc2, - 0x01, - 0xbd, - 0xda, - 0x16, - 0x8e, - 0xb9, - 0x30, - 0x40, - 0xa6, - 0x6e, - 0xbd, - 0xcd, - 0x4d, - 0x84, - 0x67, - 0x4e, - 0x0b, - 0xce, - 0xd5, - 0xef, - 0xf8, - 0x08, - 0x63, - 0x02, - 0xc6, - 0xc7, - 0xf7, - 0x67, - 0x92, - 0xe2, - 0x23, - 0x9d, - 0x27, - 0x22, - 0x1d, - 0xc6, - 0x67, - 0x5e, - 0x66, - 0xbf, - 0x03, - 0xb8, - 0xa9, - 0x67, - 0xd4, - 0x39, - 0xd8, - 0x75, - 0xfa, - 0xe8, - 0xed, - 0x56, - 0xb8, - 0x81, - 0x02, - 0x81, - 0x81, - 0x00, - 0xf7, - 0x46, - 0x68, - 0xc6, - 0x13, - 0xf8, - 0xba, - 0x0f, - 0x83, - 0xdb, - 0x05, - 0xa8, - 0x25, - 0x00, - 0x70, - 0x9c, - 0x9e, - 0x8b, - 0x12, - 0x34, - 0x0d, - 0x96, - 0xcf, - 0x0d, - 0x98, - 0x9b, - 0x8d, - 0x9c, - 0x96, - 0x78, - 0xd1, - 0x3c, - 0x01, - 0x8c, - 0xb9, - 0x35, - 0x5c, - 0x20, - 0x42, - 0xb4, - 0x38, - 0xe3, - 0xd6, - 0x54, - 0xe7, - 0x55, - 0xd6, - 0x26, - 0x8a, - 0x0c, - 0xf6, - 0x1f, - 0xe0, - 0x04, - 0xc1, - 0x22, - 0x42, - 0x19, - 0x61, - 0xc4, - 0x94, - 0x7c, - 0x07, - 0x2e, - 0x80, - 0x52, - 0xfe, - 0x8d, - 0xe6, - 0x92, - 0x3a, - 0x91, - 0xfe, - 0x72, - 0x99, - 0xe1, - 0x2a, - 0x73, - 0x76, - 0xb1, - 0x24, - 0x20, - 0x67, - 0xde, - 0x28, - 0xcb, - 0x0e, - 0xe6, - 0x52, - 0xb5, - 0xfa, - 0xfb, - 0x8b, - 0x1e, - 0x6a, - 0x1d, - 0x09, - 0x26, - 0xb9, - 0xa7, - 0x61, - 0xba, - 0xf8, - 0x79, - 0xd2, - 0x66, - 0x57, - 0x28, - 0xd7, - 0x31, - 0xb5, - 0x0b, - 0x27, - 0x19, - 0x1e, - 0x6f, - 0x46, - 0xfc, - 0x54, - 0x95, - 0xeb, - 0x78, - 0x01, - 0xb6, - 0xd9, - 0x79, - 0x5a, - 0x4d, - 0x02, - 0x81, - 0x81, - 0x00, - 0xd5, - 0x8f, - 0x16, - 0x53, - 0x2f, - 0x57, - 0x93, - 0xbf, - 0x09, - 0x75, - 0xbf, - 0x63, - 0x40, - 0x3d, - 0x27, - 0xfd, - 0x23, - 0x21, - 0xde, - 0x9b, - 0xe9, - 0x73, - 0x3f, - 0x49, - 0x02, - 0xd2, - 0x38, - 0x96, - 0xcf, - 0xc3, - 0xba, - 0x92, - 0x07, - 0x87, - 0x52, - 0xa9, - 0x35, - 0xe3, - 0x0c, - 0xe4, - 0x2f, - 0x05, - 0x7b, - 0x37, - 0xa5, - 0x40, - 0x9c, - 0x3b, - 0x94, - 0xf7, - 0xad, - 0xa0, - 0xee, - 0x3a, - 0xa8, - 0xfb, - 0x1f, - 0x11, - 0x1f, - 0xd8, - 0x9a, - 0x80, - 0x42, - 0x3d, - 0x7f, - 0xa4, - 0xb8, - 0x9a, - 0xaa, - 0xea, - 0x72, - 0xc1, - 0xe3, - 0xed, - 0x06, - 0x60, - 0x92, - 0x37, - 0xf9, - 0xba, - 0xfb, - 0x9e, - 0xed, - 0x05, - 0xa6, - 0xd4, - 0x72, - 0x68, - 0x4f, - 0x63, - 0xfe, - 0xd6, - 0x10, - 0x0d, - 0x4f, - 0x0a, - 0x93, - 0xc6, - 0xb9, - 0xd7, - 0xaf, - 0xfd, - 0xd9, - 0x57, - 0x7d, - 0xcb, - 0x75, - 0xe8, - 0x93, - 0x2b, - 0xae, - 0x4f, - 0xea, - 0xd7, - 0x30, - 0x0b, - 0x58, - 0x44, - 0x82, - 0x0f, - 0x84, - 0x5d, - 0x62, - 0x11, - 0x78, - 0xea, - 0x5f, - 0xc5, - 0x02, - 0x81, - 0x81, - 0x00, - 0x82, - 0x0c, - 0xc1, - 0xe6, - 0x0b, - 0x72, - 0xf1, - 0x48, - 0x5f, - 0xac, - 0xbd, - 0x98, - 0xe5, - 0x7d, - 0x09, - 0xbd, - 0x15, - 0x95, - 0x47, - 0x09, - 0xa1, - 0x6c, - 0x03, - 0x91, - 0xbf, - 0x05, - 0x70, - 0xc1, - 0x3e, - 0x52, - 0x64, - 0x99, - 0x0e, - 0xa7, - 0x98, - 0x70, - 0xfb, - 0xf6, - 0xeb, - 0x9e, - 0x25, - 0x9d, - 0x8e, - 0x88, - 0x30, - 0xf2, - 0xf0, - 0x22, - 0x6c, - 0xd0, - 0xcc, - 0x51, - 0x8f, - 0x5c, - 0x70, - 0xc7, - 0x37, - 0xc4, - 0x69, - 0xab, - 0x1d, - 0xfc, - 0xed, - 0x3a, - 0x03, - 0xbb, - 0xa2, - 0xad, - 0xb6, - 0xea, - 0x89, - 0x6b, - 0x67, - 0x4b, - 0x96, - 0xaa, - 0xd9, - 0xcc, - 0xc8, - 0x4b, - 0xfa, - 0x18, - 0x21, - 0x08, - 0xb2, - 0xa3, - 0xb9, - 0x3e, - 0x61, - 0x99, - 0xdc, - 0x5a, - 0x97, - 0x9c, - 0x73, - 0x6a, - 0xb9, - 0xf9, - 0x68, - 0x03, - 0x24, - 0x5f, - 0x55, - 0x77, - 0x9c, - 0xb4, - 0xbe, - 0x7a, - 0x78, - 0x53, - 0x68, - 0x48, - 0x69, - 0x53, - 0xc8, - 0xb1, - 0xf5, - 0xbf, - 0x98, - 0x2d, - 0x11, - 0x1e, - 0x98, - 0xa8, - 0x36, - 0x50, - 0xa0, - 0xb1, - 0x02, - 0x81, - 0x81, - 0x00, - 0x90, - 0x88, - 0x30, - 0x71, - 0xc7, - 0xfe, - 0x9b, - 0x6d, - 0x95, - 0x37, - 0x6d, - 0x79, - 0xfc, - 0x85, - 0xe7, - 0x44, - 0x78, - 0xbc, - 0x79, - 0x6e, - 0x47, - 0x86, - 0xc9, - 0xf3, - 0xdd, - 0xc6, - 0xec, - 0xa9, - 0x94, - 0x9f, - 0x40, - 0xeb, - 0x87, - 0xd0, - 0xdb, - 0xee, - 0xcd, - 0x1b, - 0x87, - 0x23, - 0xff, - 0x76, - 0xd4, - 0x37, - 0x8a, - 0xcd, - 0xb9, - 0x6e, - 0xd1, - 0x98, - 0xf6, - 0x97, - 0x8d, - 0xe3, - 0x81, - 0x6d, - 0xc3, - 0x4e, - 0xd1, - 0xa0, - 0xc4, - 0x9f, - 0xbd, - 0x34, - 0xe5, - 0xe8, - 0x53, - 0x4f, - 0xca, - 0x10, - 0xb5, - 0xed, - 0xe7, - 0x16, - 0x09, - 0x54, - 0xde, - 0x60, - 0xa7, - 0xd1, - 0x16, - 0x6e, - 0x2e, - 0xb7, - 0xbe, - 0x7a, - 0xd5, - 0x9b, - 0x26, - 0xef, - 0xe4, - 0x0e, - 0x77, - 0xfa, - 0xa9, - 0xdd, - 0xdc, - 0xb9, - 0x88, - 0x19, - 0x23, - 0x70, - 0xc7, - 0xe1, - 0x60, - 0xaf, - 0x8c, - 0x73, - 0x04, - 0xf7, - 0x71, - 0x17, - 0x81, - 0x36, - 0x75, - 0xbb, - 0x97, - 0xd7, - 0x75, - 0xb6, - 0x8e, - 0xbc, - 0xac, - 0x9c, - 0x6a, - 0x9b, - 0x24, - 0x89, - 0x02, - 0x81, - 0x80, - 0x5a, - 0x2b, - 0xc7, - 0x6b, - 0x8c, - 0x65, - 0xdb, - 0x04, - 0x73, - 0xab, - 0x25, - 0xe1, - 0x5b, - 0xbc, - 0x3c, - 0xcf, - 0x5a, - 0x3c, - 0x04, - 0xae, - 0x97, - 0x2e, - 0xfd, - 0xa4, - 0x97, - 0x1f, - 0x05, - 0x17, - 0x27, - 0xac, - 0x7c, - 0x30, - 0x85, - 0xb4, - 0x82, - 0x3f, - 0x5b, - 0xb7, - 0x94, - 0x3b, - 0x7f, - 0x6c, - 0x0c, - 0xc7, - 0x16, - 0xc6, - 0xa0, - 0xbd, - 0x80, - 0xb0, - 0x81, - 0xde, - 0xa0, - 0x23, - 0xa6, - 0xf6, - 0x75, - 0x33, - 0x51, - 0x35, - 0xa2, - 0x75, - 0x55, - 0x70, - 0x4d, - 0x42, - 0xbb, - 0xcf, - 0x54, - 0xe4, - 0xdb, - 0x2d, - 0x88, - 0xa0, - 0x7a, - 0xf2, - 0x17, - 0xa7, - 0xdd, - 0x13, - 0x44, - 0x9f, - 0x5f, - 0x6b, - 0x2c, - 0x42, - 0x42, - 0x8b, - 0x13, - 0x4d, - 0xf9, - 0x5b, - 0xf8, - 0x33, - 0x42, - 0xd9, - 0x9e, - 0x50, - 0x1c, - 0x7c, - 0xbc, - 0xfa, - 0x62, - 0x85, - 0x0b, - 0xcf, - 0x99, - 0xda, - 0x9e, - 0x04, - 0x90, - 0xb2, - 0xc6, - 0xb2, - 0x0a, - 0x2a, - 0x7c, - 0x6d, - 0x6a, - 0x40, - 0xfc, - 0xf5, - 0x50, - 0x98, - 0x46, - 0x89, - 0x82, - 0x40, + 0x30, 0x82, 0x04, 0xa5, 0x02, 0x01, 0x00, 0x02, + 0x82, 0x01, 0x01, 0x00, 0xce, 0x47, 0xcb, 0x11, + 0xbb, 0xd2, 0x9d, 0x8e, 0x9e, 0xd2, 0x1e, 0x14, + 0xaf, 0xc7, 0xea, 0xb6, 0xc9, 0x38, 0x2a, 0x6f, + 0xb3, 0x7e, 0xfb, 0xbc, 0xfc, 0x59, 0x42, 0xb9, + 0x56, 0xf0, 0x4c, 0x3f, 0xf7, 0x31, 0x84, 0xbe, + 0xac, 0x03, 0x9e, 0x71, 0x91, 0x85, 0xd8, 0x32, + 0xbd, 0x00, 0xea, 0xac, 0x65, 0xf6, 0x03, 0xc8, + 0x0f, 0x8b, 0xfd, 0x6e, 0x58, 0x88, 0x04, 0x41, + 0x92, 0x74, 0xa6, 0x57, 0x2e, 0x8e, 0x88, 0xd5, + 0x3d, 0xda, 0x14, 0x3e, 0x63, 0x88, 0x22, 0xe3, + 0x53, 0xe9, 0xba, 0x39, 0x09, 0xac, 0xfb, 0xd0, + 0x4c, 0xf2, 0x3c, 0x20, 0xd6, 0x97, 0xe6, 0xed, + 0xf1, 0x62, 0x1e, 0xe5, 0xc9, 0x48, 0xa0, 0xca, + 0x2e, 0x3c, 0x14, 0x5a, 0x82, 0xd4, 0xed, 0xb1, + 0xe3, 0x43, 0xc1, 0x2a, 0x59, 0xa5, 0xb9, 0xc8, + 0x48, 0xa7, 0x39, 0x23, 0x74, 0xa7, 0x37, 0xb0, + 0x6f, 0xc3, 0x64, 0x99, 0x6c, 0xa2, 0x82, 0xc8, + 0xf6, 0xdb, 0x86, 0x40, 0xce, 0xd1, 0x85, 0x9f, + 0xce, 0x69, 0xf4, 0x15, 0x2a, 0x23, 0xca, 0xea, + 0xb7, 0x7b, 0xdf, 0xfb, 0x43, 0x5f, 0xff, 0x7a, + 0x49, 0x49, 0x0e, 0xe7, 0x02, 0x51, 0x45, 0x13, + 0xe8, 0x90, 0x64, 0x21, 0x0c, 0x26, 0x2b, 0x5d, + 0xfc, 0xe4, 0xb5, 0x86, 0x89, 0x43, 0x22, 0x4c, + 0xf3, 0x3b, 0xf3, 0x09, 0xc4, 0xa4, 0x10, 0x80, + 0xf2, 0x46, 0xe2, 0x46, 0x8f, 0x76, 0x50, 0xbf, + 0xaf, 0x2b, 0x90, 0x1b, 0x78, 0xc7, 0xcf, 0xc1, + 0x77, 0xd0, 0xfb, 0xa9, 0xfb, 0xc9, 0x66, 0x5a, + 0xc5, 0x9b, 0x31, 0x41, 0x67, 0x01, 0xbe, 0x33, + 0x10, 0xba, 0x05, 0x58, 0xed, 0x76, 0x53, 0xde, + 0x5d, 0xc1, 0xe8, 0xbb, 0x9f, 0xf1, 0xcd, 0xfb, + 0xdf, 0x64, 0x7f, 0xd7, 0x18, 0xab, 0x0f, 0x94, + 0x28, 0x95, 0x4a, 0xcc, 0x6a, 0xa9, 0x50, 0xc7, + 0x05, 0x47, 0x10, 0x41, 0x02, 0x03, 0x01, 0x00, + 0x01, 0x02, 0x82, 0x01, 0x01, 0x00, 0xa8, 0x47, + 0xb9, 0x4a, 0x06, 0x47, 0x93, 0x71, 0x3d, 0xef, + 0x7b, 0xca, 0xb4, 0x7c, 0x0a, 0xe6, 0x82, 0xd0, + 0xe7, 0x0d, 0xa9, 0x08, 0xf6, 0xa4, 0xfd, 0xd8, + 0x73, 0xae, 0x6f, 0x56, 0x29, 0x5e, 0x25, 0x72, + 0xa8, 0x30, 0x44, 0x73, 0xcf, 0x56, 0x26, 0xb9, + 0x61, 0xde, 0x42, 0x81, 0xf4, 0xf0, 0x1f, 0x5d, + 0xcb, 0x47, 0xf2, 0x26, 0xe9, 0xe0, 0x93, 0x28, + 0xa3, 0x10, 0x3b, 0x42, 0x1e, 0x51, 0x11, 0x12, + 0x06, 0x5e, 0xaf, 0xce, 0xb0, 0xa5, 0x14, 0xdd, + 0x82, 0x58, 0xa1, 0xa4, 0x12, 0xdf, 0x65, 0x1d, + 0x51, 0x70, 0x64, 0xd5, 0x58, 0x68, 0x11, 0xa8, + 0x6a, 0x23, 0xc2, 0xbf, 0xa1, 0x25, 0x24, 0x47, + 0xb3, 0xa4, 0x3c, 0x83, 0x96, 0xb7, 0x1f, 0xf4, + 0x44, 0xd4, 0xd1, 0xe9, 0xfc, 0x33, 0x68, 0x5e, + 0xe2, 0x68, 0x99, 0x9c, 0x91, 0xe8, 0x72, 0xc9, + 0xd7, 0x8c, 0x80, 0x20, 0x8e, 0x77, 0x83, 0x4d, + 0xe4, 0xab, 0xf9, 0x74, 0xa1, 0xdf, 0xd3, 0xc0, + 0x0d, 0x5b, 0x05, 0x51, 0xc2, 0x6f, 0xb2, 0x91, + 0x02, 0xec, 0xc0, 0x02, 0x1a, 0x5c, 0x91, 0x05, + 0xf1, 0xe3, 0xfa, 0x65, 0xc2, 0xad, 0x24, 0xe6, + 0xe5, 0x3c, 0xb6, 0x16, 0xf1, 0xa1, 0x67, 0x1a, + 0x9d, 0x37, 0x56, 0xbf, 0x01, 0xd7, 0x3b, 0x35, + 0x30, 0x57, 0x73, 0xf4, 0xf0, 0x5e, 0xa7, 0xe8, + 0x0a, 0xc1, 0x94, 0x17, 0xcf, 0x0a, 0xbd, 0xf5, + 0x31, 0xa7, 0x2d, 0xf7, 0xf5, 0xd9, 0x8c, 0xc2, + 0x01, 0xbd, 0xda, 0x16, 0x8e, 0xb9, 0x30, 0x40, + 0xa6, 0x6e, 0xbd, 0xcd, 0x4d, 0x84, 0x67, 0x4e, + 0x0b, 0xce, 0xd5, 0xef, 0xf8, 0x08, 0x63, 0x02, + 0xc6, 0xc7, 0xf7, 0x67, 0x92, 0xe2, 0x23, 0x9d, + 0x27, 0x22, 0x1d, 0xc6, 0x67, 0x5e, 0x66, 0xbf, + 0x03, 0xb8, 0xa9, 0x67, 0xd4, 0x39, 0xd8, 0x75, + 0xfa, 0xe8, 0xed, 0x56, 0xb8, 0x81, 0x02, 0x81, + 0x81, 0x00, 0xf7, 0x46, 0x68, 0xc6, 0x13, 0xf8, + 0xba, 0x0f, 0x83, 0xdb, 0x05, 0xa8, 0x25, 0x00, + 0x70, 0x9c, 0x9e, 0x8b, 0x12, 0x34, 0x0d, 0x96, + 0xcf, 0x0d, 0x98, 0x9b, 0x8d, 0x9c, 0x96, 0x78, + 0xd1, 0x3c, 0x01, 0x8c, 0xb9, 0x35, 0x5c, 0x20, + 0x42, 0xb4, 0x38, 0xe3, 0xd6, 0x54, 0xe7, 0x55, + 0xd6, 0x26, 0x8a, 0x0c, 0xf6, 0x1f, 0xe0, 0x04, + 0xc1, 0x22, 0x42, 0x19, 0x61, 0xc4, 0x94, 0x7c, + 0x07, 0x2e, 0x80, 0x52, 0xfe, 0x8d, 0xe6, 0x92, + 0x3a, 0x91, 0xfe, 0x72, 0x99, 0xe1, 0x2a, 0x73, + 0x76, 0xb1, 0x24, 0x20, 0x67, 0xde, 0x28, 0xcb, + 0x0e, 0xe6, 0x52, 0xb5, 0xfa, 0xfb, 0x8b, 0x1e, + 0x6a, 0x1d, 0x09, 0x26, 0xb9, 0xa7, 0x61, 0xba, + 0xf8, 0x79, 0xd2, 0x66, 0x57, 0x28, 0xd7, 0x31, + 0xb5, 0x0b, 0x27, 0x19, 0x1e, 0x6f, 0x46, 0xfc, + 0x54, 0x95, 0xeb, 0x78, 0x01, 0xb6, 0xd9, 0x79, + 0x5a, 0x4d, 0x02, 0x81, 0x81, 0x00, 0xd5, 0x8f, + 0x16, 0x53, 0x2f, 0x57, 0x93, 0xbf, 0x09, 0x75, + 0xbf, 0x63, 0x40, 0x3d, 0x27, 0xfd, 0x23, 0x21, + 0xde, 0x9b, 0xe9, 0x73, 0x3f, 0x49, 0x02, 0xd2, + 0x38, 0x96, 0xcf, 0xc3, 0xba, 0x92, 0x07, 0x87, + 0x52, 0xa9, 0x35, 0xe3, 0x0c, 0xe4, 0x2f, 0x05, + 0x7b, 0x37, 0xa5, 0x40, 0x9c, 0x3b, 0x94, 0xf7, + 0xad, 0xa0, 0xee, 0x3a, 0xa8, 0xfb, 0x1f, 0x11, + 0x1f, 0xd8, 0x9a, 0x80, 0x42, 0x3d, 0x7f, 0xa4, + 0xb8, 0x9a, 0xaa, 0xea, 0x72, 0xc1, 0xe3, 0xed, + 0x06, 0x60, 0x92, 0x37, 0xf9, 0xba, 0xfb, 0x9e, + 0xed, 0x05, 0xa6, 0xd4, 0x72, 0x68, 0x4f, 0x63, + 0xfe, 0xd6, 0x10, 0x0d, 0x4f, 0x0a, 0x93, 0xc6, + 0xb9, 0xd7, 0xaf, 0xfd, 0xd9, 0x57, 0x7d, 0xcb, + 0x75, 0xe8, 0x93, 0x2b, 0xae, 0x4f, 0xea, 0xd7, + 0x30, 0x0b, 0x58, 0x44, 0x82, 0x0f, 0x84, 0x5d, + 0x62, 0x11, 0x78, 0xea, 0x5f, 0xc5, 0x02, 0x81, + 0x81, 0x00, 0x82, 0x0c, 0xc1, 0xe6, 0x0b, 0x72, + 0xf1, 0x48, 0x5f, 0xac, 0xbd, 0x98, 0xe5, 0x7d, + 0x09, 0xbd, 0x15, 0x95, 0x47, 0x09, 0xa1, 0x6c, + 0x03, 0x91, 0xbf, 0x05, 0x70, 0xc1, 0x3e, 0x52, + 0x64, 0x99, 0x0e, 0xa7, 0x98, 0x70, 0xfb, 0xf6, + 0xeb, 0x9e, 0x25, 0x9d, 0x8e, 0x88, 0x30, 0xf2, + 0xf0, 0x22, 0x6c, 0xd0, 0xcc, 0x51, 0x8f, 0x5c, + 0x70, 0xc7, 0x37, 0xc4, 0x69, 0xab, 0x1d, 0xfc, + 0xed, 0x3a, 0x03, 0xbb, 0xa2, 0xad, 0xb6, 0xea, + 0x89, 0x6b, 0x67, 0x4b, 0x96, 0xaa, 0xd9, 0xcc, + 0xc8, 0x4b, 0xfa, 0x18, 0x21, 0x08, 0xb2, 0xa3, + 0xb9, 0x3e, 0x61, 0x99, 0xdc, 0x5a, 0x97, 0x9c, + 0x73, 0x6a, 0xb9, 0xf9, 0x68, 0x03, 0x24, 0x5f, + 0x55, 0x77, 0x9c, 0xb4, 0xbe, 0x7a, 0x78, 0x53, + 0x68, 0x48, 0x69, 0x53, 0xc8, 0xb1, 0xf5, 0xbf, + 0x98, 0x2d, 0x11, 0x1e, 0x98, 0xa8, 0x36, 0x50, + 0xa0, 0xb1, 0x02, 0x81, 0x81, 0x00, 0x90, 0x88, + 0x30, 0x71, 0xc7, 0xfe, 0x9b, 0x6d, 0x95, 0x37, + 0x6d, 0x79, 0xfc, 0x85, 0xe7, 0x44, 0x78, 0xbc, + 0x79, 0x6e, 0x47, 0x86, 0xc9, 0xf3, 0xdd, 0xc6, + 0xec, 0xa9, 0x94, 0x9f, 0x40, 0xeb, 0x87, 0xd0, + 0xdb, 0xee, 0xcd, 0x1b, 0x87, 0x23, 0xff, 0x76, + 0xd4, 0x37, 0x8a, 0xcd, 0xb9, 0x6e, 0xd1, 0x98, + 0xf6, 0x97, 0x8d, 0xe3, 0x81, 0x6d, 0xc3, 0x4e, + 0xd1, 0xa0, 0xc4, 0x9f, 0xbd, 0x34, 0xe5, 0xe8, + 0x53, 0x4f, 0xca, 0x10, 0xb5, 0xed, 0xe7, 0x16, + 0x09, 0x54, 0xde, 0x60, 0xa7, 0xd1, 0x16, 0x6e, + 0x2e, 0xb7, 0xbe, 0x7a, 0xd5, 0x9b, 0x26, 0xef, + 0xe4, 0x0e, 0x77, 0xfa, 0xa9, 0xdd, 0xdc, 0xb9, + 0x88, 0x19, 0x23, 0x70, 0xc7, 0xe1, 0x60, 0xaf, + 0x8c, 0x73, 0x04, 0xf7, 0x71, 0x17, 0x81, 0x36, + 0x75, 0xbb, 0x97, 0xd7, 0x75, 0xb6, 0x8e, 0xbc, + 0xac, 0x9c, 0x6a, 0x9b, 0x24, 0x89, 0x02, 0x81, + 0x80, 0x5a, 0x2b, 0xc7, 0x6b, 0x8c, 0x65, 0xdb, + 0x04, 0x73, 0xab, 0x25, 0xe1, 0x5b, 0xbc, 0x3c, + 0xcf, 0x5a, 0x3c, 0x04, 0xae, 0x97, 0x2e, 0xfd, + 0xa4, 0x97, 0x1f, 0x05, 0x17, 0x27, 0xac, 0x7c, + 0x30, 0x85, 0xb4, 0x82, 0x3f, 0x5b, 0xb7, 0x94, + 0x3b, 0x7f, 0x6c, 0x0c, 0xc7, 0x16, 0xc6, 0xa0, + 0xbd, 0x80, 0xb0, 0x81, 0xde, 0xa0, 0x23, 0xa6, + 0xf6, 0x75, 0x33, 0x51, 0x35, 0xa2, 0x75, 0x55, + 0x70, 0x4d, 0x42, 0xbb, 0xcf, 0x54, 0xe4, 0xdb, + 0x2d, 0x88, 0xa0, 0x7a, 0xf2, 0x17, 0xa7, 0xdd, + 0x13, 0x44, 0x9f, 0x5f, 0x6b, 0x2c, 0x42, 0x42, + 0x8b, 0x13, 0x4d, 0xf9, 0x5b, 0xf8, 0x33, 0x42, + 0xd9, 0x9e, 0x50, 0x1c, 0x7c, 0xbc, 0xfa, 0x62, + 0x85, 0x0b, 0xcf, 0x99, 0xda, 0x9e, 0x04, 0x90, + 0xb2, 0xc6, 0xb2, 0x0a, 0x2a, 0x7c, 0x6d, 0x6a, + 0x40, 0xfc, 0xf5, 0x50, 0x98, 0x46, 0x89, 0x82, + 0x40 }; #endif diff --git a/crypto/openssl/include/openssl/bn.h b/crypto/openssl/include/openssl/bn.h index 424d5aa5872b..80cde873502f 100644 --- a/crypto/openssl/include/openssl/bn.h +++ b/crypto/openssl/include/openssl/bn.h @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -267,8 +267,8 @@ int BN_is_negative(const BIGNUM *b); int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); -#define BN_mod(rem, m, d, ctx) BN_div(NULL, (rem), (m), (d), (ctx)) -int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); +#define BN_mod(rem, a, m, ctx) BN_div(NULL, (rem), (a), (m), (ctx)) +int BN_nnmod(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, diff --git a/crypto/openssl/include/openssl/opensslv.h b/crypto/openssl/include/openssl/opensslv.h index 392a595c6449..973d80b924f2 100644 --- a/crypto/openssl/include/openssl/opensslv.h +++ b/crypto/openssl/include/openssl/opensslv.h @@ -34,7 +34,7 @@ extern "C" { # define OPENSSL_VERSION_MINOR 0 /* clang-format on */ /* clang-format off */ -# define OPENSSL_VERSION_PATCH 20 +# define OPENSSL_VERSION_PATCH 21 /* clang-format on */ /* @@ -87,10 +87,10 @@ extern "C" { * OPENSSL_VERSION_BUILD_METADATA_STR appended. */ /* clang-format off */ -# define OPENSSL_VERSION_STR "3.0.20" +# define OPENSSL_VERSION_STR "3.0.21" /* clang-format on */ /* clang-format off */ -# define OPENSSL_FULL_VERSION_STR "3.0.20" +# define OPENSSL_FULL_VERSION_STR "3.0.21" /* clang-format on */ /* @@ -99,7 +99,7 @@ extern "C" { * These strings are defined separately to allow them to be parsable. */ /* clang-format off */ -# define OPENSSL_RELEASE_DATE "7 Apr 2026" +# define OPENSSL_RELEASE_DATE "9 Jun 2026" /* clang-format on */ /* @@ -107,7 +107,7 @@ extern "C" { */ /* clang-format off */ -# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.20 7 Apr 2026" +# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.21 9 Jun 2026" /* clang-format on */ /* clang-format off */ diff --git a/crypto/openssl/include/openssl/ssl.h b/crypto/openssl/include/openssl/ssl.h index 8c9694f8b449..62d4e045fb50 100644 --- a/crypto/openssl/include/openssl/ssl.h +++ b/crypto/openssl/include/openssl/ssl.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by Makefile from include/openssl/ssl.h.in * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * @@ -2309,7 +2309,7 @@ size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx); __owur int SSL_session_reused(const SSL *s); __owur int SSL_is_server(const SSL *s); -__owur __owur SSL_CONF_CTX *SSL_CONF_CTX_new(void); +__owur SSL_CONF_CTX *SSL_CONF_CTX_new(void); int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx); void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx); unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags); diff --git a/crypto/openssl/include/openssl/ssl.h.in b/crypto/openssl/include/openssl/ssl.h.in index a1791275f963..54f1496ab51b 100644 --- a/crypto/openssl/include/openssl/ssl.h.in +++ b/crypto/openssl/include/openssl/ssl.h.in @@ -1,7 +1,7 @@ /* * {- join("\n * ", @autowarntext) -} * - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * @@ -2237,7 +2237,7 @@ size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx); __owur int SSL_session_reused(const SSL *s); __owur int SSL_is_server(const SSL *s); -__owur __owur SSL_CONF_CTX *SSL_CONF_CTX_new(void); +__owur SSL_CONF_CTX *SSL_CONF_CTX_new(void); int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx); void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx); unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags); diff --git a/crypto/openssl/providers/defltprov.c b/crypto/openssl/providers/defltprov.c index 9755431e7c0d..6533217b57be 100644 --- a/crypto/openssl/providers/defltprov.c +++ b/crypto/openssl/providers/defltprov.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -356,8 +356,10 @@ static const OSSL_ALGORITHM deflt_keyexch[] = { #endif { PROV_NAMES_TLS1_PRF, "provider=default", ossl_kdf_tls1_prf_keyexch_functions }, { PROV_NAMES_HKDF, "provider=default", ossl_kdf_hkdf_keyexch_functions }, +#ifndef OPENSSL_NO_SCRYPT { PROV_NAMES_SCRYPT, "provider=default", ossl_kdf_scrypt_keyexch_functions }, +#endif { NULL, NULL, NULL } }; @@ -384,8 +386,10 @@ static const OSSL_ALGORITHM deflt_signature[] = { #endif #endif { PROV_NAMES_HMAC, "provider=default", ossl_mac_legacy_hmac_signature_functions }, +#ifndef OPENSSL_NO_SIPHASH { PROV_NAMES_SIPHASH, "provider=default", ossl_mac_legacy_siphash_signature_functions }, +#endif #ifndef OPENSSL_NO_POLY1305 { PROV_NAMES_POLY1305, "provider=default", ossl_mac_legacy_poly1305_signature_functions }, @@ -440,12 +444,16 @@ static const OSSL_ALGORITHM deflt_keymgmt[] = { PROV_DESCS_TLS1_PRF_SIGN }, { PROV_NAMES_HKDF, "provider=default", ossl_kdf_keymgmt_functions, PROV_DESCS_HKDF_SIGN }, +#ifndef OPENSSL_NO_SCRYPT { PROV_NAMES_SCRYPT, "provider=default", ossl_kdf_keymgmt_functions, PROV_DESCS_SCRYPT_SIGN }, +#endif { PROV_NAMES_HMAC, "provider=default", ossl_mac_legacy_keymgmt_functions, PROV_DESCS_HMAC_SIGN }, +#ifndef OPENSSL_NO_SIPHASH { PROV_NAMES_SIPHASH, "provider=default", ossl_mac_legacy_keymgmt_functions, PROV_DESCS_SIPHASH_SIGN }, +#endif #ifndef OPENSSL_NO_POLY1305 { PROV_NAMES_POLY1305, "provider=default", ossl_mac_legacy_keymgmt_functions, PROV_DESCS_POLY1305_SIGN }, diff --git a/crypto/openssl/providers/fips-sources.checksums b/crypto/openssl/providers/fips-sources.checksums index e76b08ba86e4..5881131a0663 100644 --- a/crypto/openssl/providers/fips-sources.checksums +++ b/crypto/openssl/providers/fips-sources.checksums @@ -13,7 +13,7 @@ f1244cdeadcb4e48f35bc5df19d4cfaf07e0086ad951b84f07ff6966501faa5b crypto/aes/asm 290ae2a09826d24e83763415a021e328d41a163f41cff8c9e3b882e973677f33 crypto/aes/asm/aes-s390x.pl ee4e8cacef972942d2a89c1a83c984df9cad87c61a54383403c5c4864c403ba1 crypto/aes/asm/aes-sparcv9.pl 2b3b9ac56bf54334d053857a24bdb08592151e8a7a60b89b8195846b7f8ee7b5 crypto/aes/asm/aes-x86_64.pl -c56c324667b67d726e040d70379efba5b270e2937f403c1b5979018b836903c7 crypto/aes/asm/aesfx-sparcv9.pl +3b5ee174fa52d732d882ab4b2ffe59235d3bff66651714f32e743fcadaf1d970 crypto/aes/asm/aesfx-sparcv9.pl 14359dc32b7f4e5c08227fb9ac8f9232c1287399463b233fec4a2ab0c19f68d1 crypto/aes/asm/aesni-mb-x86_64.pl 2fe016e8098d1c959b6199ce98e91dfed9a3a543d6b068daf88d4c4c402701ec crypto/aes/asm/aesni-sha1-x86_64.pl 1d3acabadedb88d1327eeb76201ea9b3f4814f44898018ffae6c73e3f400b89b crypto/aes/asm/aesni-sha256-x86_64.pl @@ -72,7 +72,7 @@ da7f7780d27eed164797e5334cd45b35d9c113e86afaca051463aef9a8fd787c crypto/bn/asm/ 0ea8185a037a2951bb3d1e590bbbdeac305176d5e618f3e43a04c09733a9de34 crypto/bn/bn_add.c 099f332d813ce01a501b6c833ec9c84079c73e6d31542df1c7947113d687cbf2 crypto/bn/bn_asm.c 2a5bb3fcdd1ad7ec74d48497e099f90222cc5d50ce4be340372c0f4fb6632c92 crypto/bn/bn_blind.c -d3b5f02a17ba1c71261f6dad0d4785846567c8a03368d41fc1a6ee7c45aaff78 crypto/bn/bn_const.c +1b8f89064c287669a834fe032ef823796f7355ed7e6da08d6c56c0a4cd0bba01 crypto/bn/bn_const.c 58b587e20404efa408b31a88ba9c357059ced709bea78c07deb91df7b687db81 crypto/bn/bn_conv.c 184370000a8bb695f798b7b42887b8e418e4317cc65b3b32915a836fd1a4086d crypto/bn/bn_ctx.c b1b1c5fb8a45fde5755dfd5da62b68100b94f8c492c950719c108c384ea7f3c4 crypto/bn/bn_dh.c @@ -85,7 +85,7 @@ ce5219203bf869561297978d6d416357a441864cd801865503dfd455c481960c crypto/bn/bn_e ff147e5e032cc7c772b73a91fc6e24d8d9516e642d29354445d1f82d64b1d924 crypto/bn/bn_kron.c db803f7cc1ace380f9aeac10f316ec23c10d1e3f20f01fc6bd34d2c37a2b8d71 crypto/bn/bn_lib.c cd7bade0f2e223fe34f6e2f8cc87098ac8f0af96ec62ada5e67f6a2344d48ef0 crypto/bn/bn_local.h -a2788054137fd9c4495a8bfba97e8e5f901e96f84ea5b2719c326a9f9ec0eda9 crypto/bn/bn_mod.c +fe02ac39931c16dd5b1a70bf93822a9c8a7a9fd13369079120ba50b4e6ab3e8f crypto/bn/bn_mod.c 1e221a2dae6cf79b176f4edbf57cec219696c383f51fd6e9f512a0a9fb833386 crypto/bn/bn_mont.c c2a5230efbda6844b7b2eb10447b054496ae5029130d332536de6c3b12dc58a3 crypto/bn/bn_mpi.c 488dde761d25fb2eabd8acbea5b3b83520db7733480fab6499f60b8bf680b1ed crypto/bn/bn_mul.c @@ -161,8 +161,8 @@ bf8c2276a0c49b0bbf6fbc1a66369b49919b51d182ed26b2ee30938eb685942f crypto/ec/curv fba03776ab7d48874bfa00c575b3a8387b890f609873bd757c933d488803e71b crypto/ec/curve448/f_generic.c caadd1155b6d9384a7857b8b0f60fff2bd35826ec41b2c579f568a1734d45d71 crypto/ec/curve448/field.h 77bc6dd8c7d14a21760eb5e0dbf336eecc78835faa2f6f846824798303109d41 crypto/ec/curve448/point_448.h -6d007474cb42b16f98059f6eea6c09ef23552049207558fe46d071a613c8a314 crypto/ec/curve448/scalar.c -c0b5e93f120c7a5e0c0aba9877a445d0f5db85440491853b182266ee5f323361 crypto/ec/curve448/word.h +e29e78402540a4eaa853b1b9931aba66be0fdf1c82c6334587a69235e42f759a crypto/ec/curve448/scalar.c +606e5f72d40cef708cb4f7bbabc00bcd2b87fc0165854ade1b55ab2c021a8df2 crypto/ec/curve448/word.h f4490c0b575b79e63a897b1e85a87ede2645a2c521e67db461b3192884450d9d crypto/ec/ec2_oct.c bf80690d9f51b953e0de3f598d4dc470a692e3df7d3d4932ffd6cbd2efedfff0 crypto/ec/ec2_smpl.c 2a71bd8dbe4f427c117d990581709a4ddce07fa8e530794b5a9574fef7c48a0c crypto/ec/ec_asn1.c @@ -195,7 +195,7 @@ d90e5f6637abcbaa5afd5e59af2aaec5572351f087907ba0fb2e2db7ce93869b crypto/evp/dig 4ffc3fc5ee5f0dcadf1516f1cc29338f0f4d85c59881c06d5a777cf4e47a6d5f crypto/evp/ec_support.c 39378dddcc7cdd139694caadff7775b97e1e6cff1b6b26c2adf31251380a292a crypto/evp/evp_enc.c 3fd5f81de0b9547349825e1b6305c1acd9290d6ed80d240d570f42f3a081a376 crypto/evp/evp_fetch.c -d2960666aef9c626b40f0be825df235c84d283f2e073179bcaecbd9e01aa3ab0 crypto/evp/evp_lib.c +de8ebc6df79b172495b00eb8a320d7ed35f0a35ac12ef114aaf58581e0fdeb20 crypto/evp/evp_lib.c bd82993eb938cfd55a2af22aa7c2fa2a2c9ca8ac3c01aaa06de3b9599817e51d crypto/evp/evp_local.h 60b3fe3b2d5aa78d403d0bddd6b7135f6a385fc891211568a3e9cc284f6e7494 crypto/evp/evp_rand.c 0bdae4714221662282dccd5b1f2485370d24e463c11bdbb71a310f34616954fe crypto/evp/evp_utils.c @@ -218,7 +218,7 @@ f2acfb82aac20251d05a9c252cc6c282bd44e43feac4ac2e0faf68b9a38aef57 crypto/ex_data f4f84cade98907fa9905334b6c3c046b430b12b1460edac0617d82ca763620ab crypto/ffc/ffc_dh.c 854378f57707e31ad02cca6eec94369f91f327288d3665713e249c12f7b13211 crypto/ffc/ffc_key_generate.c 4e973d956d4ec2087994de8e963be1a512da1441f22e6e7b9cd7ee536e3ff834 crypto/ffc/ffc_key_validate.c -8b72d5a7452b2c15aec6d20027053a83f7df89d49a3b6cfedd77e2b1a29e9fc1 crypto/ffc/ffc_params.c +db67e235f2f20ff53c3f0d7507516f20de37232aaf8eb2560675dde7f32b4487 crypto/ffc/ffc_params.c c135c4b10a136a9401754f581e51e0536e475fbec64d4f2bd1e14e3e96a58797 crypto/ffc/ffc_params_generate.c e9a500ddbe96cb5b302fd2db74fac0924a6ac45732df5ee1c09e82b19d06ccfd crypto/ffc/ffc_params_validate.c 0a4fc92e408b0562cf95c480df93a9907a318a2c92356642903a5d50ed04fd88 crypto/hmac/hmac.c @@ -247,12 +247,12 @@ ca4be187fc1805d498f2adb823509f0519e214644029c18d331b5b01a0891a9d crypto/modes/c 2a0ab07286b70ce4aa0caf3b5b4be2c00eed3a6d855e9542ae94d0e1f586b1e3 crypto/modes/ctr128.c 7666ce59cb6240830d1f0707053bd2831969b06af7a6d8f8e6546daeb26a09bb crypto/modes/gcm128.c b431ff38c3a85943f71be0d76b063dbe2930967629b8721465b8152ab7867296 crypto/modes/ofb128.c -02e7659d8776f5885ebbc25b930ddec046262f92c9e8fa7e093f2a6a8d973a3b crypto/modes/wrap128.c +c5674daa4bbe66c2ac8044f83df67ddff8e0585ae091adde9ffe083f64e92a29 crypto/modes/wrap128.c 0a10e0cae6f4ac164afe97a64df09c8412145c8a25f387ff3a53ff7495572cbc crypto/modes/xts128.c a6067746bf89ca164f648055a84c37f6d93dee29df83d629e6395f4d623ceb02 crypto/o_str.c a1d61a3aeb8d9397ea9ae74becd48eb1a60602820c2d614c4c7b7e677279aa55 crypto/packet.c 154108b648c91e74ed5c021c1386a53c59833f77314eb6e855dbddf4c7b71f20 crypto/param_build.c -2a0f272dd553b698e8c6fa57962694ebd6064cb03fe26a60df529205568d315d crypto/param_build_set.c +0c05fee4da5ba17aafad5a7936e77c095732c4252a23be1aa652e2a254e9de8d crypto/param_build_set.c d404f0a7e7e892079a417ddd627f4d92113af08c0ce8a8e0281f82f992eb972d crypto/params.c 30ed7566e985b36558acde822f854a225f016bc86105c7d4a86e8261a74bd2c0 crypto/params_dup.c b6cbfc8791b31587f32a3f9e4c117549793528ebddc34a361bad1ad8cf8d4c42 crypto/params_from_text.c @@ -403,7 +403,7 @@ ed4ad15771cfb40e1f73c3e2b341cef3ee52f1f2b94e645ee3f9a8ad197982eb include/intern 77a9f9595cee6448c6217a8388127593a34a0d0a585197a5f8100fcb792f76ec include/openssl/asn1t.h.in a76f149afafe048f81e9e0c783a6b1ea8c98603fdaf3a049f163aae89e4a62b0 include/openssl/bio.h.in 833acadaf245d95acb0078561fbd789297f617a8950f2939d67e4b03155f492e include/openssl/bioerr.h -a94b28cddc5c033e5cfe1e43934929a4831ddd14e5faa2d6e487454849c89592 include/openssl/bn.h +fb5ad26c83a2ec11c23da51b808894fa6cb355362370a14dddb838fbec375f25 include/openssl/bn.h c506c9bfbac7368335fb2a8a627755ce2b8547a251d885242a89c9f8ff3bf079 include/openssl/bnerr.h c70499c9109b083beb69d1b17807266b041d0ff28694d5bc1ab7cf2a59331c39 include/openssl/buffer.h 5bce6559638266f060eaa16b3b90738bbd5292d62230b6b3b1e22b88836a5030 include/openssl/buffererr.h @@ -518,7 +518,7 @@ a8eaca99a71521ff8ac4ffcf08315e59220f7e0b7f505ecddad04fadd021ec14 providers/impl 8ed4a100e4756c31c56147b4b0fab76a4c6e5292aa2f079045f37b5502fd41b9 providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc 77024a608e7be3100d97709b9a65c2158c4a4102e70c4e3ba6de27a4bf0741a8 providers/implementations/ciphers/cipher_aes_hw.c 89de794c090192459d99d95bc4a422e7782e62192cd0fdb3bdef4128cfedee68 providers/implementations/ciphers/cipher_aes_hw_aesni.inc -1655955223756645e1b1516eae6c0fae59f35bd843709faa4a930ac7eba8f627 providers/implementations/ciphers/cipher_aes_ocb.c +e11164275fd49d3f7e965adc01d33c91e629d82b7618dad5dc5a816aafb56c39 providers/implementations/ciphers/cipher_aes_ocb.c 88138a1aff9705e608c0557653be92eb4de65b152555a2b79ec8b2a8fae73e8f providers/implementations/ciphers/cipher_aes_ocb.h d33fef74353e50bf541457456c54261314d4318d39456d8e5f26f3eda4525139 providers/implementations/ciphers/cipher_aes_ocb_hw.c 6a8782c728575d69c86b735c9f47acda5c0daa04e17f1e0faef2c963f23fab20 providers/implementations/ciphers/cipher_aes_wrp.c @@ -543,7 +543,7 @@ c4b1cb143de15acc396ce2e03fdd165defd25ebc831de9cdfacf408ea883c666 providers/impl 39b47b6ef9d71852964c26e07ef0e9b23f04c7493b1b16ba7c3dba7074b6b70d providers/implementations/digests/digestcommon.c b8c99501d0dfb55c650bc8a4f2fcd76d2006b551d86b799fb09dc19430c1966a providers/implementations/digests/sha2_prov.c 8ca3e52519d2b549785df59274120a334bb5053d1cbfb8aa79357ea426532117 providers/implementations/digests/sha3_prov.c -4fa2bd4db0de4b538aa29b961ca09a4572e90ecd3daa5356645794029d3667ae providers/implementations/exchange/dh_exch.c +cea7e0eef123b5bbe6b87b43647f5b87ff6d1a6fe4b9be04d0fde4a20cf6b2e6 providers/implementations/exchange/dh_exch.c 4acf0e0ea66b64f85562f74457cd3cf2042e5028d947afef526ef75c6acf2831 providers/implementations/exchange/ecdh_exch.c d266749072cf76ba2aa229e4a28b5f550e21cfa33c8b5a1ccf38210902515021 providers/implementations/exchange/ecx_exch.c 4692ea3852bf5763db576359bd793fc1ec3bcd0ca42fc906991d7ec4cced7b2a providers/implementations/exchange/kdf_exch.c @@ -552,7 +552,7 @@ b374a4c1ee592b81027081fe7e28dba401658abb2045731af590352f03065e5b providers/impl dd07797d61988fd4124cfb920616df672938da80649fac5977bfd061c981edc5 providers/implementations/include/prov/ciphercommon_ccm.h b3dda97a263ee474ea3be5d753790a94420dc79b461b98102bee6eab217fb07e providers/implementations/include/prov/ciphercommon_gcm.h 199f261261b1cc6fe4fb7d49e09e0de9d9cc3e96d990fe800a42683b03bfe060 providers/implementations/include/prov/digestcommon.h -b4697ebc8a2c3ec57b88498740c89efb4b448040b3aa91f4b5c12f1abc0d3b9a providers/implementations/include/prov/implementations.h +f98654a4843bff6ddf6bd6fae142f8fb6cea3d1398a67e335613facd8dc39f5c providers/implementations/include/prov/implementations.h 5f09fc71874b00419d71646714f21ebbdcceda277463b6f77d3d3ea6946914e8 providers/implementations/include/prov/kdfexchange.h c95ce5498e724b9b3d58e3c2f4723e7e3e4beb07f9bea9422e43182cbadb43af providers/implementations/include/prov/macsignature.h 29d1a112b799e1f45fdf8bcee8361c2ed67428c250c1cdf408a9fbb7ebf4cce1 providers/implementations/include/prov/names.h @@ -571,7 +571,7 @@ b91aa5114af88787f44f3deba461ffb8e156c9e13983bb06bf968ccebab71d5a providers/impl c5f4ae7de440fc309f9b51ce54471c007c87b2c08bc72e79c3db646251a2a963 providers/implementations/keymgmt/dsa_kmgmt.c 551cb6f06400242d12e09438a15eea42d4744a35e9747470ba64b3275b96e1b5 providers/implementations/keymgmt/ec_kmgmt.c 258ae17bb2dd87ed1511a8eb3fe99eed9b77f5c2f757215ff6b3d0e8791fc251 providers/implementations/keymgmt/ec_kmgmt_imexport.inc -81f2bf61dc12ced700888773a0d748e56f14ccdeb472e29eea86c1538b09bd21 providers/implementations/keymgmt/ecx_kmgmt.c +6a011535394fdd051e0efd4dc95af3e756c5846e1f867c832b7574f1c761fab5 providers/implementations/keymgmt/ecx_kmgmt.c 053a2be39a87f50b877ebdbbf799cf5faf8b2de33b04311d819d212ee1ea329b providers/implementations/keymgmt/kdf_legacy_kmgmt.c 9908c22971fd33e2156acf80974a2b5ae4f7670d89a4071bf9d618b0201f3c04 providers/implementations/keymgmt/mac_legacy_kmgmt.c f01915adfe9c9d37ad3c50d40b120907a75d7d413f632dcb399aae172a0f0dc4 providers/implementations/keymgmt/rsa_kmgmt.c @@ -590,6 +590,6 @@ f3c6bd6d33a8c887eace04d1ff202cb25c53b76cd48b9c69f28cc4aa5b0d8a21 providers/impl bf5dc51fc2184d651fc8949142a5df1b2852dfee7f7f6326078aa8193c7bf040 providers/implementations/signature/ecdsa_sig.c 1df0e51b3c53faff441c20c581b054936400b7f61cdad9534d0e3e8ab2c81ad8 providers/implementations/signature/eddsa_sig.c 3bb0f342b4cc1b4594ed0986adc47791c0a7b5c1ae7b1888c1fb5edb268a78d9 providers/implementations/signature/mac_legacy_sig.c -5d3ee35b4ce6231d10b4e647eb201c7cf4d0cc321ba6dfe65e3e26c8e4008c02 providers/implementations/signature/rsa_sig.c +940c468459721f96019e534636d90d04528079ef5ee1cd74b72892610c63325a providers/implementations/signature/rsa_sig.c a14e901b02fe095713624db4080b3aa3ca685d43f9ebec03041f992240973346 ssl/record/tls_pad.c fa2faea7f85207991ff76f2fd67b594d2493e4636ab0c74995df5d055cb6b035 ssl/s3_cbc.c diff --git a/crypto/openssl/providers/fips.checksum b/crypto/openssl/providers/fips.checksum index adbe7034ae55..6b6666455228 100644 --- a/crypto/openssl/providers/fips.checksum +++ b/crypto/openssl/providers/fips.checksum @@ -1 +1 @@ -d72e6325927c7df21b30f3116f583165ed1911e3499808d3f634c996b16181b8 providers/fips-sources.checksums +5f7a6245275a62d90032ddd1c0e8d83e82e96cc0f58a59cfbe2afffe4447a148 providers/fips-sources.checksums diff --git a/crypto/openssl/providers/implementations/ciphers/cipher_aes_siv.c b/crypto/openssl/providers/implementations/ciphers/cipher_aes_siv.c index c3facacfbcf4..4c6dbef5ef4b 100644 --- a/crypto/openssl/providers/implementations/ciphers/cipher_aes_siv.c +++ b/crypto/openssl/providers/implementations/ciphers/cipher_aes_siv.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/providers/implementations/exchange/dh_exch.c b/crypto/openssl/providers/implementations/exchange/dh_exch.c index 668602a5e523..0552bc31c024 100644 --- a/crypto/openssl/providers/implementations/exchange/dh_exch.c +++ b/crypto/openssl/providers/implementations/exchange/dh_exch.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/providers/implementations/include/prov/implementations.h b/crypto/openssl/providers/implementations/include/prov/implementations.h index 6f833b31f014..08f9e54c71ca 100644 --- a/crypto/openssl/providers/implementations/include/prov/implementations.h +++ b/crypto/openssl/providers/implementations/include/prov/implementations.h @@ -1,5 +1,5 @@ /* - * Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -248,7 +248,9 @@ extern const OSSL_DISPATCH ossl_gmac_functions[]; extern const OSSL_DISPATCH ossl_hmac_functions[]; extern const OSSL_DISPATCH ossl_kmac128_functions[]; extern const OSSL_DISPATCH ossl_kmac256_functions[]; +#ifndef OPENSSL_NO_SIPHASH extern const OSSL_DISPATCH ossl_siphash_functions[]; +#endif extern const OSSL_DISPATCH ossl_poly1305_functions[]; /* KDFs / PRFs */ diff --git a/crypto/openssl/providers/implementations/keymgmt/ecx_kmgmt.c b/crypto/openssl/providers/implementations/keymgmt/ecx_kmgmt.c index 0303aa456b5c..022936a8e0ad 100644 --- a/crypto/openssl/providers/implementations/keymgmt/ecx_kmgmt.c +++ b/crypto/openssl/providers/implementations/keymgmt/ecx_kmgmt.c @@ -1,5 +1,5 @@ /* - * Copyright 2020-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2020-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -932,38 +932,10 @@ static void *s390x_ecd_keygen25519(struct ecx_gen_ctx *gctx) 0xfe, 0x53, 0x6e, 0xcd, 0xd3, 0x36, 0x69, 0x21 }; static const unsigned char generator_y[] = { - 0x58, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, - 0x66, + 0x58, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66 }; unsigned char x_dst[32], buff[SHA512_DIGEST_LENGTH]; ECX_KEY *key = ossl_ecx_key_new(gctx->libctx, ECX_KEY_TYPE_ED25519, 1, diff --git a/crypto/openssl/providers/implementations/macs/poly1305_prov.c b/crypto/openssl/providers/implementations/macs/poly1305_prov.c index 262510c59890..b7ecbbd1fa60 100644 --- a/crypto/openssl/providers/implementations/macs/poly1305_prov.c +++ b/crypto/openssl/providers/implementations/macs/poly1305_prov.c @@ -1,5 +1,5 @@ /* - * Copyright 2018-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2018-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -38,6 +38,7 @@ static OSSL_FUNC_mac_final_fn poly1305_final; struct poly1305_data_st { void *provctx; int updated; + int key_set; POLY1305 poly1305; /* Poly1305 data */ }; @@ -87,6 +88,7 @@ static int poly1305_setkey(struct poly1305_data_st *ctx, } Poly1305_Init(&ctx->poly1305, key); ctx->updated = 0; + ctx->key_set = 1; return 1; } @@ -125,6 +127,10 @@ static int poly1305_final(void *vmacctx, unsigned char *out, size_t *outl, if (!ossl_prov_is_running()) return 0; + if (!ctx->key_set) { + ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET); + return 0; + } ctx->updated = 1; Poly1305_Final(&ctx->poly1305, out); *outl = poly1305_size(); diff --git a/crypto/openssl/providers/implementations/signature/rsa_sig.c b/crypto/openssl/providers/implementations/signature/rsa_sig.c index 825c61bf0d3f..563a596f3420 100644 --- a/crypto/openssl/providers/implementations/signature/rsa_sig.c +++ b/crypto/openssl/providers/implementations/signature/rsa_sig.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -717,8 +717,19 @@ static int rsa_verify_recover(void *vprsactx, break; case RSA_PKCS1_PADDING: { + int mdsize = EVP_MD_get_size(prsactx->md); size_t sltmp; + if (mdsize <= 0) { + ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST_LENGTH); + return 0; + } + if (routsize < (size_t)mdsize) { + ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL, + "buffer size is %d, should be %d", + routsize, mdsize); + return 0; + } ret = ossl_rsa_verify(prsactx->mdnid, NULL, 0, rout, &sltmp, sig, siglen, prsactx->rsa); if (ret <= 0) { @@ -734,7 +745,15 @@ static int rsa_verify_recover(void *vprsactx, return 0; } } else { - ret = RSA_public_decrypt(siglen, sig, rout, prsactx->rsa, + int rsasize = RSA_size(prsactx->rsa); + + if (routsize < (size_t)rsasize) { + ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL, + "buffer size is %d, should be %d", + routsize, rsasize); + return 0; + } + ret = RSA_public_decrypt((int)siglen, sig, rout, prsactx->rsa, prsactx->pad_mode); if (ret < 0) { ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB); diff --git a/crypto/openssl/ssl/record/rec_layer_s3.c b/crypto/openssl/ssl/record/rec_layer_s3.c index 316d5939f52c..bf341b6833b4 100644 --- a/crypto/openssl/ssl/record/rec_layer_s3.c +++ b/crypto/openssl/ssl/record/rec_layer_s3.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -713,7 +713,8 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf, /* if it went, fall through and send more stuff */ } - if (s->rlayer.numwpipes < numpipes) { + if (s->rlayer.numwpipes != numpipes) { + ssl3_release_write_buffer(s); if (!ssl3_setup_write_buffer(s, numpipes, 0)) { /* SSLfatal() already called */ return -1; diff --git a/crypto/openssl/ssl/ssl_ciph.c b/crypto/openssl/ssl/ssl_ciph.c index 051674f26393..c9a3d9b55a51 100644 --- a/crypto/openssl/ssl/ssl_ciph.c +++ b/crypto/openssl/ssl/ssl_ciph.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * @@ -1291,6 +1291,10 @@ static int ciphersuite_cb(const char *elem, int len, void *arg) /* Arbitrary sized temp buffer for the cipher name. Should be big enough */ char name[80]; + /* CONF_parse_list signals empty elements with elem == NULL; skip them */ + if (elem == NULL || len == 0) + return 1; + if (len > (int)(sizeof(name) - 1)) /* Anyway return 1 so we can parse rest of the list */ return 1; diff --git a/crypto/openssl/ssl/statem/extensions_srvr.c b/crypto/openssl/ssl/statem/extensions_srvr.c index 2b586d61a39b..571d716e86b3 100644 --- a/crypto/openssl/ssl/statem/extensions_srvr.c +++ b/crypto/openssl/ssl/statem/extensions_srvr.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -1032,6 +1032,10 @@ int tls_parse_ctos_psk(SSL *s, PACKET *pkt, unsigned int context, X509 *x, } idlen = PACKET_remaining(&identity); + if (idlen == 0) { + SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); + return 0; + } if (s->psk_find_session_cb != NULL && !s->psk_find_session_cb(s, PACKET_data(&identity), idlen, &sess)) { @@ -1129,13 +1133,13 @@ int tls_parse_ctos_psk(SSL *s, PACKET *pkt, unsigned int context, X509 *x, if (ret == SSL_TICKET_EMPTY) { SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION); - return 0; + goto err; } if (ret == SSL_TICKET_FATAL_ERR_MALLOC || ret == SSL_TICKET_FATAL_ERR_OTHER) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); - return 0; + goto err; } if (ret == SSL_TICKET_NONE || ret == SSL_TICKET_NO_DECRYPT) continue; @@ -1187,7 +1191,12 @@ int tls_parse_ctos_psk(SSL *s, PACKET *pkt, unsigned int context, X509 *x, SSL_SESSION_free(sess); sess = NULL; s->ext.early_data_ok = 0; - s->ext.ticket_expected = 0; + /* + * We fall back to a full handshake. The new session ticket will be + * issued to the client with the newly negotiated ciphersuite, + * allowing successful resumption on future connections. + */ + s->ext.ticket_expected = 1; continue; } break; diff --git a/crypto/openssl/ssl/statem/statem.c b/crypto/openssl/ssl/statem/statem.c index 31a974eab4da..836bf9c50e9e 100644 --- a/crypto/openssl/ssl/statem/statem.c +++ b/crypto/openssl/ssl/statem/statem.c @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2015-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -500,22 +500,6 @@ static void init_read_state_machine(SSL *s) st->read_state = READ_STATE_HEADER; } -static int grow_init_buf(SSL *s, size_t size) -{ - - size_t msg_offset = (char *)s->init_msg - s->init_buf->data; - - if (!BUF_MEM_grow_clean(s->init_buf, (int)size)) - return 0; - - if (size < msg_offset) - return 0; - - s->init_msg = s->init_buf->data + msg_offset; - - return 1; -} - /* * This function implements the sub-state machine when the message flow is in * MSG_FLOW_READING. The valid sub-states and transitions are: @@ -611,14 +595,6 @@ static SUB_STATE_RETURN read_state_machine(SSL *s) return SUB_STATE_ERROR; } - /* dtls_get_message already did this */ - if (!SSL_IS_DTLS(s) - && s->s3.tmp.message_size > 0 - && !grow_init_buf(s, s->s3.tmp.message_size + SSL3_HM_HEADER_LENGTH)) { - SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BUF_LIB); - return SUB_STATE_ERROR; - } - st->read_state = READ_STATE_BODY; /* Fall through */ diff --git a/crypto/openssl/ssl/statem/statem_lib.c b/crypto/openssl/ssl/statem/statem_lib.c index 0d32162d5c58..3c730796c0cc 100644 --- a/crypto/openssl/ssl/statem/statem_lib.c +++ b/crypto/openssl/ssl/statem/statem_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -1271,9 +1271,25 @@ int tls_get_message_header(SSL *s, int *mt) return 1; } +static int grow_init_buf(SSL *s, size_t size) +{ + + size_t msg_offset = (char *)s->init_msg - s->init_buf->data; + + if (!BUF_MEM_grow_clean(s->init_buf, size)) + return 0; + + if (size < msg_offset) + return 0; + + s->init_msg = s->init_buf->data + msg_offset; + + return 1; +} + int tls_get_message_body(SSL *s, size_t *len) { - size_t n, readbytes; + size_t toread, readbytes; unsigned char *p; int i; @@ -1283,18 +1299,30 @@ int tls_get_message_body(SSL *s, size_t *len) return 1; } - p = s->init_msg; - n = s->s3.tmp.message_size - s->init_num; - while (n > 0) { + toread = s->s3.tmp.message_size - s->init_num; + while (toread > 0) { + size_t chunk = toread > SSL3_RT_MAX_PLAIN_LENGTH ? SSL3_RT_MAX_PLAIN_LENGTH : toread; + + /* + * We incrementally allocate the buffer to guard against the peer + * claiming a very large message size and then not sending it. + */ + if (!grow_init_buf(s, s->init_num + chunk + SSL3_HM_HEADER_LENGTH)) { + SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BUF_LIB); + return 0; + } + + /* init_msg location can change after grow_init_buf */ + p = s->init_msg; i = s->method->ssl_read_bytes(s, SSL3_RT_HANDSHAKE, NULL, - &p[s->init_num], n, 0, &readbytes); + &p[s->init_num], chunk, 0, &readbytes); if (i <= 0) { s->rwstate = SSL_READING; *len = 0; return 0; } s->init_num += readbytes; - n -= readbytes; + toread -= readbytes; } /* diff --git a/crypto/openssl/test/bad_dtls_test.c b/crypto/openssl/test/bad_dtls_test.c index 3d734bba41c5..9178f2fb7940 100644 --- a/crypto/openssl/test/bad_dtls_test.c +++ b/crypto/openssl/test/bad_dtls_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -101,89 +101,17 @@ static SSL_SESSION *client_session(void) 0x04, 0x20, /* OCTET_STRING, session id */ #define SS_SESSID_OFS 15 /* Session ID goes here */ - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x04, - 0x30, /* OCTET_STRING, master secret */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x04, 0x30, /* OCTET_STRING, master secret */ #define SS_SECRET_OFS 49 /* Master secret goes here */ - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; const unsigned char *p = session_asn1; @@ -303,26 +231,8 @@ static int send_hello_verify(BIO *rbio) 0x00, /* DTLS1_BAD_VER */ 0x14, /* Cookie length */ #define HV_COOKIE_OFS 28 /* Cookie goes here */ - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; memcpy(hello_verify + HV_COOKIE_OFS, cookie, sizeof(cookie)); @@ -363,75 +273,18 @@ static int send_server_hello(BIO *rbio) 0x01, 0x00, /* DTLS1_BAD_VER */ #define SH_RANDOM_OFS 27 /* Server random goes here */ - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, /* Session ID length */ #define SH_SESSID_OFS 60 /* Session ID goes here */ - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x2f, /* Cipher suite AES128-SHA */ - 0x00, /* Compression null */ + 0x00 /* Compression null */ }; static unsigned char change_cipher_spec[] = { 0x14, /* Change Cipher Spec */ @@ -449,7 +302,7 @@ static int send_server_hello(BIO *rbio) 0x03, /* Length */ 0x01, 0x00, - 0x02, /* Message */ + 0x02 /* Message */ }; memcpy(server_hello + SH_RANDOM_OFS, server_random, sizeof(server_random)); diff --git a/crypto/openssl/test/build.info b/crypto/openssl/test/build.info index 6089b8c97cf8..83acdd1b4289 100644 --- a/crypto/openssl/test/build.info +++ b/crypto/openssl/test/build.info @@ -683,6 +683,13 @@ IF[{- !$disabled{tests} -}] INCLUDE[dsa_no_digest_size_test]=../include ../apps/include DEPEND[dsa_no_digest_size_test]=../libcrypto.a libtestutil.a + IF[{- !$disabled{ecx} && !$disabled{tls1_3} -}] + PROGRAMS{noinst}=tls13ticket_test + SOURCE[tls13ticket_test]=tls13tickettest.c helpers/ssltestlib.c + INCLUDE[tls13ticket_test]=../include ../apps/include + DEPEND[tls13ticket_test]=../libcrypto ../libssl libtestutil.a + ENDIF + SOURCE[tls13encryptiontest]=tls13encryptiontest.c INCLUDE[tls13encryptiontest]=.. ../include ../apps/include DEPEND[tls13encryptiontest]=../libcrypto.a ../libssl.a libtestutil.a diff --git a/crypto/openssl/test/cipherlist_test.c b/crypto/openssl/test/cipherlist_test.c index d14f566b165f..e00858b15fbd 100644 --- a/crypto/openssl/test/cipherlist_test.c +++ b/crypto/openssl/test/cipherlist_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -243,10 +243,65 @@ end: return result; } +/* + * SSL_CTX_set_ciphersuites() must not crash on empty list elements. + * CONF_parse_list() signals them with elem=NULL; ciphersuite_cb() must skip + * such entries rather than passing NULL to memcpy(). + */ +#ifndef OPENSSL_NO_TLS1_3 +static int cipher_in_ctx(const SSL_CTX *ctx, uint32_t id) +{ + const STACK_OF(SSL_CIPHER) *sk = SSL_CTX_get_ciphers(ctx); + int i; + + for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) + if (SSL_CIPHER_get_id(sk_SSL_CIPHER_value(sk, i)) == id) + return 1; + return 0; +} + +static int test_set_ciphersuites_empty_elem(void) +{ + SSL_CTX *ctx = NULL; + int result = 0; + + if (!TEST_ptr(ctx = SSL_CTX_new(TLS_method()))) + goto end; + + /* Double colon: both surrounding valid suites must be applied */ + if (!TEST_true(SSL_CTX_set_ciphersuites(ctx, + "TLS_AES_128_GCM_SHA256::TLS_AES_256_GCM_SHA384"))) + goto end; + if (!TEST_true(cipher_in_ctx(ctx, TLS1_3_CK_AES_128_GCM_SHA256)) + || !TEST_true(cipher_in_ctx(ctx, TLS1_3_CK_AES_256_GCM_SHA384))) + goto end; + + /* Leading separator: empty first element, one valid suite must apply */ + if (!TEST_true(SSL_CTX_set_ciphersuites(ctx, ":TLS_AES_128_GCM_SHA256"))) + goto end; + if (!TEST_true(cipher_in_ctx(ctx, TLS1_3_CK_AES_128_GCM_SHA256))) + goto end; + + /* Trailing separator: empty last element, one valid suite must apply */ + if (!TEST_true(SSL_CTX_set_ciphersuites(ctx, "TLS_AES_128_GCM_SHA256:"))) + goto end; + if (!TEST_true(cipher_in_ctx(ctx, TLS1_3_CK_AES_128_GCM_SHA256))) + goto end; + + result = 1; +end: + SSL_CTX_free(ctx); + return result; +} +#endif + int setup_tests(void) { ADD_TEST(test_default_cipherlist_implicit); ADD_TEST(test_default_cipherlist_explicit); ADD_TEST(test_default_cipherlist_clear); +#ifndef OPENSSL_NO_TLS1_3 + ADD_TEST(test_set_ciphersuites_empty_elem); +#endif return 1; } diff --git a/crypto/openssl/test/cms-msg/make_missing_kdf_der.py b/crypto/openssl/test/cms-msg/make_missing_kdf_der.py new file mode 100644 index 000000000000..5b3fc0f6eeda --- /dev/null +++ b/crypto/openssl/test/cms-msg/make_missing_kdf_der.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python3 + +# Copyright 2026 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the Apache License 2.0 (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + +# This script generates missing-kdf.der - a password-encrypted CMS message +# without the keyDerivationAlgorithm field, which is used in the +# “PWRI missing keyDerivationAlgorithm regression” test. +# +# Usage: python3 make_missing_kdf_der.py valid.der missing-kdf.der + +from __future__ import annotations + +import argparse +import sys +from dataclasses import dataclass +from pathlib import Path + + +@dataclass +class Node: + off: int + tag: int + hdr_len: int + length: int + end: int + children: list["Node"] + + +def read_len(data: bytes, off: int) -> tuple[int, int]: + first = data[off] + if first < 0x80: + return first, 1 + n = first & 0x7F + if n == 0 or n > 4: + raise ValueError(f"unsupported DER length form at {off}") + val = 0 + for b in data[off + 1 : off + 1 + n]: + val = (val << 8) | b + return val, 1 + n + + +def parse_node(data: bytes, off: int) -> Node: + tag = data[off] + length, len_len = read_len(data, off + 1) + hdr_len = 1 + len_len + end = off + hdr_len + length + children: list[Node] = [] + if tag & 0x20: + cur = off + hdr_len + while cur < end: + child = parse_node(data, cur) + children.append(child) + cur = child.end + if cur != end: + raise ValueError(f"child parse ended at {cur}, expected {end}") + return Node(off=off, tag=tag, hdr_len=hdr_len, length=length, end=end, children=children) + + +def encode_len(length: int, existing_len_len: int) -> bytes: + if existing_len_len == 1: + if length >= 0x80: + raise ValueError("new length no longer fits in short-form DER") + return bytes([length]) + payload_len = existing_len_len - 1 + max_len = (1 << (payload_len * 8)) - 1 + if length > max_len: + raise ValueError("new length no longer fits in existing long-form DER") + out = bytearray([0x80 | payload_len]) + for shift in range((payload_len - 1) * 8, -8, -8): + out.append((length >> shift) & 0xFF) + return bytes(out) + + +def patch_length_field(buf: bytearray, node: Node, delta: int) -> None: + new_len = node.length + delta + if new_len < 0: + raise ValueError("negative patched length") + len_bytes = encode_len(new_len, node.hdr_len - 1) + start = node.off + 1 + end = start + len(node.hdr_len.to_bytes(1, "big")) - 1 # unused, kept for clarity + buf[start : start + len(len_bytes)] = len_bytes + + +def main() -> int: + ap = argparse.ArgumentParser(description="Remove PWRI keyDerivationAlgorithm from a CMS DER blob.") + ap.add_argument("input_der") + ap.add_argument("output_der") + args = ap.parse_args() + + data = Path(args.input_der).read_bytes() + root = parse_node(data, 0) + + # CMS structure we expect: + # SEQUENCE { OID envelopedData, [0] SEQUENCE { version, SET recipientInfos, ... } } + ed_wrapper = root.children[1] + env_seq = ed_wrapper.children[0] + recipient_set = env_seq.children[1] + pwri_choice = recipient_set.children[0] # [3] + + if pwri_choice.tag != 0xA3: + raise ValueError(f"expected PWRI choice tag 0xA3, found 0x{pwri_choice.tag:02x}") + if len(pwri_choice.children) < 3: + raise ValueError("unexpected PWRI child count") + + version = pwri_choice.children[0] + maybe_kdf = pwri_choice.children[1] + keyenc = pwri_choice.children[2] + if version.tag != 0x02: + raise ValueError("PWRI version is not INTEGER") + if maybe_kdf.tag != 0xA0: + raise ValueError(f"PWRI child after version is not [0] keyDerivationAlgorithm: 0x{maybe_kdf.tag:02x}") + if keyenc.tag != 0x30: + raise ValueError("PWRI keyEncryptionAlgorithm is not SEQUENCE") + + remove_start = maybe_kdf.off + remove_end = maybe_kdf.end + remove_len = remove_end - remove_start + + out = bytearray(data) + del out[remove_start:remove_end] + + # Adjust ancestors whose length spans the removed field. + for node in [root, ed_wrapper, env_seq, recipient_set, pwri_choice]: + patch_length_field(out, node, -remove_len) + + Path(args.output_der).write_bytes(out) + print(f"removed {remove_len} bytes at [{remove_start}, {remove_end})") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/crypto/openssl/test/cmsapitest.c b/crypto/openssl/test/cmsapitest.c index 0a7e536bbe75..ba804ee1a60b 100644 --- a/crypto/openssl/test/cmsapitest.c +++ b/crypto/openssl/test/cmsapitest.c @@ -13,7 +13,7 @@ #include <openssl/cms.h> #include <openssl/bio.h> #include <openssl/x509.h> - +#include <internal/nelem.h> #include "testutil.h" static X509 *cert = NULL; @@ -22,6 +22,191 @@ static char *derin = NULL; static char *too_long_iv_cms_in = NULL; static char *pwri_kek_oob_der_in = NULL; +/* + * This is our bad cms data, it contains an AuthEnvelopedData field + * with a CIPHER OID set to AES-256-OFB + */ +static const unsigned char bad_cms_der[452] = { + 0x30, 0x82, 0x01, 0xc0, 0x06, 0x0b, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x09, 0x10, 0x01, 0x17, 0xa0, 0x82, 0x01, 0xaf, 0x30, 0x82, 0x01, + 0xab, 0x02, 0x01, 0x00, 0x31, 0x82, 0x01, 0x44, 0x30, 0x82, 0x01, 0x40, + 0x02, 0x01, 0x00, 0x30, 0x28, 0x30, 0x10, 0x31, 0x0e, 0x30, 0x0c, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x05, 0x52, 0x65, 0x63, 0x69, 0x70, 0x02, + 0x14, 0x1a, 0x5c, 0x04, 0x9b, 0x3a, 0x64, 0xff, 0xd4, 0x63, 0xde, 0x4f, + 0x90, 0xe5, 0x76, 0xe2, 0x18, 0xe8, 0x5c, 0x9e, 0xd7, 0x30, 0x0d, 0x06, + 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, + 0x04, 0x82, 0x01, 0x00, 0x18, 0xcf, 0x9f, 0x44, 0x95, 0x79, 0xe9, 0x96, + 0x7d, 0x0f, 0xd1, 0xb4, 0xc2, 0x38, 0xb0, 0xc9, 0x76, 0xd5, 0xba, 0x08, + 0x5c, 0xbf, 0xc3, 0x30, 0xea, 0x3a, 0x68, 0xa4, 0xba, 0x99, 0x4c, 0x70, + 0x97, 0xb8, 0xa9, 0xce, 0x71, 0x4c, 0x54, 0xa3, 0xfd, 0x81, 0x9e, 0x15, + 0x63, 0xb7, 0x23, 0x46, 0x17, 0x69, 0xaf, 0x8f, 0xbd, 0xa3, 0x54, 0x23, + 0xf3, 0xf5, 0x35, 0xa8, 0xd4, 0x9c, 0xec, 0xe1, 0x17, 0x2c, 0x6d, 0x0b, + 0xad, 0xc0, 0xe9, 0x1d, 0xd1, 0x8d, 0x59, 0xd5, 0x29, 0xc6, 0x40, 0xc4, + 0xcd, 0x4e, 0x87, 0x70, 0x19, 0x5d, 0x88, 0x50, 0xbd, 0x4a, 0x13, 0xb3, + 0xef, 0x0c, 0x6d, 0x6a, 0xc5, 0x51, 0xbb, 0x5c, 0x39, 0x17, 0xda, 0xb1, + 0x71, 0x17, 0x88, 0xfb, 0x6a, 0xef, 0x7f, 0x85, 0xa7, 0x04, 0x71, 0xc7, + 0x83, 0x91, 0xb3, 0x30, 0x1b, 0x3d, 0x18, 0x7f, 0x63, 0xbf, 0x42, 0x7c, + 0xae, 0x6f, 0xae, 0xa1, 0x17, 0x84, 0xfd, 0x67, 0x2a, 0x4f, 0x4c, 0xe9, + 0x05, 0x26, 0x2c, 0xd5, 0xab, 0x0c, 0xcf, 0xdc, 0x3f, 0x24, 0xcf, 0x71, + 0x26, 0x7a, 0x1f, 0xf7, 0xc9, 0x92, 0x5e, 0xb6, 0x3d, 0x7f, 0xc3, 0x08, + 0xd3, 0xad, 0xc0, 0xc8, 0x4f, 0x42, 0x0c, 0xf3, 0xac, 0x23, 0x11, 0xdf, + 0x75, 0x84, 0x69, 0x8c, 0xa6, 0x59, 0x43, 0xfb, 0xf7, 0x6b, 0x62, 0xf0, + 0xf7, 0x35, 0x07, 0xc4, 0xf8, 0xd5, 0x12, 0x4a, 0x16, 0x62, 0xbc, 0x04, + 0xaa, 0x9a, 0x2e, 0xb2, 0x1a, 0xfa, 0x4c, 0x82, 0xce, 0x9e, 0xa8, 0x6d, + 0xc1, 0x29, 0x59, 0xe0, 0x33, 0xb5, 0xa6, 0x47, 0x09, 0x2e, 0xbf, 0x60, + 0xa6, 0xb3, 0x21, 0xa0, 0x15, 0xac, 0x92, 0x29, 0xb5, 0xe6, 0xe0, 0xd4, + 0x8b, 0xd8, 0x21, 0xe2, 0x17, 0x98, 0xd1, 0x11, 0x5d, 0xc5, 0xae, 0x24, + 0xe8, 0x92, 0xdb, 0x96, 0xa3, 0x5b, 0x58, 0xa7, 0x30, 0x4c, 0x06, 0x09, + 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0x30, 0x1d, 0x06, + 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x2b, 0x04, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + 0x41, 0x41, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +/* + * This array represents a der encoded contentinfo structure addressed to + * servercert.pem, with the tag value of the aes-256-gcm cipher used to encrypt + * the contents of the mssages down to 1 byte. Decoding it should fail + */ +static const unsigned char one_byte_mac_cms_der[423] = { + 0x30, 0x82, 0x01, 0xa3, 0x06, 0x0b, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x09, 0x10, 0x01, 0x17, 0xa0, 0x82, 0x01, 0x92, 0x30, 0x82, 0x01, + 0x8e, 0x02, 0x01, 0x00, 0x31, 0x82, 0x01, 0x33, 0x30, 0x82, 0x01, 0x2f, + 0x02, 0x01, 0x00, 0x30, 0x17, 0x30, 0x12, 0x31, 0x10, 0x30, 0x0e, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x07, 0x52, 0x6f, 0x6f, 0x74, 0x20, 0x43, + 0x41, 0x02, 0x01, 0x02, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, + 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x82, 0x01, 0x00, 0x10, + 0x3a, 0x8c, 0xee, 0x4e, 0xe2, 0x1f, 0xfe, 0xcc, 0x28, 0x39, 0x9e, 0x46, + 0xbe, 0xa7, 0xd5, 0x02, 0x2a, 0x53, 0x06, 0x5f, 0x94, 0x6b, 0x69, 0x6d, + 0x2d, 0xe8, 0x44, 0xa6, 0x43, 0x52, 0x82, 0x89, 0x2d, 0xf1, 0x9b, 0xb9, + 0x9e, 0xa4, 0x8d, 0x77, 0xf1, 0xd2, 0x8e, 0x86, 0x79, 0x06, 0x3e, 0x90, + 0xf0, 0xca, 0x9e, 0xb5, 0x35, 0xd5, 0x89, 0xf0, 0x7c, 0x06, 0xa0, 0x91, + 0xbf, 0xf4, 0x61, 0xaa, 0x5c, 0x99, 0xa3, 0x64, 0x15, 0xfd, 0xf9, 0x90, + 0xf0, 0xf3, 0x25, 0x5b, 0x48, 0xa1, 0xfb, 0x7a, 0xce, 0x63, 0xdc, 0xa9, + 0xfe, 0x7c, 0xbe, 0x9c, 0xaa, 0xd3, 0x42, 0x0e, 0x4a, 0xc3, 0x4b, 0x4e, + 0x76, 0x6d, 0x52, 0x54, 0x85, 0x4e, 0xab, 0x50, 0x2c, 0x5f, 0xc2, 0x8b, + 0x9f, 0x1f, 0x0f, 0x8a, 0x7c, 0xb3, 0x0a, 0xde, 0x50, 0x9b, 0xef, 0x89, + 0xf2, 0xea, 0x07, 0xca, 0x11, 0x76, 0x29, 0xaf, 0xe4, 0x59, 0x28, 0x19, + 0x48, 0x96, 0x67, 0xdd, 0xdd, 0x01, 0xf0, 0x14, 0xbe, 0x3d, 0xa5, 0xa3, + 0x83, 0x21, 0x39, 0x29, 0xb7, 0x8f, 0xb7, 0xf4, 0x85, 0x05, 0xee, 0xca, + 0xbb, 0xbd, 0xc0, 0xaf, 0x0d, 0xf1, 0xef, 0x5f, 0x06, 0x05, 0xeb, 0x0e, + 0x55, 0xf0, 0x7e, 0x13, 0x1a, 0x2a, 0x37, 0xd4, 0xba, 0x26, 0xc8, 0x2e, + 0x6b, 0xc3, 0xe1, 0xcf, 0x28, 0xab, 0x0d, 0xab, 0xdd, 0xa7, 0xf4, 0xd3, + 0x59, 0xcd, 0xc7, 0x2d, 0xa1, 0x56, 0x5f, 0x47, 0x77, 0x27, 0x17, 0x71, + 0xae, 0x75, 0xc8, 0x71, 0x58, 0xf9, 0xab, 0x67, 0xda, 0x23, 0x62, 0xa0, + 0x6d, 0xe5, 0x2d, 0x06, 0xb8, 0xc0, 0xac, 0xaa, 0x38, 0xa4, 0x0d, 0xb5, + 0xb2, 0xce, 0xa7, 0x26, 0x0d, 0x3a, 0x88, 0x2f, 0x8d, 0x6c, 0xa0, 0xf6, + 0x94, 0xf2, 0x2c, 0x37, 0x03, 0xaf, 0x67, 0x5c, 0xf3, 0x2c, 0xfb, 0xe8, + 0x16, 0x9e, 0x55, 0x30, 0x4f, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x07, 0x01, 0x30, 0x1e, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, + 0x65, 0x03, 0x04, 0x01, 0x2e, 0x30, 0x11, 0x04, 0x0c, 0x6b, 0x1d, 0xe5, + 0xb2, 0x38, 0x0e, 0x17, 0x91, 0x9c, 0x9c, 0x40, 0x35, 0x02, 0x01, 0x10, + 0x80, 0x22, 0xa0, 0x90, 0x75, 0x74, 0xdf, 0x2d, 0xba, 0x4f, 0xce, 0x4e, + 0x7e, 0x52, 0xb0, 0x2e, 0x5f, 0xe0, 0x84, 0x01, 0xb1, 0x49, 0x0b, 0x69, + 0xc7, 0x61, 0x63, 0x84, 0x3a, 0xfc, 0xaa, 0x86, 0xfc, 0x96, 0x4e, 0x6c, + 0x04, 0x01, 0x92 +}; + +static int test_short_mac_on_auth_envelope_data(void) +{ + int ret = 0; + const unsigned char *derptr = one_byte_mac_cms_der; + BIO *outmsgbio = BIO_new(BIO_s_mem()); + CMS_ContentInfo *content = d2i_CMS_ContentInfo(NULL, &derptr, OSSL_NELEM(one_byte_mac_cms_der)); + + if (!TEST_ptr(content)) + goto end; + + /* + * We expect this to fail, as the tag value in the authEnvelopedData parameter is + * a single byte + */ + if (!TEST_false(CMS_decrypt(content, privkey, cert, NULL, outmsgbio, CMS_TEXT))) + goto end; + + ret = 1; +end: + BIO_free(outmsgbio); + CMS_ContentInfo_free(content); + return ret; +} + +static int test_non_aead_on_auth_envelope_dec(void) +{ + int ret = 0; + const unsigned char *derptr = bad_cms_der; + BIO *outmsgbio = BIO_new(BIO_s_mem()); + CMS_ContentInfo *content = d2i_CMS_ContentInfo(NULL, &derptr, OSSL_NELEM(bad_cms_der)); + + if (!TEST_ptr(content)) + goto end; + + /* + * We expect this to fail + */ + if (!TEST_false(CMS_decrypt(content, privkey, cert, NULL, outmsgbio, + CMS_TEXT))) + goto end; + + ret = 1; +end: + BIO_free(outmsgbio); + CMS_ContentInfo_free(content); + return ret; +} + +static int test_non_aead_on_auth_envelope_enc(void) +{ + CMS_ContentInfo *content = NULL; + STACK_OF(X509) *certstack = sk_X509_new_null(); + const EVP_CIPHER *cipher = EVP_aes_128_cbc(); + const char *msg = "Hello world"; + BIO *msgbio = BIO_new_mem_buf(msg, (int)strlen(msg)); + BIO *outmsgbio = BIO_new(BIO_s_mem()); + X509 *recip; + int i; + int ret = 0; + + if (!TEST_ptr(certstack) || !TEST_ptr(msgbio) || !TEST_ptr(outmsgbio)) + goto end; + + if (!TEST_int_gt(sk_X509_push(certstack, cert), 0)) + goto end; + + /* + * Emulate CMS_encrypt here, but use a non AEAD cipher + */ + content = CMS_AuthEnvelopedData_create_ex(cipher, NULL, NULL); + + if (!TEST_ptr(content)) + goto end; + + for (i = 0; i < sk_X509_num(certstack); i++) { + recip = sk_X509_value(certstack, i); + if (!TEST_ptr(CMS_add1_recipient_cert(content, recip, CMS_TEXT))) + goto end; + } + + /* + * We expect this to fail as we are using a non-AEAD cipher on + * AuthEnvelopedData + */ + if (!TEST_int_eq(CMS_final(content, msgbio, NULL, CMS_TEXT), 0)) + goto end; + + ret = 1; +end: + sk_X509_free(certstack); + BIO_free(msgbio); + BIO_free(outmsgbio); + CMS_ContentInfo_free(content); + return ret; +} + static int test_encrypt_decrypt(const EVP_CIPHER *cipher) { int testresult = 0; @@ -46,12 +231,6 @@ static int test_encrypt_decrypt(const EVP_CIPHER *cipher) CMS_TEXT))) goto end; - if (!(EVP_CIPHER_get_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) - && !TEST_ptr(contentbio = CMS_EnvelopedData_decrypt(content->d.envelopedData, - NULL, privkey, cert, NULL, - CMS_TEXT, NULL, NULL))) - goto end; - /* Check we got the message we first started with */ if (!TEST_int_eq(BIO_gets(outmsgbio, buf, sizeof(buf)), strlen(msg)) || !TEST_int_eq(strcmp(buf, msg), 0)) @@ -578,6 +757,9 @@ int setup_tests(void) ADD_TEST(test_encrypt_decrypt_aes_128_gcm); ADD_TEST(test_encrypt_decrypt_aes_192_gcm); ADD_TEST(test_encrypt_decrypt_aes_256_gcm); + ADD_TEST(test_non_aead_on_auth_envelope_enc); + ADD_TEST(test_non_aead_on_auth_envelope_dec); + ADD_TEST(test_short_mac_on_auth_envelope_data); ADD_TEST(test_d2i_CMS_bio_NULL); ADD_TEST(test_CMS_set1_key_mem_leak); ADD_TEST(test_encrypted_data); diff --git a/crypto/openssl/test/destest.c b/crypto/openssl/test/destest.c index e4e4d887d811..ddb0d7cbec93 100644 --- a/crypto/openssl/test/destest.c +++ b/crypto/openssl/test/destest.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -187,46 +187,10 @@ static unsigned char cbc_iv[8] = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x1 */ /* static char cbc_data[40]="7654321 Now is the time for \0001"; */ static unsigned char cbc_data[40] = { - 0x37, - 0x36, - 0x35, - 0x34, - 0x33, - 0x32, - 0x31, - 0x20, - 0x4E, - 0x6F, - 0x77, - 0x20, - 0x69, - 0x73, - 0x20, - 0x74, - 0x68, - 0x65, - 0x20, - 0x74, - 0x69, - 0x6D, - 0x65, - 0x20, - 0x66, - 0x6F, - 0x72, - 0x20, - 0x00, - 0x31, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, + 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, 0x4E, 0x6F, + 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, + 0x69, 0x6D, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x00, 0x31, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static unsigned char cbc_ok[32] = { @@ -241,73 +205,17 @@ static unsigned char cbc_ok[32] = { #error "Original vectors are preserved for reference only." static unsigned char cbc2_key[8] = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }; static unsigned char xcbc_ok[32] = { - 0x86, - 0x74, - 0x81, - 0x0D, - 0x61, - 0xA4, - 0xA5, - 0x48, - 0xB9, - 0x93, - 0x03, - 0xE1, - 0xB8, - 0xBB, - 0xBD, - 0xBD, - 0x64, - 0x30, - 0x0B, - 0xB9, - 0x06, - 0x65, - 0x81, - 0x76, - 0x04, - 0x1D, - 0x77, - 0x62, - 0x17, - 0xCA, - 0x2B, - 0xD2, + 0x86, 0x74, 0x81, 0x0D, 0x61, 0xA4, 0xA5, 0x48, 0xB9, 0x93, + 0x03, 0xE1, 0xB8, 0xBB, 0xBD, 0xBD, 0x64, 0x30, 0x0B, 0xB9, + 0x06, 0x65, 0x81, 0x76, 0x04, 0x1D, 0x77, 0x62, 0x17, 0xCA, + 0x2B, 0xD2 }; #else static unsigned char xcbc_ok[32] = { - 0x84, - 0x6B, - 0x29, - 0x14, - 0x85, - 0x1E, - 0x9A, - 0x29, - 0x54, - 0x73, - 0x2F, - 0x8A, - 0xA0, - 0xA6, - 0x11, - 0xC1, - 0x15, - 0xCD, - 0xC2, - 0xD7, - 0x95, - 0x1B, - 0x10, - 0x53, - 0xA6, - 0x3C, - 0x5E, - 0x03, - 0xB2, - 0x1A, - 0xA3, - 0xC4, + 0x84, 0x6B, 0x29, 0x14, 0x85, 0x1E, 0x9A, 0x29, 0x54, 0x73, + 0x2F, 0x8A, 0xA0, 0xA6, 0x11, 0xC1, 0x15, 0xCD, 0xC2, 0xD7, + 0x95, 0x1B, 0x10, 0x53, 0xA6, 0x3C, 0x5E, 0x03, 0xB2, 0x1A, + 0xA3, 0xC4 }; #endif diff --git a/crypto/openssl/test/dsatest.c b/crypto/openssl/test/dsatest.c index 69c8baea07e4..cdd043de3101 100644 --- a/crypto/openssl/test/dsatest.c +++ b/crypto/openssl/test/dsatest.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -33,158 +33,26 @@ static int dsa_cb(int p, int n, BN_GENCB *arg); static unsigned char out_p[] = { - 0x8d, - 0xf2, - 0xa4, - 0x94, - 0x49, - 0x22, - 0x76, - 0xaa, - 0x3d, - 0x25, - 0x75, - 0x9b, - 0xb0, - 0x68, - 0x69, - 0xcb, - 0xea, - 0xc0, - 0xd8, - 0x3a, - 0xfb, - 0x8d, - 0x0c, - 0xf7, - 0xcb, - 0xb8, - 0x32, - 0x4f, - 0x0d, - 0x78, - 0x82, - 0xe5, - 0xd0, - 0x76, - 0x2f, - 0xc5, - 0xb7, - 0x21, - 0x0e, - 0xaf, - 0xc2, - 0xe9, - 0xad, - 0xac, - 0x32, - 0xab, - 0x7a, - 0xac, - 0x49, - 0x69, - 0x3d, - 0xfb, - 0xf8, - 0x37, - 0x24, - 0xc2, - 0xec, - 0x07, - 0x36, - 0xee, - 0x31, - 0xc8, - 0x02, - 0x91, + 0x8d, 0xf2, 0xa4, 0x94, 0x49, 0x22, 0x76, 0xaa, 0x3d, 0x25, + 0x75, 0x9b, 0xb0, 0x68, 0x69, 0xcb, 0xea, 0xc0, 0xd8, 0x3a, + 0xfb, 0x8d, 0x0c, 0xf7, 0xcb, 0xb8, 0x32, 0x4f, 0x0d, 0x78, + 0x82, 0xe5, 0xd0, 0x76, 0x2f, 0xc5, 0xb7, 0x21, 0x0e, 0xaf, + 0xc2, 0xe9, 0xad, 0xac, 0x32, 0xab, 0x7a, 0xac, 0x49, 0x69, + 0x3d, 0xfb, 0xf8, 0x37, 0x24, 0xc2, 0xec, 0x07, 0x36, 0xee, + 0x31, 0xc8, 0x02, 0x91 }; static unsigned char out_q[] = { - 0xc7, - 0x73, - 0x21, - 0x8c, - 0x73, - 0x7e, - 0xc8, - 0xee, - 0x99, - 0x3b, - 0x4f, - 0x2d, - 0xed, - 0x30, - 0xf4, - 0x8e, - 0xda, - 0xce, - 0x91, - 0x5f, + 0xc7, 0x73, 0x21, 0x8c, 0x73, 0x7e, 0xc8, 0xee, 0x99, 0x3b, + 0x4f, 0x2d, 0xed, 0x30, 0xf4, 0x8e, 0xda, 0xce, 0x91, 0x5f }; static unsigned char out_g[] = { - 0x62, - 0x6d, - 0x02, - 0x78, - 0x39, - 0xea, - 0x0a, - 0x13, - 0x41, - 0x31, - 0x63, - 0xa5, - 0x5b, - 0x4c, - 0xb5, - 0x00, - 0x29, - 0x9d, - 0x55, - 0x22, - 0x95, - 0x6c, - 0xef, - 0xcb, - 0x3b, - 0xff, - 0x10, - 0xf3, - 0x99, - 0xce, - 0x2c, - 0x2e, - 0x71, - 0xcb, - 0x9d, - 0xe5, - 0xfa, - 0x24, - 0xba, - 0xbf, - 0x58, - 0xe5, - 0xb7, - 0x95, - 0x21, - 0x92, - 0x5c, - 0x9c, - 0xc4, - 0x2e, - 0x9f, - 0x6f, - 0x46, - 0x4b, - 0x08, - 0x8c, - 0xc5, - 0x72, - 0xaf, - 0x53, - 0xe6, - 0xd7, - 0x88, - 0x02, + 0x62, 0x6d, 0x02, 0x78, 0x39, 0xea, 0x0a, 0x13, 0x41, 0x31, + 0x63, 0xa5, 0x5b, 0x4c, 0xb5, 0x00, 0x29, 0x9d, 0x55, 0x22, + 0x95, 0x6c, 0xef, 0xcb, 0x3b, 0xff, 0x10, 0xf3, 0x99, 0xce, + 0x2c, 0x2e, 0x71, 0xcb, 0x9d, 0xe5, 0xfa, 0x24, 0xba, 0xbf, + 0x58, 0xe5, 0xb7, 0x95, 0x21, 0x92, 0x5c, 0x9c, 0xc4, 0x2e, + 0x9f, 0x6f, 0x46, 0x4b, 0x08, 0x8c, 0xc5, 0x72, 0xaf, 0x53, + 0xe6, 0xd7, 0x88, 0x02 }; static int dsa_test(void) @@ -202,26 +70,8 @@ static int dsa_test(void) * PUB 186 and also appear in Appendix 5 to FIPS PIB 186-1 */ static unsigned char seed[20] = { - 0xd5, - 0x01, - 0x4e, - 0x4b, - 0x60, - 0xef, - 0x2b, - 0xa8, - 0xb6, - 0x21, - 0x1b, - 0x40, - 0x62, - 0xba, - 0x32, - 0x24, - 0xe0, - 0x42, - 0x7d, - 0xd3, + 0xd5, 0x01, 0x4e, 0x4b, 0x60, 0xef, 0x2b, 0xa8, 0xb6, 0x21, + 0x1b, 0x40, 0x62, 0xba, 0x32, 0x24, 0xe0, 0x42, 0x7d, 0xd3 }; static const unsigned char str1[] = "12345678901234567890"; diff --git a/crypto/openssl/test/ectest.c b/crypto/openssl/test/ectest.c index 78a661c98ba9..985738259d96 100644 --- a/crypto/openssl/test/ectest.c +++ b/crypto/openssl/test/ectest.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -1421,471 +1421,56 @@ err: } static const unsigned char p521_named[] = { - 0x06, - 0x05, - 0x2b, - 0x81, - 0x04, - 0x00, - 0x23, + 0x06, 0x05, 0x2b, 0x81, 0x04, 0x00, 0x23 }; static const unsigned char p521_explicit[] = { - 0x30, - 0x82, - 0x01, - 0xc3, - 0x02, - 0x01, - 0x01, - 0x30, - 0x4d, - 0x06, - 0x07, - 0x2a, - 0x86, - 0x48, - 0xce, - 0x3d, - 0x01, - 0x01, - 0x02, - 0x42, - 0x01, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0x30, - 0x81, - 0x9f, - 0x04, - 0x42, - 0x01, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xfc, - 0x04, - 0x42, - 0x00, - 0x51, - 0x95, - 0x3e, - 0xb9, - 0x61, - 0x8e, - 0x1c, - 0x9a, - 0x1f, - 0x92, - 0x9a, - 0x21, - 0xa0, - 0xb6, - 0x85, - 0x40, - 0xee, - 0xa2, - 0xda, - 0x72, - 0x5b, - 0x99, - 0xb3, - 0x15, - 0xf3, - 0xb8, - 0xb4, - 0x89, - 0x91, - 0x8e, - 0xf1, - 0x09, - 0xe1, - 0x56, - 0x19, - 0x39, - 0x51, - 0xec, - 0x7e, - 0x93, - 0x7b, - 0x16, - 0x52, - 0xc0, - 0xbd, - 0x3b, - 0xb1, - 0xbf, - 0x07, - 0x35, - 0x73, - 0xdf, - 0x88, - 0x3d, - 0x2c, - 0x34, - 0xf1, - 0xef, - 0x45, - 0x1f, - 0xd4, - 0x6b, - 0x50, - 0x3f, - 0x00, - 0x03, - 0x15, - 0x00, - 0xd0, - 0x9e, - 0x88, - 0x00, - 0x29, - 0x1c, - 0xb8, - 0x53, - 0x96, - 0xcc, - 0x67, - 0x17, - 0x39, - 0x32, - 0x84, - 0xaa, - 0xa0, - 0xda, - 0x64, - 0xba, - 0x04, - 0x81, - 0x85, - 0x04, - 0x00, - 0xc6, - 0x85, - 0x8e, - 0x06, - 0xb7, - 0x04, - 0x04, - 0xe9, - 0xcd, - 0x9e, - 0x3e, - 0xcb, - 0x66, - 0x23, - 0x95, - 0xb4, - 0x42, - 0x9c, - 0x64, - 0x81, - 0x39, - 0x05, - 0x3f, - 0xb5, - 0x21, - 0xf8, - 0x28, - 0xaf, - 0x60, - 0x6b, - 0x4d, - 0x3d, - 0xba, - 0xa1, - 0x4b, - 0x5e, - 0x77, - 0xef, - 0xe7, - 0x59, - 0x28, - 0xfe, - 0x1d, - 0xc1, - 0x27, - 0xa2, - 0xff, - 0xa8, - 0xde, - 0x33, - 0x48, - 0xb3, - 0xc1, - 0x85, - 0x6a, - 0x42, - 0x9b, - 0xf9, - 0x7e, - 0x7e, - 0x31, - 0xc2, - 0xe5, - 0xbd, - 0x66, - 0x01, - 0x18, - 0x39, - 0x29, - 0x6a, - 0x78, - 0x9a, - 0x3b, - 0xc0, - 0x04, - 0x5c, - 0x8a, - 0x5f, - 0xb4, - 0x2c, - 0x7d, - 0x1b, - 0xd9, - 0x98, - 0xf5, - 0x44, - 0x49, - 0x57, - 0x9b, - 0x44, - 0x68, - 0x17, - 0xaf, - 0xbd, - 0x17, - 0x27, - 0x3e, - 0x66, - 0x2c, - 0x97, - 0xee, - 0x72, - 0x99, - 0x5e, - 0xf4, - 0x26, - 0x40, - 0xc5, - 0x50, - 0xb9, - 0x01, - 0x3f, - 0xad, - 0x07, - 0x61, - 0x35, - 0x3c, - 0x70, - 0x86, - 0xa2, - 0x72, - 0xc2, - 0x40, - 0x88, - 0xbe, - 0x94, - 0x76, - 0x9f, - 0xd1, - 0x66, - 0x50, - 0x02, - 0x42, - 0x01, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xff, - 0xfa, - 0x51, - 0x86, - 0x87, - 0x83, - 0xbf, - 0x2f, - 0x96, - 0x6b, - 0x7f, - 0xcc, - 0x01, - 0x48, - 0xf7, - 0x09, - 0xa5, - 0xd0, - 0x3b, - 0xb5, - 0xc9, - 0xb8, - 0x89, - 0x9c, - 0x47, - 0xae, - 0xbb, - 0x6f, - 0xb7, - 0x1e, - 0x91, - 0x38, - 0x64, - 0x09, - 0x02, - 0x01, - 0x01, + 0x30, 0x82, 0x01, 0xc3, 0x02, 0x01, 0x01, 0x30, 0x4d, 0x06, + 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x01, 0x01, 0x02, 0x42, + 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x81, 0x9f, 0x04, + 0x42, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x04, 0x42, 0x00, + 0x51, 0x95, 0x3e, 0xb9, 0x61, 0x8e, 0x1c, 0x9a, 0x1f, 0x92, + 0x9a, 0x21, 0xa0, 0xb6, 0x85, 0x40, 0xee, 0xa2, 0xda, 0x72, + 0x5b, 0x99, 0xb3, 0x15, 0xf3, 0xb8, 0xb4, 0x89, 0x91, 0x8e, + 0xf1, 0x09, 0xe1, 0x56, 0x19, 0x39, 0x51, 0xec, 0x7e, 0x93, + 0x7b, 0x16, 0x52, 0xc0, 0xbd, 0x3b, 0xb1, 0xbf, 0x07, 0x35, + 0x73, 0xdf, 0x88, 0x3d, 0x2c, 0x34, 0xf1, 0xef, 0x45, 0x1f, + 0xd4, 0x6b, 0x50, 0x3f, 0x00, 0x03, 0x15, 0x00, 0xd0, 0x9e, + 0x88, 0x00, 0x29, 0x1c, 0xb8, 0x53, 0x96, 0xcc, 0x67, 0x17, + 0x39, 0x32, 0x84, 0xaa, 0xa0, 0xda, 0x64, 0xba, 0x04, 0x81, + 0x85, 0x04, 0x00, 0xc6, 0x85, 0x8e, 0x06, 0xb7, 0x04, 0x04, + 0xe9, 0xcd, 0x9e, 0x3e, 0xcb, 0x66, 0x23, 0x95, 0xb4, 0x42, + 0x9c, 0x64, 0x81, 0x39, 0x05, 0x3f, 0xb5, 0x21, 0xf8, 0x28, + 0xaf, 0x60, 0x6b, 0x4d, 0x3d, 0xba, 0xa1, 0x4b, 0x5e, 0x77, + 0xef, 0xe7, 0x59, 0x28, 0xfe, 0x1d, 0xc1, 0x27, 0xa2, 0xff, + 0xa8, 0xde, 0x33, 0x48, 0xb3, 0xc1, 0x85, 0x6a, 0x42, 0x9b, + 0xf9, 0x7e, 0x7e, 0x31, 0xc2, 0xe5, 0xbd, 0x66, 0x01, 0x18, + 0x39, 0x29, 0x6a, 0x78, 0x9a, 0x3b, 0xc0, 0x04, 0x5c, 0x8a, + 0x5f, 0xb4, 0x2c, 0x7d, 0x1b, 0xd9, 0x98, 0xf5, 0x44, 0x49, + 0x57, 0x9b, 0x44, 0x68, 0x17, 0xaf, 0xbd, 0x17, 0x27, 0x3e, + 0x66, 0x2c, 0x97, 0xee, 0x72, 0x99, 0x5e, 0xf4, 0x26, 0x40, + 0xc5, 0x50, 0xb9, 0x01, 0x3f, 0xad, 0x07, 0x61, 0x35, 0x3c, + 0x70, 0x86, 0xa2, 0x72, 0xc2, 0x40, 0x88, 0xbe, 0x94, 0x76, + 0x9f, 0xd1, 0x66, 0x50, 0x02, 0x42, 0x01, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, + 0x51, 0x86, 0x87, 0x83, 0xbf, 0x2f, 0x96, 0x6b, 0x7f, 0xcc, + 0x01, 0x48, 0xf7, 0x09, 0xa5, 0xd0, 0x3b, 0xb5, 0xc9, 0xb8, + 0x89, 0x9c, 0x47, 0xae, 0xbb, 0x6f, 0xb7, 0x1e, 0x91, 0x38, + 0x64, 0x09, 0x02, 0x01, 0x01 }; /* diff --git a/crypto/openssl/test/endecode_test.c b/crypto/openssl/test/endecode_test.c index 7f093f6a257f..d20277115aa2 100644 --- a/crypto/openssl/test/endecode_test.c +++ b/crypto/openssl/test/endecode_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2020-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2020-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -1158,36 +1158,9 @@ static int do_create_ec_explicit_trinomial_params(OSSL_PARAM_BLD *bld, BIGNUM *a, *b, *poly, *order, *cofactor; /* sect233k1 characteristic-two-field tpBasis */ static const unsigned char poly_data[] = { - 0x02, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x04, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x01, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }; static const unsigned char a_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/crypto/openssl/test/enginetest.c b/crypto/openssl/test/enginetest.c index 50556131b393..6132142d1e52 100644 --- a/crypto/openssl/test/enginetest.c +++ b/crypto/openssl/test/enginetest.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -61,6 +61,8 @@ static int test_engines(void) ENGINE *new_h4 = NULL; memset(block, 0, sizeof(block)); + memset(eid, 0, sizeof(eid)); + memset(ename, 0, sizeof(ename)); if (!TEST_ptr(new_h1 = ENGINE_new()) || !TEST_true(ENGINE_set_id(new_h1, "test_id0")) || !TEST_true(ENGINE_set_name(new_h1, "First test item")) @@ -171,10 +173,6 @@ cleanup_loop: goto end; ENGINE_free(ptr); } - for (loop = 0; loop < NUMTOADD; loop++) { - OPENSSL_free(eid[loop]); - OPENSSL_free(ename[loop]); - } to_return = 1; end: @@ -182,8 +180,11 @@ end: ENGINE_free(new_h2); ENGINE_free(new_h3); ENGINE_free(new_h4); - for (loop = 0; loop < NUMTOADD; loop++) + for (loop = 0; loop < NUMTOADD; loop++) { + OPENSSL_free(eid[loop]); + OPENSSL_free(ename[loop]); ENGINE_free(block[loop]); + } return to_return; } diff --git a/crypto/openssl/test/evp_extra_test.c b/crypto/openssl/test/evp_extra_test.c index 7bd41db115ca..9b25ec6e2833 100644 --- a/crypto/openssl/test/evp_extra_test.c +++ b/crypto/openssl/test/evp_extra_test.c @@ -1726,6 +1726,29 @@ out: return ret; } +#ifndef OPENSSL_NO_POLY1305 +/* Test that EVP_MAC_final fails for Poly1305 when no key was set */ +static int test_evp_mac_poly1305_no_key(void) +{ + int ret = 0; + EVP_MAC *mac = NULL; + EVP_MAC_CTX *ctx = NULL; + unsigned char out[16]; + size_t outl = 0; + + if (!TEST_ptr(mac = EVP_MAC_fetch(testctx, "Poly1305", testpropq)) + || !TEST_ptr(ctx = EVP_MAC_CTX_new(mac)) + || !TEST_int_eq(EVP_MAC_init(ctx, NULL, 0, NULL), 1) + || !TEST_int_eq(EVP_MAC_final(ctx, out, &outl, sizeof(out)), 0)) + goto err; + ret = 1; +err: + EVP_MAC_CTX_free(ctx); + EVP_MAC_free(mac); + return ret; +} +#endif + static int test_d2i_AutoPrivateKey(int i) { int ret = 0; @@ -2067,9 +2090,10 @@ static int test_EVP_SM2(void) uint8_t ciphertext[128]; size_t ctext_len = sizeof(ciphertext); - + size_t ctext_len_param = 0; uint8_t plaintext[8]; size_t ptext_len = sizeof(plaintext); + size_t ptext_len_param = 0; uint8_t sm2_id[] = { 1, 2, 3, 4, 'l', 'e', 't', 't', 'e', 'r' }; @@ -2199,7 +2223,8 @@ static int test_EVP_SM2(void) if (!TEST_true(EVP_PKEY_CTX_set_params(cctx, sparams))) goto done; - if (!TEST_true(EVP_PKEY_encrypt(cctx, ciphertext, &ctext_len, kMsg, + ctext_len_param = ctext_len; + if (!TEST_true(EVP_PKEY_encrypt(cctx, ciphertext, &ctext_len_param, kMsg, sizeof(kMsg)))) goto done; @@ -2209,8 +2234,9 @@ static int test_EVP_SM2(void) if (!TEST_true(EVP_PKEY_CTX_set_params(cctx, sparams))) goto done; - if (!TEST_int_gt(EVP_PKEY_decrypt(cctx, plaintext, &ptext_len, ciphertext, - ctext_len), + ptext_len_param = ptext_len; + if (!TEST_int_gt(EVP_PKEY_decrypt(cctx, plaintext, &ptext_len_param, ciphertext, + ctext_len_param), 0)) goto done; @@ -2230,7 +2256,7 @@ static int test_EVP_SM2(void) goto done; } - if (!TEST_true(ptext_len == sizeof(kMsg))) + if (!TEST_true(ptext_len_param == sizeof(kMsg))) goto done; if (!TEST_true(memcmp(plaintext, kMsg, sizeof(kMsg)) == 0)) @@ -3050,6 +3076,85 @@ err: return ret; } +static int test_RSA_verify_recover_rejects_short_buffer(void) +{ + int ret = 0; + int recovered_cap = 0; + EVP_PKEY *pkey = NULL; + EVP_PKEY_CTX *sign_ctx = NULL, *verify_ctx = NULL; + unsigned char *sig = NULL, *recovered = NULL; + size_t sig_len = 0, recovered_len = 0; + unsigned long err = 0; + unsigned char shortbuf[] = { 0xa5, 0x5a }; + const unsigned char shortbuf_expected[] = { 0xa5, 0x5a }; + unsigned char digest[32]; + size_t i; + + for (i = 0; i < sizeof(digest); i++) + digest[i] = (unsigned char)i; + + if (OSSL_PROVIDER_available(testctx, "fips")) + return TEST_skip("Test skipped for FIPS provider"); + + if (!TEST_ptr(pkey = load_example_rsa_key()) + || !TEST_ptr(sign_ctx = EVP_PKEY_CTX_new_from_pkey(testctx, pkey, NULL)) + || !TEST_int_gt(EVP_PKEY_sign_init(sign_ctx), 0) + || !TEST_int_gt(EVP_PKEY_CTX_set_rsa_padding(sign_ctx, + RSA_PKCS1_PADDING), + 0) + || !TEST_int_gt(EVP_PKEY_CTX_set_signature_md(sign_ctx, EVP_sha256()), + 0) + || !TEST_int_gt(EVP_PKEY_sign(sign_ctx, NULL, &sig_len, digest, + sizeof(digest)), + 0) + || !TEST_ptr(sig = OPENSSL_malloc(sig_len)) + || !TEST_int_gt(EVP_PKEY_sign(sign_ctx, sig, &sig_len, digest, + sizeof(digest)), + 0) + || !TEST_int_gt(recovered_cap = EVP_PKEY_get_size(pkey), 0) + || !TEST_ptr(recovered = OPENSSL_malloc(recovered_cap)) + || !TEST_ptr(verify_ctx = EVP_PKEY_CTX_new_from_pkey(testctx, pkey, + NULL)) + || !TEST_int_gt(EVP_PKEY_verify_recover_init(verify_ctx), 0) + || !TEST_int_gt(EVP_PKEY_CTX_set_rsa_padding(verify_ctx, + RSA_PKCS1_PADDING), + 0) + || !TEST_int_gt(EVP_PKEY_CTX_set_signature_md(verify_ctx, EVP_sha256()), + 0)) + goto done; + + recovered_len = (size_t)recovered_cap; + if (!TEST_int_gt(EVP_PKEY_verify_recover(verify_ctx, recovered, + &recovered_len, sig, sig_len), + 0) + || !TEST_size_t_eq(recovered_len, sizeof(digest)) + || !TEST_mem_eq(recovered, recovered_len, digest, sizeof(digest))) + goto done; + + ERR_clear_error(); + recovered_len = 1; + if (!TEST_int_le(EVP_PKEY_verify_recover(verify_ctx, shortbuf, + &recovered_len, sig, sig_len), + 0)) + goto done; + + err = ERR_peek_error(); + if (!TEST_int_eq(ERR_GET_LIB(err), ERR_LIB_PROV) + || !TEST_int_eq(ERR_GET_REASON(err), PROV_R_OUTPUT_BUFFER_TOO_SMALL) + || !TEST_mem_eq(shortbuf, sizeof(shortbuf), shortbuf_expected, + sizeof(shortbuf_expected))) + goto done; + + ret = 1; +done: + EVP_PKEY_CTX_free(sign_ctx); + EVP_PKEY_CTX_free(verify_ctx); + EVP_PKEY_free(pkey); + OPENSSL_free(sig); + OPENSSL_free(recovered); + return ret; +} + static int test_RSA_encrypt(void) { int ret = 0; @@ -5530,6 +5635,333 @@ end: return ret; } +/* + * Cross-driver round-trip test for AEAD one-shot vs streaming paths. + * + * The streaming path (EVP_CipherUpdate/Final, dispatched to + * OSSL_FUNC_CIPHER_UPDATE/_FINAL) is treated as the oracle. For each + * AEAD configuration we encrypt and decrypt the same (key, iv, aad, pt), + * driving the body in two combinations: + * + * 1. body encrypt via EVP_Cipher() (one-shot, OSSL_FUNC_CIPHER_CIPHER), + * body decrypt via EVP_CipherUpdate (streaming). + * 2. body encrypt via EVP_CipherUpdate, body decrypt via EVP_Cipher(). + * + * Both combinations must recover the plaintext and verify the tag. AAD + * is always fed via EVP_CipherUpdate(NULL, ...): OCB's one-shot is body + * only and the asymmetric "AAD streaming, body one-shot" call shape is + * the natural pattern a caller reaching for EVP_Cipher() for throughput + * would write anyway. + * + * CVE-2026-45445 (AES-OCB EVP_Cipher() ignored IV) was a silent failure + * in this matrix: the one-shot encrypt path produced ciphertext under + * Offset_0 = 0 regardless of IV, which the streaming decrypt path then + * could not verify. Adding this cross-check catches the same class of + * bug for any future AEAD whose one-shot dispatch diverges from its + * streaming dispatch. + */ +typedef struct { + const char *name; /* EVP_CIPHER fetch name */ + size_t keylen; + size_t ivlen; + size_t taglen; + int is_ccm; /* needs length-up-front + tag-before-body dance */ +} AEAD_ONESHOT_CFG; + +static const AEAD_ONESHOT_CFG aead_oneshot_cfgs[] = { + { "AES-128-GCM", 16, 12, 16, 0 }, + { "AES-256-GCM", 32, 12, 16, 0 }, + { "AES-128-CCM", 16, 12, 16, 1 }, + { "AES-256-CCM", 32, 12, 16, 1 }, + { "AES-128-OCB", 16, 12, 16, 0 }, + { "AES-256-OCB", 32, 12, 16, 0 }, + { "ChaCha20-Poly1305", 32, 12, 16, 0 } +}; + +/* + * Drive an encrypt or decrypt operation. AAD always via EVP_CipherUpdate. + * Body via EVP_Cipher() when oneshot_body is non-zero, EVP_CipherUpdate + * otherwise. On encrypt, fills *out and the caller-provided tag buffer. + * On decrypt, reads from in and verifies tag; returns 0 if verification + * fails (the test asserts the expected outcome). + */ +static int aead_oneshot_op(const AEAD_ONESHOT_CFG *cfg, int enc, + int oneshot_body, const unsigned char *key, + const unsigned char *iv, const unsigned char *aad, + size_t aad_len, const unsigned char *in, size_t in_len, + unsigned char *out, unsigned char *tag, const char **why) +{ + EVP_CIPHER_CTX *ctx = NULL; + EVP_CIPHER *cipher = NULL; + int outl = 0, tmpl = 0; + int ok = 0; + int body_rv; + + *why = NULL; + + if (!TEST_ptr(cipher = EVP_CIPHER_fetch(testctx, cfg->name, testpropq))) { + *why = "CIPHER_FETCH"; + goto end; + } + if (!TEST_ptr(ctx = EVP_CIPHER_CTX_new())) { + *why = "CTX_NEW"; + goto end; + } + if (!TEST_true(EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc))) { + *why = "INIT_CIPHER"; + goto end; + } + if (!TEST_int_gt(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, + (int)cfg->ivlen, NULL), + 0)) { + *why = "SET_IVLEN"; + goto end; + } + if (cfg->is_ccm) { + /* Placeholder taglen on encrypt, real tag on decrypt; both before key+iv. */ + if (!TEST_int_gt(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, + (int)cfg->taglen, enc ? NULL : tag), + 0)) { + *why = "CCM_SET_TAG"; + goto end; + } + } + if (!TEST_true(EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, enc))) { + *why = "INIT_KEY_IV"; + goto end; + } + if (cfg->is_ccm) { + if (!TEST_true(EVP_CipherUpdate(ctx, NULL, &outl, NULL, (int)in_len))) { + *why = "CCM_LEN_DECL"; + goto end; + } + } + if (aad_len > 0 + && !TEST_true(EVP_CipherUpdate(ctx, NULL, &outl, aad, (int)aad_len))) { + *why = "AAD"; + goto end; + } + if (!enc && !cfg->is_ccm + && !TEST_int_gt(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, + (int)cfg->taglen, tag), + 0)) { + *why = "SET_TAG"; + goto end; + } + + if (oneshot_body) { + body_rv = EVP_Cipher(ctx, out, in, (unsigned int)in_len); + if (cfg->is_ccm && !enc) { + /* CCM decrypt: 0 means tag verify failed, < 0 means error. */ + if (!TEST_int_gt(body_rv, 0)) { + *why = "ONESHOT_DECRYPT"; + goto end; + } + } else { + if (!TEST_int_ge(body_rv, 0)) { + *why = "ONESHOT_BODY"; + goto end; + } + } + outl = (int)in_len; + } else { + if (!TEST_true(EVP_CipherUpdate(ctx, out, &outl, in, (int)in_len))) { + *why = enc ? "STREAM_BODY_ENC" : "STREAM_BODY_DEC"; + goto end; + } + } + + if (!cfg->is_ccm) { + if (!TEST_true(EVP_CipherFinal_ex(ctx, out + outl, &tmpl))) { + *why = enc ? "FINAL_ENC" : "FINAL_DEC"; + goto end; + } + } + + if (enc) { + if (!TEST_int_gt(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, + (int)cfg->taglen, tag), + 0)) { + *why = "GET_TAG"; + goto end; + } + } + ok = 1; +end: + EVP_CIPHER_CTX_free(ctx); + EVP_CIPHER_free(cipher); + return ok; +} + +/* + * For each AEAD row we run two AAD modes, and within each AAD mode two + * cross-driver round trips: + * + * aad_mode 0: no AAD. Critical for catching the OCB-style bug: any + * EVP_CipherUpdate(NULL, aad, ...) call before the body + * would itself pass through the (correct) streaming + * handler and apply the buffered IV, masking the one-shot + * handler's failure to do so. With aad_len == 0 we make + * EVP_Cipher() the very first cipher operation on the + * context, which is the shape the bug requires. + * + * aad_mode 1: with AAD via streaming. Catches divergence between the + * drivers when AAD is in play. + * + * leg 0: encrypt-oneshot + decrypt-streaming + * leg 1: encrypt-streaming + decrypt-oneshot + * + * The test index encodes (cipher, aad_mode) so a failure points at both. + */ +static int test_aead_oneshot_roundtrip(int idx) +{ + static const unsigned char fixed_key[32] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f + }; + static const unsigned char fixed_iv[12] = { + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab + }; + static const unsigned char fixed_aad[] = "extra:context"; + static const unsigned char fixed_pt[] = "THE QUICK BROWN FOX JUMPS OVER LAZY!!"; + const AEAD_ONESHOT_CFG *cfg = &aead_oneshot_cfgs[idx / 2]; + int with_aad = idx % 2; + size_t aad_len = with_aad ? sizeof(fixed_aad) - 1 : 0; + size_t pt_len = sizeof(fixed_pt) - 1; + EVP_CIPHER *probe = NULL; + unsigned char ct[64], pt[64]; + unsigned char tag_oneshot[16], tag_stream[16]; + const char *why = NULL; + int leg, ok = 0; + + /* + * Probe for the cipher: a build with no-ocb / no-chacha / etc. will + * not have it, and we treat that as a pass (nothing to test here). + */ + ERR_set_mark(); + probe = EVP_CIPHER_fetch(testctx, cfg->name, testpropq); + ERR_pop_to_mark(); + if (probe == NULL) { + TEST_info("skipping, '%s' is not available", cfg->name); + return 1; + } + EVP_CIPHER_free(probe); + + for (leg = 0; leg <= 1; leg++) { + int enc_oneshot = (leg == 0); + unsigned char *tag = enc_oneshot ? tag_oneshot : tag_stream; + + memset(ct, 0, sizeof(ct)); + memset(pt, 0, sizeof(pt)); + memset(tag, 0, cfg->taglen); + + if (!aead_oneshot_op(cfg, /*enc=*/1, /*oneshot_body=*/enc_oneshot, + fixed_key, fixed_iv, fixed_aad, aad_len, + fixed_pt, pt_len, ct, tag, &why)) { + TEST_error("%s (%s): encrypt leg %d (%s body) failed at %s", + cfg->name, with_aad ? "with AAD" : "no AAD", + leg, enc_oneshot ? "oneshot" : "stream", + why ? why : "?"); + goto end; + } + if (!aead_oneshot_op(cfg, /*enc=*/0, /*oneshot_body=*/!enc_oneshot, + fixed_key, fixed_iv, fixed_aad, aad_len, + ct, pt_len, pt, tag, &why)) { + TEST_error("%s (%s): decrypt leg %d (%s body) failed at %s", + cfg->name, with_aad ? "with AAD" : "no AAD", + leg, enc_oneshot ? "stream" : "oneshot", + why ? why : "?"); + goto end; + } + if (!TEST_mem_eq(pt, pt_len, fixed_pt, pt_len)) { + TEST_error("%s (%s): leg %d: recovered plaintext differs", + cfg->name, with_aad ? "with AAD" : "no AAD", leg); + goto end; + } + } + + /* + * Both legs share the same (key, iv, aad, pt) and must therefore + * agree on the tag bit-for-bit, regardless of which driver computed + * it. This catches the OCB-style failure where the one-shot path + * silently emits a different ciphertext/tag from the streaming path. + */ + if (!TEST_mem_eq(tag_oneshot, cfg->taglen, tag_stream, cfg->taglen)) { + TEST_error("%s (%s): oneshot-encrypt tag != streaming-encrypt tag", + cfg->name, with_aad ? "with AAD" : "no AAD"); + goto end; + } + ok = 1; +end: + return ok; +} + +#ifndef OPENSSL_NO_DES +static int test_EVP_CIPHER_get_type_des_ede3(void) +{ + const EVP_CIPHER *cipher = NULL; + int base_type, variant_type, nid; + int ret = 0; + + /* Get the base type from CFB64 (should be NID_des_ede3_cfb64) */ + cipher = EVP_des_ede3_cfb64(); + base_type = EVP_CIPHER_get_type(cipher); + + /* Test CFB64 - should map to the same base_type */ + variant_type = EVP_CIPHER_get_type(cipher); + nid = EVP_CIPHER_get_nid(cipher); + + /* Verify the returned type */ + if (!TEST_int_eq(variant_type, base_type)) + goto end; + + /* Verify that variant_type and nid are same for 64-bit variants */ + if (!TEST_int_eq(variant_type, nid)) + goto end; + + if (!TEST_int_eq(NID_des_ede3_cfb64, variant_type)) + goto end; + + /* Test CFB8 - should map to the same base_type */ + cipher = EVP_des_ede3_cfb8(); + variant_type = EVP_CIPHER_get_type(cipher); + nid = EVP_CIPHER_get_nid(cipher); + + /* Verify the returned type */ + if (!TEST_int_eq(variant_type, base_type)) + goto end; + + /* Verify that variant_type and nid are different for variants */ + if (!TEST_int_ne(variant_type, nid)) + goto end; + + if (!TEST_int_eq(NID_des_ede3_cfb64, variant_type)) + goto end; + + /* Test CFB1 - should map to the same base_type */ + cipher = EVP_des_ede3_cfb1(); + variant_type = EVP_CIPHER_get_type(cipher); + nid = EVP_CIPHER_get_nid(cipher); + + /* Verify the returned type */ + if (!TEST_int_eq(variant_type, base_type)) + goto end; + + /* Verify that variant_type and nid are different for variants */ + if (!TEST_int_ne(variant_type, nid)) + goto end; + + if (!TEST_int_eq(NID_des_ede3_cfb64, variant_type)) + goto end; + + ret = 1; +end: + return ret; +} +#endif /*OPENSSL_NO_DES */ + int setup_tests(void) { OPTION_CHOICE o; @@ -5570,6 +6002,9 @@ int setup_tests(void) #endif ADD_TEST(test_EVP_Digest); ADD_TEST(test_EVP_md_null); +#ifndef OPENSSL_NO_POLY1305 + ADD_TEST(test_evp_mac_poly1305_no_key); +#endif ADD_ALL_TESTS(test_EVP_PKEY_sign, 3); #ifndef OPENSSL_NO_DEPRECATED_3_0 ADD_ALL_TESTS(test_EVP_PKEY_sign_with_app_method, 2); @@ -5619,6 +6054,7 @@ int setup_tests(void) ADD_TEST(test_RSA_get_set_params); ADD_TEST(test_RSA_OAEP_set_get_params); ADD_TEST(test_RSA_OAEP_set_null_label); + ADD_TEST(test_RSA_verify_recover_rejects_short_buffer); ADD_TEST(test_RSA_encrypt); #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) ADD_TEST(test_decrypt_null_chunks); @@ -5642,7 +6078,8 @@ int setup_tests(void) ADD_ALL_TESTS(test_evp_iv_aes, 12); #ifndef OPENSSL_NO_DES ADD_ALL_TESTS(test_evp_iv_des, 6); -#endif + ADD_TEST(test_EVP_CIPHER_get_type_des_ede3); +#endif /* OPENSSL_NO_DES */ #ifndef OPENSSL_NO_BF ADD_ALL_TESTS(test_evp_bf_default_keylen, 4); #endif @@ -5695,6 +6132,8 @@ int setup_tests(void) ADD_TEST(test_aes_rc4_keylen_change_cve_2023_5363); #endif + ADD_ALL_TESTS(test_aead_oneshot_roundtrip, 2 * OSSL_NELEM(aead_oneshot_cfgs)); + /* Test case for CVE-2026-45446 */ ADD_TEST(test_aes_siv_ctx_reuse); diff --git a/crypto/openssl/test/evp_extra_test2.c b/crypto/openssl/test/evp_extra_test2.c index 924ecc2533f0..86d098b2d392 100644 --- a/crypto/openssl/test/evp_extra_test2.c +++ b/crypto/openssl/test/evp_extra_test2.c @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2015-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -36,614 +36,67 @@ static OSSL_PROVIDER *nullprov = NULL; * should never use this key anywhere but in an example. */ static const unsigned char kExampleRSAKeyDER[] = { - 0x30, - 0x82, - 0x02, - 0x5c, - 0x02, - 0x01, - 0x00, - 0x02, - 0x81, - 0x81, - 0x00, - 0xf8, - 0xb8, - 0x6c, - 0x83, - 0xb4, - 0xbc, - 0xd9, - 0xa8, - 0x57, - 0xc0, - 0xa5, - 0xb4, - 0x59, - 0x76, - 0x8c, - 0x54, - 0x1d, - 0x79, - 0xeb, - 0x22, - 0x52, - 0x04, - 0x7e, - 0xd3, - 0x37, - 0xeb, - 0x41, - 0xfd, - 0x83, - 0xf9, - 0xf0, - 0xa6, - 0x85, - 0x15, - 0x34, - 0x75, - 0x71, - 0x5a, - 0x84, - 0xa8, - 0x3c, - 0xd2, - 0xef, - 0x5a, - 0x4e, - 0xd3, - 0xde, - 0x97, - 0x8a, - 0xdd, - 0xff, - 0xbb, - 0xcf, - 0x0a, - 0xaa, - 0x86, - 0x92, - 0xbe, - 0xb8, - 0x50, - 0xe4, - 0xcd, - 0x6f, - 0x80, - 0x33, - 0x30, - 0x76, - 0x13, - 0x8f, - 0xca, - 0x7b, - 0xdc, - 0xec, - 0x5a, - 0xca, - 0x63, - 0xc7, - 0x03, - 0x25, - 0xef, - 0xa8, - 0x8a, - 0x83, - 0x58, - 0x76, - 0x20, - 0xfa, - 0x16, - 0x77, - 0xd7, - 0x79, - 0x92, - 0x63, - 0x01, - 0x48, - 0x1a, - 0xd8, - 0x7b, - 0x67, - 0xf1, - 0x52, - 0x55, - 0x49, - 0x4e, - 0xd6, - 0x6e, - 0x4a, - 0x5c, - 0xd7, - 0x7a, - 0x37, - 0x36, - 0x0c, - 0xde, - 0xdd, - 0x8f, - 0x44, - 0xe8, - 0xc2, - 0xa7, - 0x2c, - 0x2b, - 0xb5, - 0xaf, - 0x64, - 0x4b, - 0x61, - 0x07, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x81, - 0x80, - 0x74, - 0x88, - 0x64, - 0x3f, - 0x69, - 0x45, - 0x3a, - 0x6d, - 0xc7, - 0x7f, - 0xb9, - 0xa3, - 0xc0, - 0x6e, - 0xec, - 0xdc, - 0xd4, - 0x5a, - 0xb5, - 0x32, - 0x85, - 0x5f, - 0x19, - 0xd4, - 0xf8, - 0xd4, - 0x3f, - 0x3c, - 0xfa, - 0xc2, - 0xf6, - 0x5f, - 0xee, - 0xe6, - 0xba, - 0x87, - 0x74, - 0x2e, - 0xc7, - 0x0c, - 0xd4, - 0x42, - 0xb8, - 0x66, - 0x85, - 0x9c, - 0x7b, - 0x24, - 0x61, - 0xaa, - 0x16, - 0x11, - 0xf6, - 0xb5, - 0xb6, - 0xa4, - 0x0a, - 0xc9, - 0x55, - 0x2e, - 0x81, - 0xa5, - 0x47, - 0x61, - 0xcb, - 0x25, - 0x8f, - 0xc2, - 0x15, - 0x7b, - 0x0e, - 0x7c, - 0x36, - 0x9f, - 0x3a, - 0xda, - 0x58, - 0x86, - 0x1c, - 0x5b, - 0x83, - 0x79, - 0xe6, - 0x2b, - 0xcc, - 0xe6, - 0xfa, - 0x2c, - 0x61, - 0xf2, - 0x78, - 0x80, - 0x1b, - 0xe2, - 0xf3, - 0x9d, - 0x39, - 0x2b, - 0x65, - 0x57, - 0x91, - 0x3d, - 0x71, - 0x99, - 0x73, - 0xa5, - 0xc2, - 0x79, - 0x20, - 0x8c, - 0x07, - 0x4f, - 0xe5, - 0xb4, - 0x60, - 0x1f, - 0x99, - 0xa2, - 0xb1, - 0x4f, - 0x0c, - 0xef, - 0xbc, - 0x59, - 0x53, - 0x00, - 0x7d, - 0xb1, - 0x02, - 0x41, - 0x00, - 0xfc, - 0x7e, - 0x23, - 0x65, - 0x70, - 0xf8, - 0xce, - 0xd3, - 0x40, - 0x41, - 0x80, - 0x6a, - 0x1d, - 0x01, - 0xd6, - 0x01, - 0xff, - 0xb6, - 0x1b, - 0x3d, - 0x3d, - 0x59, - 0x09, - 0x33, - 0x79, - 0xc0, - 0x4f, - 0xde, - 0x96, - 0x27, - 0x4b, - 0x18, - 0xc6, - 0xd9, - 0x78, - 0xf1, - 0xf4, - 0x35, - 0x46, - 0xe9, - 0x7c, - 0x42, - 0x7a, - 0x5d, - 0x9f, - 0xef, - 0x54, - 0xb8, - 0xf7, - 0x9f, - 0xc4, - 0x33, - 0x6c, - 0xf3, - 0x8c, - 0x32, - 0x46, - 0x87, - 0x67, - 0x30, - 0x7b, - 0xa7, - 0xac, - 0xe3, - 0x02, - 0x41, - 0x00, - 0xfc, - 0x2c, - 0xdf, - 0x0c, - 0x0d, - 0x88, - 0xf5, - 0xb1, - 0x92, - 0xa8, - 0x93, - 0x47, - 0x63, - 0x55, - 0xf5, - 0xca, - 0x58, - 0x43, - 0xba, - 0x1c, - 0xe5, - 0x9e, - 0xb6, - 0x95, - 0x05, - 0xcd, - 0xb5, - 0x82, - 0xdf, - 0xeb, - 0x04, - 0x53, - 0x9d, - 0xbd, - 0xc2, - 0x38, - 0x16, - 0xb3, - 0x62, - 0xdd, - 0xa1, - 0x46, - 0xdb, - 0x6d, - 0x97, - 0x93, - 0x9f, - 0x8a, - 0xc3, - 0x9b, - 0x64, - 0x7e, - 0x42, - 0xe3, - 0x32, - 0x57, - 0x19, - 0x1b, - 0xd5, - 0x6e, - 0x85, - 0xfa, - 0xb8, - 0x8d, - 0x02, - 0x41, - 0x00, - 0xbc, - 0x3d, - 0xde, - 0x6d, - 0xd6, - 0x97, - 0xe8, - 0xba, - 0x9e, - 0x81, - 0x37, - 0x17, - 0xe5, - 0xa0, - 0x64, - 0xc9, - 0x00, - 0xb7, - 0xe7, - 0xfe, - 0xf4, - 0x29, - 0xd9, - 0x2e, - 0x43, - 0x6b, - 0x19, - 0x20, - 0xbd, - 0x99, - 0x75, - 0xe7, - 0x76, - 0xf8, - 0xd3, - 0xae, - 0xaf, - 0x7e, - 0xb8, - 0xeb, - 0x81, - 0xf4, - 0x9d, - 0xfe, - 0x07, - 0x2b, - 0x0b, - 0x63, - 0x0b, - 0x5a, - 0x55, - 0x90, - 0x71, - 0x7d, - 0xf1, - 0xdb, - 0xd9, - 0xb1, - 0x41, - 0x41, - 0x68, - 0x2f, - 0x4e, - 0x39, - 0x02, - 0x40, - 0x5a, - 0x34, - 0x66, - 0xd8, - 0xf5, - 0xe2, - 0x7f, - 0x18, - 0xb5, - 0x00, - 0x6e, - 0x26, - 0x84, - 0x27, - 0x14, - 0x93, - 0xfb, - 0xfc, - 0xc6, - 0x0f, - 0x5e, - 0x27, - 0xe6, - 0xe1, - 0xe9, - 0xc0, - 0x8a, - 0xe4, - 0x34, - 0xda, - 0xe9, - 0xa2, - 0x4b, - 0x73, - 0xbc, - 0x8c, - 0xb9, - 0xba, - 0x13, - 0x6c, - 0x7a, - 0x2b, - 0x51, - 0x84, - 0xa3, - 0x4a, - 0xe0, - 0x30, - 0x10, - 0x06, - 0x7e, - 0xed, - 0x17, - 0x5a, - 0x14, - 0x00, - 0xc9, - 0xef, - 0x85, - 0xea, - 0x52, - 0x2c, - 0xbc, - 0x65, - 0x02, - 0x40, - 0x51, - 0xe3, - 0xf2, - 0x83, - 0x19, - 0x9b, - 0xc4, - 0x1e, - 0x2f, - 0x50, - 0x3d, - 0xdf, - 0x5a, - 0xa2, - 0x18, - 0xca, - 0x5f, - 0x2e, - 0x49, - 0xaf, - 0x6f, - 0xcc, - 0xfa, - 0x65, - 0x77, - 0x94, - 0xb5, - 0xa1, - 0x0a, - 0xa9, - 0xd1, - 0x8a, - 0x39, - 0x37, - 0xf4, - 0x0b, - 0xa0, - 0xd7, - 0x82, - 0x27, - 0x5e, - 0xae, - 0x17, - 0x17, - 0xa1, - 0x1e, - 0x54, - 0x34, - 0xbf, - 0x6e, - 0xc4, - 0x8e, - 0x99, - 0x5d, - 0x08, - 0xf1, - 0x2d, - 0x86, - 0x9d, - 0xa5, - 0x20, - 0x1b, - 0xe5, - 0xdf, + 0x30, 0x82, 0x02, 0x5c, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, + 0x00, 0xf8, 0xb8, 0x6c, 0x83, 0xb4, 0xbc, 0xd9, 0xa8, 0x57, + 0xc0, 0xa5, 0xb4, 0x59, 0x76, 0x8c, 0x54, 0x1d, 0x79, 0xeb, + 0x22, 0x52, 0x04, 0x7e, 0xd3, 0x37, 0xeb, 0x41, 0xfd, 0x83, + 0xf9, 0xf0, 0xa6, 0x85, 0x15, 0x34, 0x75, 0x71, 0x5a, 0x84, + 0xa8, 0x3c, 0xd2, 0xef, 0x5a, 0x4e, 0xd3, 0xde, 0x97, 0x8a, + 0xdd, 0xff, 0xbb, 0xcf, 0x0a, 0xaa, 0x86, 0x92, 0xbe, 0xb8, + 0x50, 0xe4, 0xcd, 0x6f, 0x80, 0x33, 0x30, 0x76, 0x13, 0x8f, + 0xca, 0x7b, 0xdc, 0xec, 0x5a, 0xca, 0x63, 0xc7, 0x03, 0x25, + 0xef, 0xa8, 0x8a, 0x83, 0x58, 0x76, 0x20, 0xfa, 0x16, 0x77, + 0xd7, 0x79, 0x92, 0x63, 0x01, 0x48, 0x1a, 0xd8, 0x7b, 0x67, + 0xf1, 0x52, 0x55, 0x49, 0x4e, 0xd6, 0x6e, 0x4a, 0x5c, 0xd7, + 0x7a, 0x37, 0x36, 0x0c, 0xde, 0xdd, 0x8f, 0x44, 0xe8, 0xc2, + 0xa7, 0x2c, 0x2b, 0xb5, 0xaf, 0x64, 0x4b, 0x61, 0x07, 0x02, + 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x80, 0x74, 0x88, 0x64, + 0x3f, 0x69, 0x45, 0x3a, 0x6d, 0xc7, 0x7f, 0xb9, 0xa3, 0xc0, + 0x6e, 0xec, 0xdc, 0xd4, 0x5a, 0xb5, 0x32, 0x85, 0x5f, 0x19, + 0xd4, 0xf8, 0xd4, 0x3f, 0x3c, 0xfa, 0xc2, 0xf6, 0x5f, 0xee, + 0xe6, 0xba, 0x87, 0x74, 0x2e, 0xc7, 0x0c, 0xd4, 0x42, 0xb8, + 0x66, 0x85, 0x9c, 0x7b, 0x24, 0x61, 0xaa, 0x16, 0x11, 0xf6, + 0xb5, 0xb6, 0xa4, 0x0a, 0xc9, 0x55, 0x2e, 0x81, 0xa5, 0x47, + 0x61, 0xcb, 0x25, 0x8f, 0xc2, 0x15, 0x7b, 0x0e, 0x7c, 0x36, + 0x9f, 0x3a, 0xda, 0x58, 0x86, 0x1c, 0x5b, 0x83, 0x79, 0xe6, + 0x2b, 0xcc, 0xe6, 0xfa, 0x2c, 0x61, 0xf2, 0x78, 0x80, 0x1b, + 0xe2, 0xf3, 0x9d, 0x39, 0x2b, 0x65, 0x57, 0x91, 0x3d, 0x71, + 0x99, 0x73, 0xa5, 0xc2, 0x79, 0x20, 0x8c, 0x07, 0x4f, 0xe5, + 0xb4, 0x60, 0x1f, 0x99, 0xa2, 0xb1, 0x4f, 0x0c, 0xef, 0xbc, + 0x59, 0x53, 0x00, 0x7d, 0xb1, 0x02, 0x41, 0x00, 0xfc, 0x7e, + 0x23, 0x65, 0x70, 0xf8, 0xce, 0xd3, 0x40, 0x41, 0x80, 0x6a, + 0x1d, 0x01, 0xd6, 0x01, 0xff, 0xb6, 0x1b, 0x3d, 0x3d, 0x59, + 0x09, 0x33, 0x79, 0xc0, 0x4f, 0xde, 0x96, 0x27, 0x4b, 0x18, + 0xc6, 0xd9, 0x78, 0xf1, 0xf4, 0x35, 0x46, 0xe9, 0x7c, 0x42, + 0x7a, 0x5d, 0x9f, 0xef, 0x54, 0xb8, 0xf7, 0x9f, 0xc4, 0x33, + 0x6c, 0xf3, 0x8c, 0x32, 0x46, 0x87, 0x67, 0x30, 0x7b, 0xa7, + 0xac, 0xe3, 0x02, 0x41, 0x00, 0xfc, 0x2c, 0xdf, 0x0c, 0x0d, + 0x88, 0xf5, 0xb1, 0x92, 0xa8, 0x93, 0x47, 0x63, 0x55, 0xf5, + 0xca, 0x58, 0x43, 0xba, 0x1c, 0xe5, 0x9e, 0xb6, 0x95, 0x05, + 0xcd, 0xb5, 0x82, 0xdf, 0xeb, 0x04, 0x53, 0x9d, 0xbd, 0xc2, + 0x38, 0x16, 0xb3, 0x62, 0xdd, 0xa1, 0x46, 0xdb, 0x6d, 0x97, + 0x93, 0x9f, 0x8a, 0xc3, 0x9b, 0x64, 0x7e, 0x42, 0xe3, 0x32, + 0x57, 0x19, 0x1b, 0xd5, 0x6e, 0x85, 0xfa, 0xb8, 0x8d, 0x02, + 0x41, 0x00, 0xbc, 0x3d, 0xde, 0x6d, 0xd6, 0x97, 0xe8, 0xba, + 0x9e, 0x81, 0x37, 0x17, 0xe5, 0xa0, 0x64, 0xc9, 0x00, 0xb7, + 0xe7, 0xfe, 0xf4, 0x29, 0xd9, 0x2e, 0x43, 0x6b, 0x19, 0x20, + 0xbd, 0x99, 0x75, 0xe7, 0x76, 0xf8, 0xd3, 0xae, 0xaf, 0x7e, + 0xb8, 0xeb, 0x81, 0xf4, 0x9d, 0xfe, 0x07, 0x2b, 0x0b, 0x63, + 0x0b, 0x5a, 0x55, 0x90, 0x71, 0x7d, 0xf1, 0xdb, 0xd9, 0xb1, + 0x41, 0x41, 0x68, 0x2f, 0x4e, 0x39, 0x02, 0x40, 0x5a, 0x34, + 0x66, 0xd8, 0xf5, 0xe2, 0x7f, 0x18, 0xb5, 0x00, 0x6e, 0x26, + 0x84, 0x27, 0x14, 0x93, 0xfb, 0xfc, 0xc6, 0x0f, 0x5e, 0x27, + 0xe6, 0xe1, 0xe9, 0xc0, 0x8a, 0xe4, 0x34, 0xda, 0xe9, 0xa2, + 0x4b, 0x73, 0xbc, 0x8c, 0xb9, 0xba, 0x13, 0x6c, 0x7a, 0x2b, + 0x51, 0x84, 0xa3, 0x4a, 0xe0, 0x30, 0x10, 0x06, 0x7e, 0xed, + 0x17, 0x5a, 0x14, 0x00, 0xc9, 0xef, 0x85, 0xea, 0x52, 0x2c, + 0xbc, 0x65, 0x02, 0x40, 0x51, 0xe3, 0xf2, 0x83, 0x19, 0x9b, + 0xc4, 0x1e, 0x2f, 0x50, 0x3d, 0xdf, 0x5a, 0xa2, 0x18, 0xca, + 0x5f, 0x2e, 0x49, 0xaf, 0x6f, 0xcc, 0xfa, 0x65, 0x77, 0x94, + 0xb5, 0xa1, 0x0a, 0xa9, 0xd1, 0x8a, 0x39, 0x37, 0xf4, 0x0b, + 0xa0, 0xd7, 0x82, 0x27, 0x5e, 0xae, 0x17, 0x17, 0xa1, 0x1e, + 0x54, 0x34, 0xbf, 0x6e, 0xc4, 0x8e, 0x99, 0x5d, 0x08, 0xf1, + 0x2d, 0x86, 0x9d, 0xa5, 0x20, 0x1b, 0xe5, 0xdf }; /* @@ -651,640 +104,70 @@ static const unsigned char kExampleRSAKeyDER[] = { * PrivateKeyInfo. */ static const unsigned char kExampleRSAKeyPKCS8[] = { - 0x30, - 0x82, - 0x02, - 0x76, - 0x02, - 0x01, - 0x00, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x01, - 0x05, - 0x00, - 0x04, - 0x82, - 0x02, - 0x60, - 0x30, - 0x82, - 0x02, - 0x5c, - 0x02, - 0x01, - 0x00, - 0x02, - 0x81, - 0x81, - 0x00, - 0xf8, - 0xb8, - 0x6c, - 0x83, - 0xb4, - 0xbc, - 0xd9, - 0xa8, - 0x57, - 0xc0, - 0xa5, - 0xb4, - 0x59, - 0x76, - 0x8c, - 0x54, - 0x1d, - 0x79, - 0xeb, - 0x22, - 0x52, - 0x04, - 0x7e, - 0xd3, - 0x37, - 0xeb, - 0x41, - 0xfd, - 0x83, - 0xf9, - 0xf0, - 0xa6, - 0x85, - 0x15, - 0x34, - 0x75, - 0x71, - 0x5a, - 0x84, - 0xa8, - 0x3c, - 0xd2, - 0xef, - 0x5a, - 0x4e, - 0xd3, - 0xde, - 0x97, - 0x8a, - 0xdd, - 0xff, - 0xbb, - 0xcf, - 0x0a, - 0xaa, - 0x86, - 0x92, - 0xbe, - 0xb8, - 0x50, - 0xe4, - 0xcd, - 0x6f, - 0x80, - 0x33, - 0x30, - 0x76, - 0x13, - 0x8f, - 0xca, - 0x7b, - 0xdc, - 0xec, - 0x5a, - 0xca, - 0x63, - 0xc7, - 0x03, - 0x25, - 0xef, - 0xa8, - 0x8a, - 0x83, - 0x58, - 0x76, - 0x20, - 0xfa, - 0x16, - 0x77, - 0xd7, - 0x79, - 0x92, - 0x63, - 0x01, - 0x48, - 0x1a, - 0xd8, - 0x7b, - 0x67, - 0xf1, - 0x52, - 0x55, - 0x49, - 0x4e, - 0xd6, - 0x6e, - 0x4a, - 0x5c, - 0xd7, - 0x7a, - 0x37, - 0x36, - 0x0c, - 0xde, - 0xdd, - 0x8f, - 0x44, - 0xe8, - 0xc2, - 0xa7, - 0x2c, - 0x2b, - 0xb5, - 0xaf, - 0x64, - 0x4b, - 0x61, - 0x07, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x81, - 0x80, - 0x74, - 0x88, - 0x64, - 0x3f, - 0x69, - 0x45, - 0x3a, - 0x6d, - 0xc7, - 0x7f, - 0xb9, - 0xa3, - 0xc0, - 0x6e, - 0xec, - 0xdc, - 0xd4, - 0x5a, - 0xb5, - 0x32, - 0x85, - 0x5f, - 0x19, - 0xd4, - 0xf8, - 0xd4, - 0x3f, - 0x3c, - 0xfa, - 0xc2, - 0xf6, - 0x5f, - 0xee, - 0xe6, - 0xba, - 0x87, - 0x74, - 0x2e, - 0xc7, - 0x0c, - 0xd4, - 0x42, - 0xb8, - 0x66, - 0x85, - 0x9c, - 0x7b, - 0x24, - 0x61, - 0xaa, - 0x16, - 0x11, - 0xf6, - 0xb5, - 0xb6, - 0xa4, - 0x0a, - 0xc9, - 0x55, - 0x2e, - 0x81, - 0xa5, - 0x47, - 0x61, - 0xcb, - 0x25, - 0x8f, - 0xc2, - 0x15, - 0x7b, - 0x0e, - 0x7c, - 0x36, - 0x9f, - 0x3a, - 0xda, - 0x58, - 0x86, - 0x1c, - 0x5b, - 0x83, - 0x79, - 0xe6, - 0x2b, - 0xcc, - 0xe6, - 0xfa, - 0x2c, - 0x61, - 0xf2, - 0x78, - 0x80, - 0x1b, - 0xe2, - 0xf3, - 0x9d, - 0x39, - 0x2b, - 0x65, - 0x57, - 0x91, - 0x3d, - 0x71, - 0x99, - 0x73, - 0xa5, - 0xc2, - 0x79, - 0x20, - 0x8c, - 0x07, - 0x4f, - 0xe5, - 0xb4, - 0x60, - 0x1f, - 0x99, - 0xa2, - 0xb1, - 0x4f, - 0x0c, - 0xef, - 0xbc, - 0x59, - 0x53, - 0x00, - 0x7d, - 0xb1, - 0x02, - 0x41, - 0x00, - 0xfc, - 0x7e, - 0x23, - 0x65, - 0x70, - 0xf8, - 0xce, - 0xd3, - 0x40, - 0x41, - 0x80, - 0x6a, - 0x1d, - 0x01, - 0xd6, - 0x01, - 0xff, - 0xb6, - 0x1b, - 0x3d, - 0x3d, - 0x59, - 0x09, - 0x33, - 0x79, - 0xc0, - 0x4f, - 0xde, - 0x96, - 0x27, - 0x4b, - 0x18, - 0xc6, - 0xd9, - 0x78, - 0xf1, - 0xf4, - 0x35, - 0x46, - 0xe9, - 0x7c, - 0x42, - 0x7a, - 0x5d, - 0x9f, - 0xef, - 0x54, - 0xb8, - 0xf7, - 0x9f, - 0xc4, - 0x33, - 0x6c, - 0xf3, - 0x8c, - 0x32, - 0x46, - 0x87, - 0x67, - 0x30, - 0x7b, - 0xa7, - 0xac, - 0xe3, - 0x02, - 0x41, - 0x00, - 0xfc, - 0x2c, - 0xdf, - 0x0c, - 0x0d, - 0x88, - 0xf5, - 0xb1, - 0x92, - 0xa8, - 0x93, - 0x47, - 0x63, - 0x55, - 0xf5, - 0xca, - 0x58, - 0x43, - 0xba, - 0x1c, - 0xe5, - 0x9e, - 0xb6, - 0x95, - 0x05, - 0xcd, - 0xb5, - 0x82, - 0xdf, - 0xeb, - 0x04, - 0x53, - 0x9d, - 0xbd, - 0xc2, - 0x38, - 0x16, - 0xb3, - 0x62, - 0xdd, - 0xa1, - 0x46, - 0xdb, - 0x6d, - 0x97, - 0x93, - 0x9f, - 0x8a, - 0xc3, - 0x9b, - 0x64, - 0x7e, - 0x42, - 0xe3, - 0x32, - 0x57, - 0x19, - 0x1b, - 0xd5, - 0x6e, - 0x85, - 0xfa, - 0xb8, - 0x8d, - 0x02, - 0x41, - 0x00, - 0xbc, - 0x3d, - 0xde, - 0x6d, - 0xd6, - 0x97, - 0xe8, - 0xba, - 0x9e, - 0x81, - 0x37, - 0x17, - 0xe5, - 0xa0, - 0x64, - 0xc9, - 0x00, - 0xb7, - 0xe7, - 0xfe, - 0xf4, - 0x29, - 0xd9, - 0x2e, - 0x43, - 0x6b, - 0x19, - 0x20, - 0xbd, - 0x99, - 0x75, - 0xe7, - 0x76, - 0xf8, - 0xd3, - 0xae, - 0xaf, - 0x7e, - 0xb8, - 0xeb, - 0x81, - 0xf4, - 0x9d, - 0xfe, - 0x07, - 0x2b, - 0x0b, - 0x63, - 0x0b, - 0x5a, - 0x55, - 0x90, - 0x71, - 0x7d, - 0xf1, - 0xdb, - 0xd9, - 0xb1, - 0x41, - 0x41, - 0x68, - 0x2f, - 0x4e, - 0x39, - 0x02, - 0x40, - 0x5a, - 0x34, - 0x66, - 0xd8, - 0xf5, - 0xe2, - 0x7f, - 0x18, - 0xb5, - 0x00, - 0x6e, - 0x26, - 0x84, - 0x27, - 0x14, - 0x93, - 0xfb, - 0xfc, - 0xc6, - 0x0f, - 0x5e, - 0x27, - 0xe6, - 0xe1, - 0xe9, - 0xc0, - 0x8a, - 0xe4, - 0x34, - 0xda, - 0xe9, - 0xa2, - 0x4b, - 0x73, - 0xbc, - 0x8c, - 0xb9, - 0xba, - 0x13, - 0x6c, - 0x7a, - 0x2b, - 0x51, - 0x84, - 0xa3, - 0x4a, - 0xe0, - 0x30, - 0x10, - 0x06, - 0x7e, - 0xed, - 0x17, - 0x5a, - 0x14, - 0x00, - 0xc9, - 0xef, - 0x85, - 0xea, - 0x52, - 0x2c, - 0xbc, - 0x65, - 0x02, - 0x40, - 0x51, - 0xe3, - 0xf2, - 0x83, - 0x19, - 0x9b, - 0xc4, - 0x1e, - 0x2f, - 0x50, - 0x3d, - 0xdf, - 0x5a, - 0xa2, - 0x18, - 0xca, - 0x5f, - 0x2e, - 0x49, - 0xaf, - 0x6f, - 0xcc, - 0xfa, - 0x65, - 0x77, - 0x94, - 0xb5, - 0xa1, - 0x0a, - 0xa9, - 0xd1, - 0x8a, - 0x39, - 0x37, - 0xf4, - 0x0b, - 0xa0, - 0xd7, - 0x82, - 0x27, - 0x5e, - 0xae, - 0x17, - 0x17, - 0xa1, - 0x1e, - 0x54, - 0x34, - 0xbf, - 0x6e, - 0xc4, - 0x8e, - 0x99, - 0x5d, - 0x08, - 0xf1, - 0x2d, - 0x86, - 0x9d, - 0xa5, - 0x20, - 0x1b, - 0xe5, - 0xdf, + 0x30, 0x82, 0x02, 0x76, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06, + 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, + 0x05, 0x00, 0x04, 0x82, 0x02, 0x60, 0x30, 0x82, 0x02, 0x5c, + 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0xf8, 0xb8, 0x6c, + 0x83, 0xb4, 0xbc, 0xd9, 0xa8, 0x57, 0xc0, 0xa5, 0xb4, 0x59, + 0x76, 0x8c, 0x54, 0x1d, 0x79, 0xeb, 0x22, 0x52, 0x04, 0x7e, + 0xd3, 0x37, 0xeb, 0x41, 0xfd, 0x83, 0xf9, 0xf0, 0xa6, 0x85, + 0x15, 0x34, 0x75, 0x71, 0x5a, 0x84, 0xa8, 0x3c, 0xd2, 0xef, + 0x5a, 0x4e, 0xd3, 0xde, 0x97, 0x8a, 0xdd, 0xff, 0xbb, 0xcf, + 0x0a, 0xaa, 0x86, 0x92, 0xbe, 0xb8, 0x50, 0xe4, 0xcd, 0x6f, + 0x80, 0x33, 0x30, 0x76, 0x13, 0x8f, 0xca, 0x7b, 0xdc, 0xec, + 0x5a, 0xca, 0x63, 0xc7, 0x03, 0x25, 0xef, 0xa8, 0x8a, 0x83, + 0x58, 0x76, 0x20, 0xfa, 0x16, 0x77, 0xd7, 0x79, 0x92, 0x63, + 0x01, 0x48, 0x1a, 0xd8, 0x7b, 0x67, 0xf1, 0x52, 0x55, 0x49, + 0x4e, 0xd6, 0x6e, 0x4a, 0x5c, 0xd7, 0x7a, 0x37, 0x36, 0x0c, + 0xde, 0xdd, 0x8f, 0x44, 0xe8, 0xc2, 0xa7, 0x2c, 0x2b, 0xb5, + 0xaf, 0x64, 0x4b, 0x61, 0x07, 0x02, 0x03, 0x01, 0x00, 0x01, + 0x02, 0x81, 0x80, 0x74, 0x88, 0x64, 0x3f, 0x69, 0x45, 0x3a, + 0x6d, 0xc7, 0x7f, 0xb9, 0xa3, 0xc0, 0x6e, 0xec, 0xdc, 0xd4, + 0x5a, 0xb5, 0x32, 0x85, 0x5f, 0x19, 0xd4, 0xf8, 0xd4, 0x3f, + 0x3c, 0xfa, 0xc2, 0xf6, 0x5f, 0xee, 0xe6, 0xba, 0x87, 0x74, + 0x2e, 0xc7, 0x0c, 0xd4, 0x42, 0xb8, 0x66, 0x85, 0x9c, 0x7b, + 0x24, 0x61, 0xaa, 0x16, 0x11, 0xf6, 0xb5, 0xb6, 0xa4, 0x0a, + 0xc9, 0x55, 0x2e, 0x81, 0xa5, 0x47, 0x61, 0xcb, 0x25, 0x8f, + 0xc2, 0x15, 0x7b, 0x0e, 0x7c, 0x36, 0x9f, 0x3a, 0xda, 0x58, + 0x86, 0x1c, 0x5b, 0x83, 0x79, 0xe6, 0x2b, 0xcc, 0xe6, 0xfa, + 0x2c, 0x61, 0xf2, 0x78, 0x80, 0x1b, 0xe2, 0xf3, 0x9d, 0x39, + 0x2b, 0x65, 0x57, 0x91, 0x3d, 0x71, 0x99, 0x73, 0xa5, 0xc2, + 0x79, 0x20, 0x8c, 0x07, 0x4f, 0xe5, 0xb4, 0x60, 0x1f, 0x99, + 0xa2, 0xb1, 0x4f, 0x0c, 0xef, 0xbc, 0x59, 0x53, 0x00, 0x7d, + 0xb1, 0x02, 0x41, 0x00, 0xfc, 0x7e, 0x23, 0x65, 0x70, 0xf8, + 0xce, 0xd3, 0x40, 0x41, 0x80, 0x6a, 0x1d, 0x01, 0xd6, 0x01, + 0xff, 0xb6, 0x1b, 0x3d, 0x3d, 0x59, 0x09, 0x33, 0x79, 0xc0, + 0x4f, 0xde, 0x96, 0x27, 0x4b, 0x18, 0xc6, 0xd9, 0x78, 0xf1, + 0xf4, 0x35, 0x46, 0xe9, 0x7c, 0x42, 0x7a, 0x5d, 0x9f, 0xef, + 0x54, 0xb8, 0xf7, 0x9f, 0xc4, 0x33, 0x6c, 0xf3, 0x8c, 0x32, + 0x46, 0x87, 0x67, 0x30, 0x7b, 0xa7, 0xac, 0xe3, 0x02, 0x41, + 0x00, 0xfc, 0x2c, 0xdf, 0x0c, 0x0d, 0x88, 0xf5, 0xb1, 0x92, + 0xa8, 0x93, 0x47, 0x63, 0x55, 0xf5, 0xca, 0x58, 0x43, 0xba, + 0x1c, 0xe5, 0x9e, 0xb6, 0x95, 0x05, 0xcd, 0xb5, 0x82, 0xdf, + 0xeb, 0x04, 0x53, 0x9d, 0xbd, 0xc2, 0x38, 0x16, 0xb3, 0x62, + 0xdd, 0xa1, 0x46, 0xdb, 0x6d, 0x97, 0x93, 0x9f, 0x8a, 0xc3, + 0x9b, 0x64, 0x7e, 0x42, 0xe3, 0x32, 0x57, 0x19, 0x1b, 0xd5, + 0x6e, 0x85, 0xfa, 0xb8, 0x8d, 0x02, 0x41, 0x00, 0xbc, 0x3d, + 0xde, 0x6d, 0xd6, 0x97, 0xe8, 0xba, 0x9e, 0x81, 0x37, 0x17, + 0xe5, 0xa0, 0x64, 0xc9, 0x00, 0xb7, 0xe7, 0xfe, 0xf4, 0x29, + 0xd9, 0x2e, 0x43, 0x6b, 0x19, 0x20, 0xbd, 0x99, 0x75, 0xe7, + 0x76, 0xf8, 0xd3, 0xae, 0xaf, 0x7e, 0xb8, 0xeb, 0x81, 0xf4, + 0x9d, 0xfe, 0x07, 0x2b, 0x0b, 0x63, 0x0b, 0x5a, 0x55, 0x90, + 0x71, 0x7d, 0xf1, 0xdb, 0xd9, 0xb1, 0x41, 0x41, 0x68, 0x2f, + 0x4e, 0x39, 0x02, 0x40, 0x5a, 0x34, 0x66, 0xd8, 0xf5, 0xe2, + 0x7f, 0x18, 0xb5, 0x00, 0x6e, 0x26, 0x84, 0x27, 0x14, 0x93, + 0xfb, 0xfc, 0xc6, 0x0f, 0x5e, 0x27, 0xe6, 0xe1, 0xe9, 0xc0, + 0x8a, 0xe4, 0x34, 0xda, 0xe9, 0xa2, 0x4b, 0x73, 0xbc, 0x8c, + 0xb9, 0xba, 0x13, 0x6c, 0x7a, 0x2b, 0x51, 0x84, 0xa3, 0x4a, + 0xe0, 0x30, 0x10, 0x06, 0x7e, 0xed, 0x17, 0x5a, 0x14, 0x00, + 0xc9, 0xef, 0x85, 0xea, 0x52, 0x2c, 0xbc, 0x65, 0x02, 0x40, + 0x51, 0xe3, 0xf2, 0x83, 0x19, 0x9b, 0xc4, 0x1e, 0x2f, 0x50, + 0x3d, 0xdf, 0x5a, 0xa2, 0x18, 0xca, 0x5f, 0x2e, 0x49, 0xaf, + 0x6f, 0xcc, 0xfa, 0x65, 0x77, 0x94, 0xb5, 0xa1, 0x0a, 0xa9, + 0xd1, 0x8a, 0x39, 0x37, 0xf4, 0x0b, 0xa0, 0xd7, 0x82, 0x27, + 0x5e, 0xae, 0x17, 0x17, 0xa1, 0x1e, 0x54, 0x34, 0xbf, 0x6e, + 0xc4, 0x8e, 0x99, 0x5d, 0x08, 0xf1, 0x2d, 0x86, 0x9d, 0xa5, + 0x20, 0x1b, 0xe5, 0xdf }; #ifndef OPENSSL_NO_DH @@ -1345,127 +228,19 @@ static const unsigned char kExampleDHPrivateKeyDER[] = { * structure. */ static const unsigned char kExampleECKeyDER[] = { - 0x30, - 0x77, - 0x02, - 0x01, - 0x01, - 0x04, - 0x20, - 0x07, - 0x0f, - 0x08, - 0x72, - 0x7a, - 0xd4, - 0xa0, - 0x4a, - 0x9c, - 0xdd, - 0x59, - 0xc9, - 0x4d, - 0x89, - 0x68, - 0x77, - 0x08, - 0xb5, - 0x6f, - 0xc9, - 0x5d, - 0x30, - 0x77, - 0x0e, - 0xe8, - 0xd1, - 0xc9, - 0xce, - 0x0a, - 0x8b, - 0xb4, - 0x6a, - 0xa0, - 0x0a, - 0x06, - 0x08, - 0x2a, - 0x86, - 0x48, - 0xce, - 0x3d, - 0x03, - 0x01, - 0x07, - 0xa1, - 0x44, - 0x03, - 0x42, - 0x00, - 0x04, - 0xe6, - 0x2b, - 0x69, - 0xe2, - 0xbf, - 0x65, - 0x9f, - 0x97, - 0xbe, - 0x2f, - 0x1e, - 0x0d, - 0x94, - 0x8a, - 0x4c, - 0xd5, - 0x97, - 0x6b, - 0xb7, - 0xa9, - 0x1e, - 0x0d, - 0x46, - 0xfb, - 0xdd, - 0xa9, - 0xa9, - 0x1e, - 0x9d, - 0xdc, - 0xba, - 0x5a, - 0x01, - 0xe7, - 0xd6, - 0x97, - 0xa8, - 0x0a, - 0x18, - 0xf9, - 0xc3, - 0xc4, - 0xa3, - 0x1e, - 0x56, - 0xe2, - 0x7c, - 0x83, - 0x48, - 0xdb, - 0x16, - 0x1a, - 0x1c, - 0xf5, - 0x1d, - 0x7e, - 0xf1, - 0x94, - 0x2d, - 0x4b, - 0xcf, - 0x72, - 0x22, - 0xc1, + 0x30, 0x77, 0x02, 0x01, 0x01, 0x04, 0x20, 0x07, 0x0f, 0x08, + 0x72, 0x7a, 0xd4, 0xa0, 0x4a, 0x9c, 0xdd, 0x59, 0xc9, 0x4d, + 0x89, 0x68, 0x77, 0x08, 0xb5, 0x6f, 0xc9, 0x5d, 0x30, 0x77, + 0x0e, 0xe8, 0xd1, 0xc9, 0xce, 0x0a, 0x8b, 0xb4, 0x6a, 0xa0, + 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, + 0x07, 0xa1, 0x44, 0x03, 0x42, 0x00, 0x04, 0xe6, 0x2b, 0x69, + 0xe2, 0xbf, 0x65, 0x9f, 0x97, 0xbe, 0x2f, 0x1e, 0x0d, 0x94, + 0x8a, 0x4c, 0xd5, 0x97, 0x6b, 0xb7, 0xa9, 0x1e, 0x0d, 0x46, + 0xfb, 0xdd, 0xa9, 0xa9, 0x1e, 0x9d, 0xdc, 0xba, 0x5a, 0x01, + 0xe7, 0xd6, 0x97, 0xa8, 0x0a, 0x18, 0xf9, 0xc3, 0xc4, 0xa3, + 0x1e, 0x56, 0xe2, 0x7c, 0x83, 0x48, 0xdb, 0x16, 0x1a, 0x1c, + 0xf5, 0x1d, 0x7e, 0xf1, 0x94, 0x2d, 0x4b, 0xcf, 0x72, 0x22, + 0xc1 }; /* P-384 sample EC private key in PKCS8 format (no public key) */ @@ -1996,856 +771,91 @@ static int do_fromdata_key_is_equal(const OSSL_PARAM params[], * -paramfile dsa_param.pem -pkeyopt type:fips186_4 -out dsa_priv.pem */ static const unsigned char dsa_key[] = { - 0x30, - 0x82, - 0x03, - 0x4e, - 0x02, - 0x01, - 0x00, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0xda, - 0xb3, - 0x46, - 0x4d, - 0x54, - 0x57, - 0xc7, - 0xb4, - 0x61, - 0xa0, - 0x6f, - 0x66, - 0x17, - 0xda, - 0xeb, - 0x90, - 0xf0, - 0xa3, - 0xd1, - 0x29, - 0xc9, - 0x5f, - 0xf2, - 0x21, - 0x3d, - 0x85, - 0xa3, - 0x4a, - 0xf0, - 0xf8, - 0x36, - 0x39, - 0x1b, - 0xe3, - 0xee, - 0x37, - 0x70, - 0x06, - 0x9b, - 0xe8, - 0xe3, - 0x0a, - 0xd2, - 0xf1, - 0xf6, - 0xc4, - 0x42, - 0x23, - 0x1f, - 0x74, - 0x78, - 0xc2, - 0x16, - 0xf5, - 0xce, - 0xd6, - 0xab, - 0xa0, - 0xc6, - 0xe8, - 0x99, - 0x3d, - 0xf8, - 0x8b, - 0xfb, - 0x47, - 0xf8, - 0x5e, - 0x05, - 0x68, - 0x6d, - 0x8b, - 0xa8, - 0xad, - 0xa1, - 0xc2, - 0x3a, - 0x4e, - 0xe0, - 0xad, - 0xec, - 0x38, - 0x75, - 0x21, - 0x55, - 0x22, - 0xce, - 0xa2, - 0xe9, - 0xe5, - 0x3b, - 0xd7, - 0x44, - 0xeb, - 0x5a, - 0x03, - 0x59, - 0xa0, - 0xc5, - 0x7a, - 0x92, - 0x59, - 0x7d, - 0x7a, - 0x07, - 0x80, - 0xfc, - 0x4e, - 0xf8, - 0x56, - 0x7e, - 0xf1, - 0x06, - 0xe0, - 0xba, - 0xb2, - 0xe7, - 0x5b, - 0x22, - 0x55, - 0xee, - 0x4b, - 0x42, - 0x61, - 0x67, - 0x2c, - 0x43, - 0x9a, - 0x38, - 0x2b, - 0x17, - 0xc2, - 0x62, - 0x12, - 0x8b, - 0x0b, - 0x22, - 0x8c, - 0x0c, - 0x1c, - 0x1c, - 0x92, - 0xb1, - 0xec, - 0x70, - 0xce, - 0x0f, - 0x8c, - 0xff, - 0x8d, - 0x21, - 0xf9, - 0x19, - 0x68, - 0x4d, - 0x32, - 0x59, - 0x78, - 0x42, - 0x1d, - 0x0c, - 0xc5, - 0x1a, - 0xcb, - 0x28, - 0xe2, - 0xc1, - 0x1a, - 0x35, - 0xf1, - 0x42, - 0x0a, - 0x19, - 0x39, - 0xfa, - 0x83, - 0xd1, - 0xb4, - 0xaa, - 0x69, - 0x0f, - 0xc2, - 0x8e, - 0xf9, - 0x59, - 0x2c, - 0xee, - 0x11, - 0xfc, - 0x3e, - 0x4b, - 0x44, - 0xfb, - 0x9a, - 0x32, - 0xc8, - 0x78, - 0x23, - 0x56, - 0x85, - 0x49, - 0x21, - 0x43, - 0x12, - 0x79, - 0xbd, - 0xa0, - 0x70, - 0x47, - 0x2f, - 0xae, - 0xb6, - 0xd7, - 0x6c, - 0xc6, - 0x07, - 0x76, - 0xa9, - 0x8a, - 0xa2, - 0x16, - 0x02, - 0x89, - 0x1f, - 0x1a, - 0xd1, - 0xa2, - 0x96, - 0x56, - 0xd1, - 0x1f, - 0x10, - 0xe1, - 0xe5, - 0x9f, - 0x3f, - 0xdd, - 0x09, - 0x0c, - 0x40, - 0x90, - 0x71, - 0xef, - 0x14, - 0x41, - 0x02, - 0x82, - 0x3a, - 0x6b, - 0xe1, - 0xf8, - 0x2c, - 0x5d, - 0xbe, - 0xfd, - 0x1b, - 0x02, - 0x1d, - 0x00, - 0xe0, - 0x20, - 0xe0, - 0x7c, - 0x02, - 0x16, - 0xa7, - 0x6c, - 0x6a, - 0x19, - 0xba, - 0xd5, - 0x83, - 0x73, - 0xf3, - 0x7d, - 0x31, - 0xef, - 0xa7, - 0xe1, - 0x5d, - 0x5b, - 0x7f, - 0xf3, - 0xfc, - 0xda, - 0x84, - 0x31, - 0x02, - 0x82, - 0x01, - 0x01, - 0x00, - 0x83, - 0xdb, - 0xa1, - 0xbc, - 0x3e, - 0xc7, - 0x29, - 0xa5, - 0x6a, - 0x5c, - 0x2c, - 0xe8, - 0x7a, - 0x8c, - 0x7e, - 0xe8, - 0xb8, - 0x3e, - 0x13, - 0x47, - 0xcd, - 0x36, - 0x7e, - 0x79, - 0x30, - 0x7a, - 0x28, - 0x03, - 0xd3, - 0xd4, - 0xd2, - 0xe3, - 0xee, - 0x3b, - 0x46, - 0xda, - 0xe0, - 0x71, - 0xe6, - 0xcf, - 0x46, - 0x86, - 0x0a, - 0x37, - 0x57, - 0xb6, - 0xe9, - 0xcf, - 0xa1, - 0x78, - 0x19, - 0xb8, - 0x72, - 0x9f, - 0x30, - 0x8c, - 0x2a, - 0x04, - 0x7c, - 0x2f, - 0x0c, - 0x27, - 0xa7, - 0xb3, - 0x23, - 0xe0, - 0x46, - 0xf2, - 0x75, - 0x0c, - 0x03, - 0x4c, - 0xad, - 0xfb, - 0xc1, - 0xcb, - 0x28, - 0xcd, - 0xa0, - 0x63, - 0xdb, - 0x44, - 0x88, - 0xe0, - 0xda, - 0x6c, - 0x5b, - 0x89, - 0xb2, - 0x5b, - 0x40, - 0x6d, - 0xeb, - 0x78, - 0x7a, - 0xd5, - 0xaf, - 0x40, - 0x52, - 0x46, - 0x63, - 0x92, - 0x13, - 0x0d, - 0xee, - 0xee, - 0xf9, - 0x53, - 0xca, - 0x2d, - 0x4e, - 0x3b, - 0x13, - 0xd8, - 0x0f, - 0x50, - 0xd0, - 0x44, - 0x57, - 0x67, - 0x0f, - 0x45, - 0x8f, - 0x21, - 0x30, - 0x97, - 0x9e, - 0x80, - 0xd9, - 0xd0, - 0x91, - 0xb7, - 0xc9, - 0x5a, - 0x69, - 0xda, - 0xeb, - 0xd5, - 0xea, - 0x37, - 0xf6, - 0xb3, - 0xbe, - 0x1f, - 0x24, - 0xf1, - 0x55, - 0x14, - 0x28, - 0x05, - 0xb5, - 0xd8, - 0x84, - 0x0f, - 0x62, - 0x85, - 0xaa, - 0xec, - 0x77, - 0x64, - 0xfd, - 0x80, - 0x7c, - 0x41, - 0x00, - 0x88, - 0xa3, - 0x79, - 0x7d, - 0x4f, - 0x6f, - 0xe3, - 0x76, - 0xf4, - 0xb5, - 0x97, - 0xb7, - 0xeb, - 0x67, - 0x28, - 0xba, - 0x07, - 0x1a, - 0x59, - 0x32, - 0xc1, - 0x53, - 0xd9, - 0x05, - 0x6b, - 0x63, - 0x93, - 0xce, - 0xa1, - 0xd9, - 0x7a, - 0xb2, - 0xff, - 0x1c, - 0x12, - 0x0a, - 0x9a, - 0xe5, - 0x51, - 0x1e, - 0xba, - 0xfc, - 0x95, - 0x2e, - 0x28, - 0xa9, - 0xfc, - 0x4c, - 0xed, - 0x7b, - 0x05, - 0xca, - 0x67, - 0xe0, - 0x2d, - 0xd7, - 0x54, - 0xb3, - 0x05, - 0x1c, - 0x23, - 0x2b, - 0x35, - 0x2e, - 0x19, - 0x48, - 0x59, - 0x0e, - 0x58, - 0xa8, - 0x01, - 0x56, - 0xfb, - 0x78, - 0x90, - 0xba, - 0x08, - 0x77, - 0x94, - 0x45, - 0x05, - 0x13, - 0xc7, - 0x6b, - 0x96, - 0xd2, - 0xa3, - 0xa6, - 0x01, - 0x9f, - 0x34, - 0x02, - 0x82, - 0x01, - 0x00, - 0x16, - 0x1a, - 0xb4, - 0x6d, - 0x9f, - 0x16, - 0x6c, - 0xcc, - 0x91, - 0x66, - 0xfe, - 0x30, - 0xeb, - 0x8e, - 0x44, - 0xba, - 0x2b, - 0x7a, - 0xc9, - 0xa8, - 0x95, - 0xf2, - 0xa6, - 0x38, - 0xd8, - 0xaf, - 0x3e, - 0x91, - 0x68, - 0xe8, - 0x52, - 0xf3, - 0x97, - 0x37, - 0x70, - 0xf2, - 0x47, - 0xa3, - 0xf4, - 0x62, - 0x26, - 0xf5, - 0x3b, - 0x71, - 0x52, - 0x50, - 0x15, - 0x9c, - 0x6d, - 0xa6, - 0x6d, - 0x92, - 0x4c, - 0x48, - 0x76, - 0x31, - 0x54, - 0x48, - 0xa5, - 0x99, - 0x7a, - 0xd4, - 0x61, - 0xf7, - 0x21, - 0x44, - 0xe7, - 0xd8, - 0x82, - 0xc3, - 0x50, - 0xd3, - 0xd9, - 0xd4, - 0x66, - 0x20, - 0xab, - 0x70, - 0x4c, - 0x97, - 0x9b, - 0x8d, - 0xac, - 0x1f, - 0x78, - 0x27, - 0x1e, - 0x47, - 0xf8, - 0x3b, - 0xd1, - 0x55, - 0x73, - 0xf3, - 0xb4, - 0x8e, - 0x6d, - 0x45, - 0x40, - 0x54, - 0xc6, - 0xd8, - 0x95, - 0x15, - 0x27, - 0xb7, - 0x5f, - 0x65, - 0xaa, - 0xcb, - 0x24, - 0xc9, - 0x49, - 0x87, - 0x32, - 0xad, - 0xcb, - 0xf8, - 0x35, - 0x63, - 0x56, - 0x72, - 0x7c, - 0x4e, - 0x6c, - 0xad, - 0x5f, - 0x26, - 0x8c, - 0xd2, - 0x80, - 0x41, - 0xaf, - 0x88, - 0x23, - 0x20, - 0x03, - 0xa4, - 0xd5, - 0x3c, - 0x53, - 0x54, - 0xb0, - 0x3d, - 0xed, - 0x0e, - 0x9e, - 0x53, - 0x0a, - 0x63, - 0x5f, - 0xfd, - 0x28, - 0x57, - 0x09, - 0x07, - 0x73, - 0xf4, - 0x0c, - 0xd4, - 0x71, - 0x5d, - 0x6b, - 0xa0, - 0xd7, - 0x86, - 0x99, - 0x29, - 0x9b, - 0xca, - 0xfb, - 0xcc, - 0xd6, - 0x2f, - 0xfe, - 0xbe, - 0x94, - 0xef, - 0x1a, - 0x0e, - 0x55, - 0x84, - 0xa7, - 0xaf, - 0x7b, - 0xfa, - 0xed, - 0x77, - 0x61, - 0x28, - 0x22, - 0xee, - 0x6b, - 0x11, - 0xdd, - 0xb0, - 0x17, - 0x1e, - 0x06, - 0xe4, - 0x29, - 0x4c, - 0xc2, - 0x3f, - 0xd6, - 0x75, - 0xb6, - 0x08, - 0x04, - 0x55, - 0x13, - 0x48, - 0x4f, - 0x44, - 0xea, - 0x8d, - 0xaf, - 0xcb, - 0xac, - 0x22, - 0xc4, - 0x6a, - 0xb3, - 0x86, - 0xe5, - 0x47, - 0xa9, - 0xb5, - 0x72, - 0x17, - 0x23, - 0x11, - 0x81, - 0x7f, - 0x00, - 0x00, - 0x67, - 0x5c, - 0xf4, - 0x58, - 0xcc, - 0xe2, - 0x46, - 0xce, - 0xf5, - 0x6d, - 0xd8, - 0x18, - 0x91, - 0xc4, - 0x20, - 0xbf, - 0x07, - 0x48, - 0x45, - 0xfd, - 0x02, - 0x1c, - 0x2f, - 0x68, - 0x44, - 0xcb, - 0xfb, - 0x6b, - 0xcb, - 0x8d, - 0x02, - 0x49, - 0x7c, - 0xee, - 0xd2, - 0xa6, - 0xd3, - 0x43, - 0xb8, - 0xa4, - 0x09, - 0xb7, - 0xc1, - 0xd4, - 0x4b, - 0xc3, - 0x66, - 0xa7, - 0xe0, - 0x21, + 0x30, 0x82, 0x03, 0x4e, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, + 0x01, 0x00, 0xda, 0xb3, 0x46, 0x4d, 0x54, 0x57, 0xc7, 0xb4, + 0x61, 0xa0, 0x6f, 0x66, 0x17, 0xda, 0xeb, 0x90, 0xf0, 0xa3, + 0xd1, 0x29, 0xc9, 0x5f, 0xf2, 0x21, 0x3d, 0x85, 0xa3, 0x4a, + 0xf0, 0xf8, 0x36, 0x39, 0x1b, 0xe3, 0xee, 0x37, 0x70, 0x06, + 0x9b, 0xe8, 0xe3, 0x0a, 0xd2, 0xf1, 0xf6, 0xc4, 0x42, 0x23, + 0x1f, 0x74, 0x78, 0xc2, 0x16, 0xf5, 0xce, 0xd6, 0xab, 0xa0, + 0xc6, 0xe8, 0x99, 0x3d, 0xf8, 0x8b, 0xfb, 0x47, 0xf8, 0x5e, + 0x05, 0x68, 0x6d, 0x8b, 0xa8, 0xad, 0xa1, 0xc2, 0x3a, 0x4e, + 0xe0, 0xad, 0xec, 0x38, 0x75, 0x21, 0x55, 0x22, 0xce, 0xa2, + 0xe9, 0xe5, 0x3b, 0xd7, 0x44, 0xeb, 0x5a, 0x03, 0x59, 0xa0, + 0xc5, 0x7a, 0x92, 0x59, 0x7d, 0x7a, 0x07, 0x80, 0xfc, 0x4e, + 0xf8, 0x56, 0x7e, 0xf1, 0x06, 0xe0, 0xba, 0xb2, 0xe7, 0x5b, + 0x22, 0x55, 0xee, 0x4b, 0x42, 0x61, 0x67, 0x2c, 0x43, 0x9a, + 0x38, 0x2b, 0x17, 0xc2, 0x62, 0x12, 0x8b, 0x0b, 0x22, 0x8c, + 0x0c, 0x1c, 0x1c, 0x92, 0xb1, 0xec, 0x70, 0xce, 0x0f, 0x8c, + 0xff, 0x8d, 0x21, 0xf9, 0x19, 0x68, 0x4d, 0x32, 0x59, 0x78, + 0x42, 0x1d, 0x0c, 0xc5, 0x1a, 0xcb, 0x28, 0xe2, 0xc1, 0x1a, + 0x35, 0xf1, 0x42, 0x0a, 0x19, 0x39, 0xfa, 0x83, 0xd1, 0xb4, + 0xaa, 0x69, 0x0f, 0xc2, 0x8e, 0xf9, 0x59, 0x2c, 0xee, 0x11, + 0xfc, 0x3e, 0x4b, 0x44, 0xfb, 0x9a, 0x32, 0xc8, 0x78, 0x23, + 0x56, 0x85, 0x49, 0x21, 0x43, 0x12, 0x79, 0xbd, 0xa0, 0x70, + 0x47, 0x2f, 0xae, 0xb6, 0xd7, 0x6c, 0xc6, 0x07, 0x76, 0xa9, + 0x8a, 0xa2, 0x16, 0x02, 0x89, 0x1f, 0x1a, 0xd1, 0xa2, 0x96, + 0x56, 0xd1, 0x1f, 0x10, 0xe1, 0xe5, 0x9f, 0x3f, 0xdd, 0x09, + 0x0c, 0x40, 0x90, 0x71, 0xef, 0x14, 0x41, 0x02, 0x82, 0x3a, + 0x6b, 0xe1, 0xf8, 0x2c, 0x5d, 0xbe, 0xfd, 0x1b, 0x02, 0x1d, + 0x00, 0xe0, 0x20, 0xe0, 0x7c, 0x02, 0x16, 0xa7, 0x6c, 0x6a, + 0x19, 0xba, 0xd5, 0x83, 0x73, 0xf3, 0x7d, 0x31, 0xef, 0xa7, + 0xe1, 0x5d, 0x5b, 0x7f, 0xf3, 0xfc, 0xda, 0x84, 0x31, 0x02, + 0x82, 0x01, 0x01, 0x00, 0x83, 0xdb, 0xa1, 0xbc, 0x3e, 0xc7, + 0x29, 0xa5, 0x6a, 0x5c, 0x2c, 0xe8, 0x7a, 0x8c, 0x7e, 0xe8, + 0xb8, 0x3e, 0x13, 0x47, 0xcd, 0x36, 0x7e, 0x79, 0x30, 0x7a, + 0x28, 0x03, 0xd3, 0xd4, 0xd2, 0xe3, 0xee, 0x3b, 0x46, 0xda, + 0xe0, 0x71, 0xe6, 0xcf, 0x46, 0x86, 0x0a, 0x37, 0x57, 0xb6, + 0xe9, 0xcf, 0xa1, 0x78, 0x19, 0xb8, 0x72, 0x9f, 0x30, 0x8c, + 0x2a, 0x04, 0x7c, 0x2f, 0x0c, 0x27, 0xa7, 0xb3, 0x23, 0xe0, + 0x46, 0xf2, 0x75, 0x0c, 0x03, 0x4c, 0xad, 0xfb, 0xc1, 0xcb, + 0x28, 0xcd, 0xa0, 0x63, 0xdb, 0x44, 0x88, 0xe0, 0xda, 0x6c, + 0x5b, 0x89, 0xb2, 0x5b, 0x40, 0x6d, 0xeb, 0x78, 0x7a, 0xd5, + 0xaf, 0x40, 0x52, 0x46, 0x63, 0x92, 0x13, 0x0d, 0xee, 0xee, + 0xf9, 0x53, 0xca, 0x2d, 0x4e, 0x3b, 0x13, 0xd8, 0x0f, 0x50, + 0xd0, 0x44, 0x57, 0x67, 0x0f, 0x45, 0x8f, 0x21, 0x30, 0x97, + 0x9e, 0x80, 0xd9, 0xd0, 0x91, 0xb7, 0xc9, 0x5a, 0x69, 0xda, + 0xeb, 0xd5, 0xea, 0x37, 0xf6, 0xb3, 0xbe, 0x1f, 0x24, 0xf1, + 0x55, 0x14, 0x28, 0x05, 0xb5, 0xd8, 0x84, 0x0f, 0x62, 0x85, + 0xaa, 0xec, 0x77, 0x64, 0xfd, 0x80, 0x7c, 0x41, 0x00, 0x88, + 0xa3, 0x79, 0x7d, 0x4f, 0x6f, 0xe3, 0x76, 0xf4, 0xb5, 0x97, + 0xb7, 0xeb, 0x67, 0x28, 0xba, 0x07, 0x1a, 0x59, 0x32, 0xc1, + 0x53, 0xd9, 0x05, 0x6b, 0x63, 0x93, 0xce, 0xa1, 0xd9, 0x7a, + 0xb2, 0xff, 0x1c, 0x12, 0x0a, 0x9a, 0xe5, 0x51, 0x1e, 0xba, + 0xfc, 0x95, 0x2e, 0x28, 0xa9, 0xfc, 0x4c, 0xed, 0x7b, 0x05, + 0xca, 0x67, 0xe0, 0x2d, 0xd7, 0x54, 0xb3, 0x05, 0x1c, 0x23, + 0x2b, 0x35, 0x2e, 0x19, 0x48, 0x59, 0x0e, 0x58, 0xa8, 0x01, + 0x56, 0xfb, 0x78, 0x90, 0xba, 0x08, 0x77, 0x94, 0x45, 0x05, + 0x13, 0xc7, 0x6b, 0x96, 0xd2, 0xa3, 0xa6, 0x01, 0x9f, 0x34, + 0x02, 0x82, 0x01, 0x00, 0x16, 0x1a, 0xb4, 0x6d, 0x9f, 0x16, + 0x6c, 0xcc, 0x91, 0x66, 0xfe, 0x30, 0xeb, 0x8e, 0x44, 0xba, + 0x2b, 0x7a, 0xc9, 0xa8, 0x95, 0xf2, 0xa6, 0x38, 0xd8, 0xaf, + 0x3e, 0x91, 0x68, 0xe8, 0x52, 0xf3, 0x97, 0x37, 0x70, 0xf2, + 0x47, 0xa3, 0xf4, 0x62, 0x26, 0xf5, 0x3b, 0x71, 0x52, 0x50, + 0x15, 0x9c, 0x6d, 0xa6, 0x6d, 0x92, 0x4c, 0x48, 0x76, 0x31, + 0x54, 0x48, 0xa5, 0x99, 0x7a, 0xd4, 0x61, 0xf7, 0x21, 0x44, + 0xe7, 0xd8, 0x82, 0xc3, 0x50, 0xd3, 0xd9, 0xd4, 0x66, 0x20, + 0xab, 0x70, 0x4c, 0x97, 0x9b, 0x8d, 0xac, 0x1f, 0x78, 0x27, + 0x1e, 0x47, 0xf8, 0x3b, 0xd1, 0x55, 0x73, 0xf3, 0xb4, 0x8e, + 0x6d, 0x45, 0x40, 0x54, 0xc6, 0xd8, 0x95, 0x15, 0x27, 0xb7, + 0x5f, 0x65, 0xaa, 0xcb, 0x24, 0xc9, 0x49, 0x87, 0x32, 0xad, + 0xcb, 0xf8, 0x35, 0x63, 0x56, 0x72, 0x7c, 0x4e, 0x6c, 0xad, + 0x5f, 0x26, 0x8c, 0xd2, 0x80, 0x41, 0xaf, 0x88, 0x23, 0x20, + 0x03, 0xa4, 0xd5, 0x3c, 0x53, 0x54, 0xb0, 0x3d, 0xed, 0x0e, + 0x9e, 0x53, 0x0a, 0x63, 0x5f, 0xfd, 0x28, 0x57, 0x09, 0x07, + 0x73, 0xf4, 0x0c, 0xd4, 0x71, 0x5d, 0x6b, 0xa0, 0xd7, 0x86, + 0x99, 0x29, 0x9b, 0xca, 0xfb, 0xcc, 0xd6, 0x2f, 0xfe, 0xbe, + 0x94, 0xef, 0x1a, 0x0e, 0x55, 0x84, 0xa7, 0xaf, 0x7b, 0xfa, + 0xed, 0x77, 0x61, 0x28, 0x22, 0xee, 0x6b, 0x11, 0xdd, 0xb0, + 0x17, 0x1e, 0x06, 0xe4, 0x29, 0x4c, 0xc2, 0x3f, 0xd6, 0x75, + 0xb6, 0x08, 0x04, 0x55, 0x13, 0x48, 0x4f, 0x44, 0xea, 0x8d, + 0xaf, 0xcb, 0xac, 0x22, 0xc4, 0x6a, 0xb3, 0x86, 0xe5, 0x47, + 0xa9, 0xb5, 0x72, 0x17, 0x23, 0x11, 0x81, 0x7f, 0x00, 0x00, + 0x67, 0x5c, 0xf4, 0x58, 0xcc, 0xe2, 0x46, 0xce, 0xf5, 0x6d, + 0xd8, 0x18, 0x91, 0xc4, 0x20, 0xbf, 0x07, 0x48, 0x45, 0xfd, + 0x02, 0x1c, 0x2f, 0x68, 0x44, 0xcb, 0xfb, 0x6b, 0xcb, 0x8d, + 0x02, 0x49, 0x7c, 0xee, 0xd2, 0xa6, 0xd3, 0x43, 0xb8, 0xa4, + 0x09, 0xb7, 0xc1, 0xd4, 0x4b, 0xc3, 0x66, 0xa7, 0xe0, 0x21 }; static const unsigned char dsa_p[] = { 0x00, 0xda, 0xb3, 0x46, 0x4d, 0x54, 0x57, 0xc7, 0xb4, 0x61, 0xa0, 0x6f, 0x66, 0x17, 0xda, diff --git a/crypto/openssl/test/evp_kdf_test.c b/crypto/openssl/test/evp_kdf_test.c index 78fec30c7bd3..d6189c3fe4ef 100644 --- a/crypto/openssl/test/evp_kdf_test.c +++ b/crypto/openssl/test/evp_kdf_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2018-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2018-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2018-2020, Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -683,7 +683,7 @@ static int test_kdf_pbkdf2_large_output(void) int mode = 0; OSSL_PARAM *params; - if (sizeof(len) > 32) + if (SIZE_MAX > 0xFFFFFFFFU) len = SIZE_MAX; params = construct_pbkdf2_params("passwordPASSWORDpassword", "sha256", @@ -1003,22 +1003,8 @@ static int test_kdf_kbkdf_6803_128(void) EVP_KDF_CTX *kctx; OSSL_PARAM params[7]; static unsigned char input_key[] = { - 0x57, - 0xD0, - 0x29, - 0x72, - 0x98, - 0xFF, - 0xD9, - 0xD3, - 0x5D, - 0xE5, - 0xA4, - 0x7F, - 0xB4, - 0xBD, - 0xE2, - 0x4B, + 0x57, 0xD0, 0x29, 0x72, 0x98, 0xFF, 0xD9, 0xD3, 0x5D, 0xE5, + 0xA4, 0x7F, 0xB4, 0xBD, 0xE2, 0x4B }; static unsigned char constants[][5] = { { 0x00, 0x00, 0x00, 0x02, 0x99 }, @@ -1073,38 +1059,10 @@ static int test_kdf_kbkdf_6803_256(void) EVP_KDF_CTX *kctx; OSSL_PARAM params[7]; static unsigned char input_key[] = { - 0xB9, - 0xD6, - 0x82, - 0x8B, - 0x20, - 0x56, - 0xB7, - 0xBE, - 0x65, - 0x6D, - 0x88, - 0xA1, - 0x23, - 0xB1, - 0xFA, - 0xC6, - 0x82, - 0x14, - 0xAC, - 0x2B, - 0x72, - 0x7E, - 0xCF, - 0x5F, - 0x69, - 0xAF, - 0xE0, - 0xC4, - 0xDF, - 0x2A, - 0x6D, - 0x2C, + 0xB9, 0xD6, 0x82, 0x8B, 0x20, 0x56, 0xB7, 0xBE, 0x65, 0x6D, + 0x88, 0xA1, 0x23, 0xB1, 0xFA, 0xC6, 0x82, 0x14, 0xAC, 0x2B, + 0x72, 0x7E, 0xCF, 0x5F, 0x69, 0xAF, 0xE0, 0xC4, 0xDF, 0x2A, + 0x6D, 0x2C }; static unsigned char constants[][5] = { { 0x00, 0x00, 0x00, 0x02, 0x99 }, @@ -1112,108 +1070,18 @@ static int test_kdf_kbkdf_6803_256(void) { 0x00, 0x00, 0x00, 0x02, 0x55 }, }; static unsigned char outputs[][32] = { - { - 0xE4, - 0x67, - 0xF9, - 0xA9, - 0x55, - 0x2B, - 0xC7, - 0xD3, - 0x15, - 0x5A, - 0x62, - 0x20, - 0xAF, - 0x9C, - 0x19, - 0x22, - 0x0E, - 0xEE, - 0xD4, - 0xFF, - 0x78, - 0xB0, - 0xD1, - 0xE6, - 0xA1, - 0x54, - 0x49, - 0x91, - 0x46, - 0x1A, - 0x9E, - 0x50, - }, - { - 0x41, - 0x2A, - 0xEF, - 0xC3, - 0x62, - 0xA7, - 0x28, - 0x5F, - 0xC3, - 0x96, - 0x6C, - 0x6A, - 0x51, - 0x81, - 0xE7, - 0x60, - 0x5A, - 0xE6, - 0x75, - 0x23, - 0x5B, - 0x6D, - 0x54, - 0x9F, - 0xBF, - 0xC9, - 0xAB, - 0x66, - 0x30, - 0xA4, - 0xC6, - 0x04, - }, - { - 0xFA, - 0x62, - 0x4F, - 0xA0, - 0xE5, - 0x23, - 0x99, - 0x3F, - 0xA3, - 0x88, - 0xAE, - 0xFD, - 0xC6, - 0x7E, - 0x67, - 0xEB, - 0xCD, - 0x8C, - 0x08, - 0xE8, - 0xA0, - 0x24, - 0x6B, - 0x1D, - 0x73, - 0xB0, - 0xD1, - 0xDD, - 0x9F, - 0xC5, - 0x82, - 0xB0, - }, + { 0xE4, 0x67, 0xF9, 0xA9, 0x55, 0x2B, 0xC7, 0xD3, 0x15, 0x5A, + 0x62, 0x20, 0xAF, 0x9C, 0x19, 0x22, 0x0E, 0xEE, 0xD4, 0xFF, + 0x78, 0xB0, 0xD1, 0xE6, 0xA1, 0x54, 0x49, 0x91, 0x46, 0x1A, + 0x9E, 0x50 }, + { 0x41, 0x2A, 0xEF, 0xC3, 0x62, 0xA7, 0x28, 0x5F, 0xC3, 0x96, + 0x6C, 0x6A, 0x51, 0x81, 0xE7, 0x60, 0x5A, 0xE6, 0x75, 0x23, + 0x5B, 0x6D, 0x54, 0x9F, 0xBF, 0xC9, 0xAB, 0x66, 0x30, 0xA4, + 0xC6, 0x04 }, + { 0xFA, 0x62, 0x4F, 0xA0, 0xE5, 0x23, 0x99, 0x3F, 0xA3, 0x88, + 0xAE, 0xFD, 0xC6, 0x7E, 0x67, 0xEB, 0xCD, 0x8C, 0x08, 0xE8, + 0xA0, 0x24, 0x6B, 0x1D, 0x73, 0xB0, 0xD1, 0xDD, 0x9F, 0xC5, + 0x82, 0xB0 }, }; static unsigned char iv[16] = { 0 }; unsigned char result[32] = { 0 }; @@ -1400,56 +1268,14 @@ static int test_kdf_kbkdf_8009_prf1(void) char *label = "prf", *digest = "sha256", *prf_input = "test", *mac = "HMAC"; static unsigned char input_key[] = { - 0x37, - 0x05, - 0xD9, - 0x60, - 0x80, - 0xC1, - 0x77, - 0x28, - 0xA0, - 0xE8, - 0x00, - 0xEA, - 0xB6, - 0xE0, - 0xD2, - 0x3C, + 0x37, 0x05, 0xD9, 0x60, 0x80, 0xC1, 0x77, 0x28, 0xA0, 0xE8, + 0x00, 0xEA, 0xB6, 0xE0, 0xD2, 0x3C }; static unsigned char output[] = { - 0x9D, - 0x18, - 0x86, - 0x16, - 0xF6, - 0x38, - 0x52, - 0xFE, - 0x86, - 0x91, - 0x5B, - 0xB8, - 0x40, - 0xB4, - 0xA8, - 0x86, - 0xFF, - 0x3E, - 0x6B, - 0xB0, - 0xF8, - 0x19, - 0xB4, - 0x9B, - 0x89, - 0x33, - 0x93, - 0xD3, - 0x93, - 0x85, - 0x42, - 0x95, + 0x9D, 0x18, 0x86, 0x16, 0xF6, 0x38, 0x52, 0xFE, 0x86, 0x91, + 0x5B, 0xB8, 0x40, 0xB4, 0xA8, 0x86, 0xFF, 0x3E, 0x6B, 0xB0, + 0xF8, 0x19, 0xB4, 0x9B, 0x89, 0x33, 0x93, 0xD3, 0x93, 0x85, + 0x42, 0x95 }; unsigned char result[sizeof(output)] = { 0 }; @@ -1482,88 +1308,17 @@ static int test_kdf_kbkdf_8009_prf2(void) char *label = "prf", *digest = "sha384", *prf_input = "test", *mac = "HMAC"; static unsigned char input_key[] = { - 0x6D, - 0x40, - 0x4D, - 0x37, - 0xFA, - 0xF7, - 0x9F, - 0x9D, - 0xF0, - 0xD3, - 0x35, - 0x68, - 0xD3, - 0x20, - 0x66, - 0x98, - 0x00, - 0xEB, - 0x48, - 0x36, - 0x47, - 0x2E, - 0xA8, - 0xA0, - 0x26, - 0xD1, - 0x6B, - 0x71, - 0x82, - 0x46, - 0x0C, - 0x52, + 0x6D, 0x40, 0x4D, 0x37, 0xFA, 0xF7, 0x9F, 0x9D, 0xF0, 0xD3, + 0x35, 0x68, 0xD3, 0x20, 0x66, 0x98, 0x00, 0xEB, 0x48, 0x36, + 0x47, 0x2E, 0xA8, 0xA0, 0x26, 0xD1, 0x6B, 0x71, 0x82, 0x46, + 0x0C, 0x52 }; static unsigned char output[] = { - 0x98, - 0x01, - 0xF6, - 0x9A, - 0x36, - 0x8C, - 0x2B, - 0xF6, - 0x75, - 0xE5, - 0x95, - 0x21, - 0xE1, - 0x77, - 0xD9, - 0xA0, - 0x7F, - 0x67, - 0xEF, - 0xE1, - 0xCF, - 0xDE, - 0x8D, - 0x3C, - 0x8D, - 0x6F, - 0x6A, - 0x02, - 0x56, - 0xE3, - 0xB1, - 0x7D, - 0xB3, - 0xC1, - 0xB6, - 0x2A, - 0xD1, - 0xB8, - 0x55, - 0x33, - 0x60, - 0xD1, - 0x73, - 0x67, - 0xEB, - 0x15, - 0x14, - 0xD2, + 0x98, 0x01, 0xF6, 0x9A, 0x36, 0x8C, 0x2B, 0xF6, 0x75, 0xE5, + 0x95, 0x21, 0xE1, 0x77, 0xD9, 0xA0, 0x7F, 0x67, 0xEF, 0xE1, + 0xCF, 0xDE, 0x8D, 0x3C, 0x8D, 0x6F, 0x6A, 0x02, 0x56, 0xE3, + 0xB1, 0x7D, 0xB3, 0xC1, 0xB6, 0x2A, 0xD1, 0xB8, 0x55, 0x33, + 0x60, 0xD1, 0x73, 0x67, 0xEB, 0x15, 0x14, 0xD2 }; unsigned char result[sizeof(output)] = { 0 }; @@ -1607,103 +1362,22 @@ static int test_kdf_kbkdf_fixedinfo(void) int use_separator = 0; static unsigned char input_key[] = { - 0xc1, - 0x0b, - 0x15, - 0x2e, - 0x8c, - 0x97, - 0xb7, - 0x7e, - 0x18, - 0x70, - 0x4e, - 0x0f, - 0x0b, - 0xd3, - 0x83, - 0x05, + 0xc1, 0x0b, 0x15, 0x2e, 0x8c, 0x97, 0xb7, 0x7e, 0x18, 0x70, + 0x4e, 0x0f, 0x0b, 0xd3, 0x83, 0x05 }; static unsigned char fixed_input[] = { - 0x98, - 0xcd, - 0x4c, - 0xbb, - 0xbe, - 0xbe, - 0x15, - 0xd1, - 0x7d, - 0xc8, - 0x6e, - 0x6d, - 0xba, - 0xd8, - 0x00, - 0xa2, - 0xdc, - 0xbd, - 0x64, - 0xf7, - 0xc7, - 0xad, - 0x0e, - 0x78, - 0xe9, - 0xcf, - 0x94, - 0xff, - 0xdb, - 0xa8, - 0x9d, - 0x03, - 0xe9, - 0x7e, - 0xad, - 0xf6, - 0xc4, - 0xf7, - 0xb8, - 0x06, - 0xca, - 0xf5, - 0x2a, - 0xa3, - 0x8f, - 0x09, - 0xd0, - 0xeb, - 0x71, - 0xd7, - 0x1f, - 0x49, - 0x7b, - 0xcc, - 0x69, - 0x06, - 0xb4, - 0x8d, - 0x36, - 0xc4, - + 0x98, 0xcd, 0x4c, 0xbb, 0xbe, 0xbe, 0x15, 0xd1, + 0x7d, 0xc8, 0x6e, 0x6d, 0xba, 0xd8, 0x00, 0xa2, + 0xdc, 0xbd, 0x64, 0xf7, 0xc7, 0xad, 0x0e, 0x78, + 0xe9, 0xcf, 0x94, 0xff, 0xdb, 0xa8, 0x9d, 0x03, + 0xe9, 0x7e, 0xad, 0xf6, 0xc4, 0xf7, 0xb8, 0x06, + 0xca, 0xf5, 0x2a, 0xa3, 0x8f, 0x09, 0xd0, 0xeb, + 0x71, 0xd7, 0x1f, 0x49, 0x7b, 0xcc, 0x69, 0x06, + 0xb4, 0x8d, 0x36, 0xc4 }; static unsigned char output[] = { - 0x26, - 0xfa, - 0xf6, - 0x19, - 0x08, - 0xad, - 0x9e, - 0xe8, - 0x81, - 0xb8, - 0x30, - 0x5c, - 0x22, - 0x1d, - 0xb5, - 0x3f, + 0x26, 0xfa, 0xf6, 0x19, 0x08, 0xad, 0x9e, 0xe8, 0x81, 0xb8, + 0x30, 0x5c, 0x22, 0x1d, 0xb5, 0x3f }; unsigned char result[sizeof(output)] = { 0 }; diff --git a/crypto/openssl/test/evp_libctx_test.c b/crypto/openssl/test/evp_libctx_test.c index 304c987f50bb..ddc4fd4cc099 100644 --- a/crypto/openssl/test/evp_libctx_test.c +++ b/crypto/openssl/test/evp_libctx_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2020-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2020-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -327,70 +327,13 @@ static int test_cipher_reinit(int test_id) 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }; unsigned char key[64] = { - 0x00, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, - 0x01, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, - 0x02, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, - 0x03, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, + 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x01, 0x01, 0x02, 0x03, + 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, + 0x0e, 0x0f, 0x02, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x03, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, + 0x0c, 0x0d, 0x0e, 0x0f }; unsigned char iv[16] = { 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, @@ -468,104 +411,19 @@ static int test_cipher_reinit_partialupdate(int test_id) unsigned char out2[256]; unsigned char out3[256]; static const unsigned char in[32] = { - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, - 0xba, - 0xbe, - 0xba, - 0xbe, - 0x00, - 0x00, - 0xba, - 0xbe, - 0x01, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0xba, 0xbe, + 0xba, 0xbe, 0x00, 0x00, 0xba, 0xbe, 0x01, 0x01, 0x02, 0x03, + 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, + 0x0e, 0x0f }; static const unsigned char key[64] = { - 0x00, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, - 0x01, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, - 0x02, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, - 0x03, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x0a, - 0x0b, - 0x0c, - 0x0d, - 0x0e, - 0x0f, + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, + 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x01, 0x01, 0x02, 0x03, + 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, + 0x0e, 0x0f, 0x02, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x03, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, + 0x0c, 0x0d, 0x0e, 0x0f }; static const unsigned char iv[16] = { 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, diff --git a/crypto/openssl/test/evp_pkey_provided_test.c b/crypto/openssl/test/evp_pkey_provided_test.c index dcc9524c9fa5..b7385be62f9a 100644 --- a/crypto/openssl/test/evp_pkey_provided_test.c +++ b/crypto/openssl/test/evp_pkey_provided_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -523,34 +523,9 @@ static int test_fromdata_dh_named_group(void) * -pkeyopt priv_len:224 -text */ static const unsigned char priv_data[] = { - 0x88, - 0x85, - 0xe7, - 0x9f, - 0xee, - 0x6d, - 0xc5, - 0x7c, - 0x78, - 0xaf, - 0x63, - 0x5d, - 0x38, - 0x2a, - 0xd0, - 0xed, - 0x56, - 0x4b, - 0x47, - 0x21, - 0x2b, - 0xfa, - 0x55, - 0xfa, - 0x87, - 0xe8, - 0xa9, - 0x7b, + 0x88, 0x85, 0xe7, 0x9f, 0xee, 0x6d, 0xc5, 0x7c, 0x78, 0xaf, + 0x63, 0x5d, 0x38, 0x2a, 0xd0, 0xed, 0x56, 0x4b, 0x47, 0x21, + 0x2b, 0xfa, 0x55, 0xfa, 0x87, 0xe8, 0xa9, 0x7b }; static const unsigned char pub_data[] = { 0x00, 0xd6, 0x2d, 0x77, 0xe0, 0xd3, 0x7d, 0xf8, 0xeb, 0x98, 0x50, 0xa1, @@ -763,34 +738,9 @@ static int test_fromdata_dh_fips186_4(void) * -pkeyopt group:ffdhe2048 -pkeyopt priv_len:224 -text */ static const unsigned char priv_data[] = { - 0x88, - 0x85, - 0xe7, - 0x9f, - 0xee, - 0x6d, - 0xc5, - 0x7c, - 0x78, - 0xaf, - 0x63, - 0x5d, - 0x38, - 0x2a, - 0xd0, - 0xed, - 0x56, - 0x4b, - 0x47, - 0x21, - 0x2b, - 0xfa, - 0x55, - 0xfa, - 0x87, - 0xe8, - 0xa9, - 0x7b, + 0x88, 0x85, 0xe7, 0x9f, 0xee, 0x6d, 0xc5, 0x7c, 0x78, 0xaf, + 0x63, 0x5d, 0x38, 0x2a, 0xd0, 0xed, 0x56, 0x4b, 0x47, 0x21, + 0x2b, 0xfa, 0x55, 0xfa, 0x87, 0xe8, 0xa9, 0x7b }; static const unsigned char pub_data[] = { 0xd6, 0x2d, 0x77, 0xe0, 0xd3, 0x7d, 0xf8, 0xeb, 0x98, 0x50, 0xa1, 0x82, @@ -1267,6 +1217,11 @@ static int test_fromdata_ec(void) BIGNUM *a = NULL; BIGNUM *b = NULL; BIGNUM *p = NULL; + OSSL_PARAM probe[2] = { + OSSL_PARAM_DEFN(OSSL_PKEY_PARAM_PRIV_KEY, OSSL_PARAM_UNSIGNED_INTEGER, + NULL, 0), + OSSL_PARAM_END + }; if (!TEST_ptr(bld = OSSL_PARAM_BLD_new())) goto err; @@ -1354,6 +1309,18 @@ static int test_fromdata_ec(void) || !TEST_BN_eq(group_b, b)) goto err; + /* + * Probe the EC private-key BN length via the explicit-params + * path; with NULL data, return_size receives the required + * (padded) buffer size, which equals the byte length of the + * group order. + */ + probe[0].return_size = OSSL_PARAM_UNMODIFIED; + if (!TEST_true(EVP_PKEY_get_params(pk, probe)) + || !TEST_size_t_eq(probe[0].return_size, + BN_num_bytes(EC_GROUP_get0_order(group)))) + goto err; + EC_GROUP_free(group); group = NULL; BN_free(group_p); diff --git a/crypto/openssl/test/helpers/predefined_dhparams.c b/crypto/openssl/test/helpers/predefined_dhparams.c index 28070efdb64b..ef71b4498d0f 100644 --- a/crypto/openssl/test/helpers/predefined_dhparams.c +++ b/crypto/openssl/test/helpers/predefined_dhparams.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -72,73 +72,16 @@ err: EVP_PKEY *get_dh512(OSSL_LIB_CTX *libctx) { static unsigned char dh512_p[] = { - 0xCB, - 0xC8, - 0xE1, - 0x86, - 0xD0, - 0x1F, - 0x94, - 0x17, - 0xA6, - 0x99, - 0xF0, - 0xC6, - 0x1F, - 0x0D, - 0xAC, - 0xB6, - 0x25, - 0x3E, - 0x06, - 0x39, - 0xCA, - 0x72, - 0x04, - 0xB0, - 0x6E, - 0xDA, - 0xC0, - 0x61, - 0xE6, - 0x7A, - 0x77, - 0x25, - 0xE8, - 0x3B, - 0xB9, - 0x5F, - 0x9A, - 0xB6, - 0xB5, - 0xFE, - 0x99, - 0x0B, - 0xA1, - 0x93, - 0x4E, - 0x35, - 0x33, - 0xB8, - 0xE1, - 0xF1, - 0x13, - 0x4F, - 0x59, - 0x1A, - 0xD2, - 0x57, - 0xC0, - 0x26, - 0x21, - 0x33, - 0x02, - 0xC5, - 0xAE, - 0x23, + 0xCB, 0xC8, 0xE1, 0x86, 0xD0, 0x1F, 0x94, 0x17, 0xA6, 0x99, + 0xF0, 0xC6, 0x1F, 0x0D, 0xAC, 0xB6, 0x25, 0x3E, 0x06, 0x39, + 0xCA, 0x72, 0x04, 0xB0, 0x6E, 0xDA, 0xC0, 0x61, 0xE6, 0x7A, + 0x77, 0x25, 0xE8, 0x3B, 0xB9, 0x5F, 0x9A, 0xB6, 0xB5, 0xFE, + 0x99, 0x0B, 0xA1, 0x93, 0x4E, 0x35, 0x33, 0xB8, 0xE1, 0xF1, + 0x13, 0x4F, 0x59, 0x1A, 0xD2, 0x57, 0xC0, 0x26, 0x21, 0x33, + 0x02, 0xC5, 0xAE, 0x23 }; static unsigned char dh512_g[] = { - 0x02, + 0x02 }; return get_dh_from_pg(libctx, "DH", dh512_p, sizeof(dh512_p), @@ -148,161 +91,27 @@ EVP_PKEY *get_dh512(OSSL_LIB_CTX *libctx) EVP_PKEY *get_dhx512(OSSL_LIB_CTX *libctx) { static unsigned char dhx512_p[] = { - 0x00, - 0xe8, - 0x1a, - 0xb7, - 0x9a, - 0x02, - 0x65, - 0x64, - 0x94, - 0x7b, - 0xba, - 0x09, - 0x1c, - 0x12, - 0x27, - 0x1e, - 0xea, - 0x89, - 0x32, - 0x64, - 0x78, - 0xf8, - 0x1c, - 0x78, - 0x8e, - 0x96, - 0xc3, - 0xc6, - 0x9f, - 0x41, - 0x05, - 0x41, - 0x65, - 0xae, - 0xe3, - 0x05, - 0xea, - 0x66, - 0x21, - 0xf7, - 0x38, - 0xb7, - 0x2b, - 0x32, - 0x40, - 0x5a, - 0x14, - 0x86, - 0x51, - 0x94, - 0xb1, - 0xcf, - 0x01, - 0xe3, - 0x27, - 0x28, - 0xf6, - 0x75, - 0xa3, - 0x15, - 0xbb, - 0x12, - 0x4d, - 0x99, - 0xe7, + 0x00, 0xe8, 0x1a, 0xb7, 0x9a, 0x02, 0x65, 0x64, 0x94, 0x7b, + 0xba, 0x09, 0x1c, 0x12, 0x27, 0x1e, 0xea, 0x89, 0x32, 0x64, + 0x78, 0xf8, 0x1c, 0x78, 0x8e, 0x96, 0xc3, 0xc6, 0x9f, 0x41, + 0x05, 0x41, 0x65, 0xae, 0xe3, 0x05, 0xea, 0x66, 0x21, 0xf7, + 0x38, 0xb7, 0x2b, 0x32, 0x40, 0x5a, 0x14, 0x86, 0x51, 0x94, + 0xb1, 0xcf, 0x01, 0xe3, 0x27, 0x28, 0xf6, 0x75, 0xa3, 0x15, + 0xbb, 0x12, 0x4d, 0x99, 0xe7 }; static unsigned char dhx512_g[] = { - 0x00, - 0x91, - 0xc1, - 0x43, - 0x6d, - 0x0d, - 0xb0, - 0xa4, - 0xde, - 0x41, - 0xb7, - 0x93, - 0xad, - 0x51, - 0x94, - 0x1b, - 0x43, - 0xd8, - 0x42, - 0xf1, - 0x5e, - 0x46, - 0x83, - 0x5d, - 0xf1, - 0xd1, - 0xf0, - 0x41, - 0x10, - 0xd1, - 0x1c, - 0x5e, - 0xad, - 0x9b, - 0x68, - 0xb1, - 0x6f, - 0xf5, - 0x8e, - 0xaa, - 0x6d, - 0x71, - 0x88, - 0x37, - 0xdf, - 0x05, - 0xf7, - 0x6e, - 0x7a, - 0xb4, - 0x25, - 0x10, - 0x6c, - 0x7f, - 0x38, - 0xb4, - 0xc8, - 0xfc, - 0xcc, - 0x0c, - 0x6a, - 0x02, - 0x08, - 0x61, - 0xf6, + 0x00, 0x91, 0xc1, 0x43, 0x6d, 0x0d, 0xb0, 0xa4, 0xde, 0x41, + 0xb7, 0x93, 0xad, 0x51, 0x94, 0x1b, 0x43, 0xd8, 0x42, 0xf1, + 0x5e, 0x46, 0x83, 0x5d, 0xf1, 0xd1, 0xf0, 0x41, 0x10, 0xd1, + 0x1c, 0x5e, 0xad, 0x9b, 0x68, 0xb1, 0x6f, 0xf5, 0x8e, 0xaa, + 0x6d, 0x71, 0x88, 0x37, 0xdf, 0x05, 0xf7, 0x6e, 0x7a, 0xb4, + 0x25, 0x10, 0x6c, 0x7f, 0x38, 0xb4, 0xc8, 0xfc, 0xcc, 0x0c, + 0x6a, 0x02, 0x08, 0x61, 0xf6 }; static unsigned char dhx512_q[] = { - 0x00, - 0xdd, - 0xf6, - 0x35, - 0xad, - 0xfa, - 0x70, - 0xc7, - 0xe7, - 0xa8, - 0xf0, - 0xe3, - 0xda, - 0x79, - 0x34, - 0x3f, - 0x5b, - 0xcf, - 0x73, - 0x82, - 0x91, + 0x00, 0xdd, 0xf6, 0x35, 0xad, 0xfa, 0x70, 0xc7, 0xe7, 0xa8, + 0xf0, 0xe3, 0xda, 0x79, 0x34, 0x3f, 0x5b, 0xcf, 0x73, 0x82, + 0x91 }; return get_dh_from_pg(libctx, "X9.42 DH", @@ -314,264 +123,34 @@ EVP_PKEY *get_dhx512(OSSL_LIB_CTX *libctx) EVP_PKEY *get_dh1024dsa(OSSL_LIB_CTX *libctx) { static unsigned char dh1024_p[] = { - 0xC8, - 0x00, - 0xF7, - 0x08, - 0x07, - 0x89, - 0x4D, - 0x90, - 0x53, - 0xF3, - 0xD5, - 0x00, - 0x21, - 0x1B, - 0xF7, - 0x31, - 0xA6, - 0xA2, - 0xDA, - 0x23, - 0x9A, - 0xC7, - 0x87, - 0x19, - 0x3B, - 0x47, - 0xB6, - 0x8C, - 0x04, - 0x6F, - 0xFF, - 0xC6, - 0x9B, - 0xB8, - 0x65, - 0xD2, - 0xC2, - 0x5F, - 0x31, - 0x83, - 0x4A, - 0xA7, - 0x5F, - 0x2F, - 0x88, - 0x38, - 0xB6, - 0x55, - 0xCF, - 0xD9, - 0x87, - 0x6D, - 0x6F, - 0x9F, - 0xDA, - 0xAC, - 0xA6, - 0x48, - 0xAF, - 0xFC, - 0x33, - 0x84, - 0x37, - 0x5B, - 0x82, - 0x4A, - 0x31, - 0x5D, - 0xE7, - 0xBD, - 0x52, - 0x97, - 0xA1, - 0x77, - 0xBF, - 0x10, - 0x9E, - 0x37, - 0xEA, - 0x64, - 0xFA, - 0xCA, - 0x28, - 0x8D, - 0x9D, - 0x3B, - 0xD2, - 0x6E, - 0x09, - 0x5C, - 0x68, - 0xC7, - 0x45, - 0x90, - 0xFD, - 0xBB, - 0x70, - 0xC9, - 0x3A, - 0xBB, - 0xDF, - 0xD4, - 0x21, - 0x0F, - 0xC4, - 0x6A, - 0x3C, - 0xF6, - 0x61, - 0xCF, - 0x3F, - 0xD6, - 0x13, - 0xF1, - 0x5F, - 0xBC, - 0xCF, - 0xBC, - 0x26, - 0x9E, - 0xBC, - 0x0B, - 0xBD, - 0xAB, - 0x5D, - 0xC9, - 0x54, - 0x39, + 0xC8, 0x00, 0xF7, 0x08, 0x07, 0x89, 0x4D, 0x90, 0x53, 0xF3, + 0xD5, 0x00, 0x21, 0x1B, 0xF7, 0x31, 0xA6, 0xA2, 0xDA, 0x23, + 0x9A, 0xC7, 0x87, 0x19, 0x3B, 0x47, 0xB6, 0x8C, 0x04, 0x6F, + 0xFF, 0xC6, 0x9B, 0xB8, 0x65, 0xD2, 0xC2, 0x5F, 0x31, 0x83, + 0x4A, 0xA7, 0x5F, 0x2F, 0x88, 0x38, 0xB6, 0x55, 0xCF, 0xD9, + 0x87, 0x6D, 0x6F, 0x9F, 0xDA, 0xAC, 0xA6, 0x48, 0xAF, 0xFC, + 0x33, 0x84, 0x37, 0x5B, 0x82, 0x4A, 0x31, 0x5D, 0xE7, 0xBD, + 0x52, 0x97, 0xA1, 0x77, 0xBF, 0x10, 0x9E, 0x37, 0xEA, 0x64, + 0xFA, 0xCA, 0x28, 0x8D, 0x9D, 0x3B, 0xD2, 0x6E, 0x09, 0x5C, + 0x68, 0xC7, 0x45, 0x90, 0xFD, 0xBB, 0x70, 0xC9, 0x3A, 0xBB, + 0xDF, 0xD4, 0x21, 0x0F, 0xC4, 0x6A, 0x3C, 0xF6, 0x61, 0xCF, + 0x3F, 0xD6, 0x13, 0xF1, 0x5F, 0xBC, 0xCF, 0xBC, 0x26, 0x9E, + 0xBC, 0x0B, 0xBD, 0xAB, 0x5D, 0xC9, 0x54, 0x39 }; static unsigned char dh1024_g[] = { - 0x3B, - 0x40, - 0x86, - 0xE7, - 0xF3, - 0x6C, - 0xDE, - 0x67, - 0x1C, - 0xCC, - 0x80, - 0x05, - 0x5A, - 0xDF, - 0xFE, - 0xBD, - 0x20, - 0x27, - 0x74, - 0x6C, - 0x24, - 0xC9, - 0x03, - 0xF3, - 0xE1, - 0x8D, - 0xC3, - 0x7D, - 0x98, - 0x27, - 0x40, - 0x08, - 0xB8, - 0x8C, - 0x6A, - 0xE9, - 0xBB, - 0x1A, - 0x3A, - 0xD6, - 0x86, - 0x83, - 0x5E, - 0x72, - 0x41, - 0xCE, - 0x85, - 0x3C, - 0xD2, - 0xB3, - 0xFC, - 0x13, - 0xCE, - 0x37, - 0x81, - 0x9E, - 0x4C, - 0x1C, - 0x7B, - 0x65, - 0xD3, - 0xE6, - 0xA6, - 0x00, - 0xF5, - 0x5A, - 0x95, - 0x43, - 0x5E, - 0x81, - 0xCF, - 0x60, - 0xA2, - 0x23, - 0xFC, - 0x36, - 0xA7, - 0x5D, - 0x7A, - 0x4C, - 0x06, - 0x91, - 0x6E, - 0xF6, - 0x57, - 0xEE, - 0x36, - 0xCB, - 0x06, - 0xEA, - 0xF5, - 0x3D, - 0x95, - 0x49, - 0xCB, - 0xA7, - 0xDD, - 0x81, - 0xDF, - 0x80, - 0x09, - 0x4A, - 0x97, - 0x4D, - 0xA8, - 0x22, - 0x72, - 0xA1, - 0x7F, - 0xC4, - 0x70, - 0x56, - 0x70, - 0xE8, - 0x20, - 0x10, - 0x18, - 0x8F, - 0x2E, - 0x60, - 0x07, - 0xE7, - 0x68, - 0x1A, - 0x82, - 0x5D, - 0x32, - 0xA2, + 0x3B, 0x40, 0x86, 0xE7, 0xF3, 0x6C, 0xDE, 0x67, 0x1C, 0xCC, + 0x80, 0x05, 0x5A, 0xDF, 0xFE, 0xBD, 0x20, 0x27, 0x74, 0x6C, + 0x24, 0xC9, 0x03, 0xF3, 0xE1, 0x8D, 0xC3, 0x7D, 0x98, 0x27, + 0x40, 0x08, 0xB8, 0x8C, 0x6A, 0xE9, 0xBB, 0x1A, 0x3A, 0xD6, + 0x86, 0x83, 0x5E, 0x72, 0x41, 0xCE, 0x85, 0x3C, 0xD2, 0xB3, + 0xFC, 0x13, 0xCE, 0x37, 0x81, 0x9E, 0x4C, 0x1C, 0x7B, 0x65, + 0xD3, 0xE6, 0xA6, 0x00, 0xF5, 0x5A, 0x95, 0x43, 0x5E, 0x81, + 0xCF, 0x60, 0xA2, 0x23, 0xFC, 0x36, 0xA7, 0x5D, 0x7A, 0x4C, + 0x06, 0x91, 0x6E, 0xF6, 0x57, 0xEE, 0x36, 0xCB, 0x06, 0xEA, + 0xF5, 0x3D, 0x95, 0x49, 0xCB, 0xA7, 0xDD, 0x81, 0xDF, 0x80, + 0x09, 0x4A, 0x97, 0x4D, 0xA8, 0x22, 0x72, 0xA1, 0x7F, 0xC4, + 0x70, 0x56, 0x70, 0xE8, 0x20, 0x10, 0x18, 0x8F, 0x2E, 0x60, + 0x07, 0xE7, 0x68, 0x1A, 0x82, 0x5D, 0x32, 0xA2 }; return get_dh_from_pg(libctx, "DH", dh1024_p, sizeof(dh1024_p), diff --git a/crypto/openssl/test/http_test.c b/crypto/openssl/test/http_test.c index f2f60a82bf98..69217d58853d 100644 --- a/crypto/openssl/test/http_test.c +++ b/crypto/openssl/test/http_test.c @@ -11,6 +11,7 @@ #include <openssl/http.h> #include <openssl/pem.h> #include <openssl/x509v3.h> +#include <openssl/err.h> #include <string.h> #include "testutil.h" @@ -329,6 +330,57 @@ static int test_http_url_invalid_path(void) return test_http_url_invalid("https://[FF01::101]pkix"); } +static int test_http_crlf_rejected(void) +{ + BIO *wbio = BIO_new(BIO_s_mem()); + BIO *rbio = BIO_new(BIO_s_mem()); + BIO *req = BIO_new(BIO_s_mem()); + BIO *proxy_bio = BIO_new(BIO_s_mem()); + OSSL_HTTP_REQ_CTX *rctx = NULL; + int res = 0; + + if (!TEST_ptr(wbio) + || !TEST_ptr(rbio) + || !TEST_ptr(req) + || !TEST_ptr(proxy_bio) + || !TEST_int_eq(BIO_puts(req, "x"), 1) + || !TEST_ptr(rctx = OSSL_HTTP_REQ_CTX_new(wbio, rbio, 0))) + goto err; + + ERR_clear_error(); + res = TEST_false(OSSL_HTTP_REQ_CTX_set_request_line(rctx, 0 /* GET */, + NULL, NULL, "/path\r\nInjected: value")) + && TEST_false(OSSL_HTTP_REQ_CTX_set_request_line(rctx, 0 /* GET */, + "server\r\nInjected: value", "80", RPATH)) + && TEST_false(OSSL_HTTP_REQ_CTX_set_request_line(rctx, 0 /* GET */, + "server", "80\r\nInjected: value", RPATH)) + && TEST_true(OSSL_HTTP_REQ_CTX_set_request_line(rctx, 0 /* GET */, + NULL, NULL, RPATH)) + && TEST_false(OSSL_HTTP_REQ_CTX_add1_header(rctx, + "X-Test\r\nInjected", "value")) + && TEST_false(OSSL_HTTP_REQ_CTX_add1_header(rctx, + "X-Test", "value\r\nInjected: value")) + && TEST_false(OSSL_HTTP_set1_request(rctx, RPATH, NULL, + "text/plain\r\nInjected: value", req, + NULL, 0 /* expect_asn1 */, 0 /* max_resp_len */, + 0 /* timeout */, 0 /* keep_alive */)) + && TEST_false(OSSL_HTTP_proxy_connect(proxy_bio, + "server\r\nInjected: value", "443", NULL, NULL, + 0 /* timeout */, NULL, NULL)) + && TEST_false(OSSL_HTTP_proxy_connect(proxy_bio, + "server", "443\r\nInjected: value", NULL, NULL, + 0 /* timeout */, NULL, NULL)); + +err: + ERR_clear_error(); + OSSL_HTTP_REQ_CTX_free(rctx); + BIO_free(wbio); + BIO_free(rbio); + BIO_free(req); + BIO_free(proxy_bio); + return res; +} + static int test_http_get_x509(void) { return test_http_x509(1); @@ -379,6 +431,14 @@ static int test_http_keep_alive_1_require_no(void) return test_http_keep_alive('1', 2, 0); } +static int test_http_adapt_proxy_empty_server(void) +{ + const char *proxy = "http://proxy.local:8080"; + + return TEST_str_eq(OSSL_HTTP_adapt_proxy(proxy, "abc", "", 0), proxy) + && TEST_str_eq(OSSL_HTTP_adapt_proxy(proxy, "abc", "[]", 0), proxy); +} + void cleanup_tests(void) { X509_free(x509); @@ -404,6 +464,8 @@ int setup_tests(void) ADD_TEST(test_http_url_invalid_prefix); ADD_TEST(test_http_url_invalid_port); ADD_TEST(test_http_url_invalid_path); + ADD_TEST(test_http_crlf_rejected); + ADD_TEST(test_http_get_x509); ADD_TEST(test_http_post_x509); ADD_TEST(test_http_keep_alive_0_no_no); @@ -414,5 +476,6 @@ int setup_tests(void) ADD_TEST(test_http_keep_alive_1_require_yes); ADD_TEST(test_http_keep_alive_0_require_no); ADD_TEST(test_http_keep_alive_1_require_no); + ADD_TEST(test_http_adapt_proxy_empty_server); return 1; } diff --git a/crypto/openssl/test/ideatest.c b/crypto/openssl/test/ideatest.c index b0e96088af95..d8f13e843540 100644 --- a/crypto/openssl/test/ideatest.c +++ b/crypto/openssl/test/ideatest.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -35,22 +35,8 @@ static unsigned char out[80]; static const unsigned char text[] = "Hello to all people out there"; static const unsigned char cfb_key[16] = { - 0xe1, - 0xf0, - 0xc3, - 0xd2, - 0xa5, - 0xb4, - 0x87, - 0x96, - 0x69, - 0x78, - 0x4b, - 0x5a, - 0x2d, - 0x3c, - 0x0f, - 0x1e, + 0xe1, 0xf0, 0xc3, 0xd2, 0xa5, 0xb4, 0x87, 0x96, 0x69, 0x78, + 0x4b, 0x5a, 0x2d, 0x3c, 0x0f, 0x1e }; static const unsigned char cfb_iv[80] = { 0x34, 0x12, 0x78, 0x56, 0xab, 0x90, 0xef, 0xcd }; static unsigned char cfb_buf1[40], cfb_buf2[40], cfb_tmp[8]; diff --git a/crypto/openssl/test/pbetest.c b/crypto/openssl/test/pbetest.c index 399e3a58f60c..6135b1fdd9a9 100644 --- a/crypto/openssl/test/pbetest.c +++ b/crypto/openssl/test/pbetest.c @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2021-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -23,43 +23,15 @@ static const char pbe_password[] = "MyVoiceIsMyPassport"; static unsigned char pbe_salt[] = { - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; static const int pbe_iter = 1000; static unsigned char pbe_plaintext[] = { - 0x57, - 0x65, - 0x20, - 0x61, - 0x72, - 0x65, - 0x20, - 0x61, - 0x6c, - 0x6c, - 0x20, - 0x6d, - 0x61, - 0x64, - 0x65, - 0x20, - 0x6f, - 0x66, - 0x20, - 0x73, - 0x74, - 0x61, - 0x72, - 0x73, + 0x57, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, + 0x20, 0x6d, 0x61, 0x64, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x73, + 0x74, 0x61, 0x72, 0x73 }; #endif @@ -67,67 +39,18 @@ static unsigned char pbe_plaintext[] = { #if !defined OPENSSL_NO_RC4 && !defined OPENSSL_NO_MD5 static const unsigned char pbe_ciphertext_rc4_md5[] = { - 0x21, - 0x90, - 0xfa, - 0xee, - 0x95, - 0x66, - 0x59, - 0x45, - 0xfa, - 0x1e, - 0x9f, - 0xe2, - 0x25, - 0xd2, - 0xf9, - 0x71, - 0x94, - 0xe4, - 0x3d, - 0xc9, - 0x7c, - 0xb0, - 0x07, - 0x23, + 0x21, 0x90, 0xfa, 0xee, 0x95, 0x66, 0x59, 0x45, 0xfa, 0x1e, + 0x9f, 0xe2, 0x25, 0xd2, 0xf9, 0x71, 0x94, 0xe4, 0x3d, 0xc9, + 0x7c, 0xb0, 0x07, 0x23 }; #endif #if !defined OPENSSL_NO_DES && !defined OPENSSL_NO_SHA1 static const unsigned char pbe_ciphertext_des_sha1[] = { - 0xce, - 0x4b, - 0xb0, - 0x0a, - 0x7b, - 0x48, - 0xd7, - 0xe3, - 0x9a, - 0x9f, - 0x46, - 0xd6, - 0x41, - 0x42, - 0x4b, - 0x44, - 0x36, - 0x45, - 0x5f, - 0x60, - 0x8f, - 0x3c, - 0xd0, - 0x55, - 0xd0, - 0x8d, - 0xa9, - 0xab, - 0x78, - 0x5b, - 0x63, - 0xaf, + 0xce, 0x4b, 0xb0, 0x0a, 0x7b, 0x48, 0xd7, 0xe3, 0x9a, 0x9f, + 0x46, 0xd6, 0x41, 0x42, 0x4b, 0x44, 0x36, 0x45, 0x5f, 0x60, + 0x8f, 0x3c, 0xd0, 0x55, 0xd0, 0x8d, 0xa9, 0xab, 0x78, 0x5b, + 0x63, 0xaf }; #endif diff --git a/crypto/openssl/test/pkcs12_format_test.c b/crypto/openssl/test/pkcs12_format_test.c index a9d0e27e56a3..443f59bdedfc 100644 --- a/crypto/openssl/test/pkcs12_format_test.c +++ b/crypto/openssl/test/pkcs12_format_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2020-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -33,2226 +33,237 @@ static OSSL_PROVIDER *lgcyprov = NULL; */ static const unsigned char CERT1[] = { - 0x30, - 0x82, - 0x01, - 0xed, - 0x30, - 0x82, - 0x01, - 0x56, - 0xa0, - 0x03, - 0x02, - 0x01, - 0x02, - 0x02, - 0x09, - 0x00, - 0x8b, - 0x4b, - 0x5e, - 0x6c, - 0x03, - 0x28, - 0x4e, - 0xe6, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x0b, - 0x05, - 0x00, - 0x30, - 0x19, - 0x31, - 0x17, - 0x30, - 0x15, - 0x06, - 0x03, - 0x55, - 0x04, - 0x03, - 0x0c, - 0x0e, - 0x50, - 0x31, - 0x32, - 0x54, - 0x65, - 0x73, - 0x74, - 0x2d, - 0x52, - 0x6f, - 0x6f, - 0x74, - 0x2d, - 0x41, - 0x30, - 0x1e, - 0x17, - 0x0d, - 0x31, - 0x39, - 0x30, - 0x39, - 0x33, - 0x30, - 0x30, - 0x30, - 0x34, - 0x36, - 0x35, - 0x36, - 0x5a, - 0x17, - 0x0d, - 0x32, - 0x39, - 0x30, - 0x39, - 0x32, - 0x37, - 0x30, - 0x30, - 0x34, - 0x36, - 0x35, - 0x36, - 0x5a, - 0x30, - 0x1b, - 0x31, - 0x19, - 0x30, - 0x17, - 0x06, - 0x03, - 0x55, - 0x04, - 0x03, - 0x0c, - 0x10, - 0x50, - 0x31, - 0x32, - 0x54, - 0x65, - 0x73, - 0x74, - 0x2d, - 0x53, - 0x65, - 0x72, - 0x76, - 0x65, - 0x72, - 0x2d, - 0x31, - 0x30, - 0x81, - 0x9f, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x01, - 0x05, - 0x00, - 0x03, - 0x81, - 0x8d, - 0x00, - 0x30, - 0x81, - 0x89, - 0x02, - 0x81, - 0x81, - 0x00, - 0xbc, - 0xdc, - 0x6f, - 0x8c, - 0x7a, - 0x2a, - 0x4b, - 0xea, - 0x66, - 0x66, - 0x04, - 0xa9, - 0x05, - 0x92, - 0x53, - 0xd7, - 0x13, - 0x3c, - 0x49, - 0xe1, - 0xc8, - 0xbb, - 0xdf, - 0x3d, - 0xcb, - 0x88, - 0x31, - 0x07, - 0x20, - 0x59, - 0x93, - 0x24, - 0x7f, - 0x7d, - 0xc6, - 0x84, - 0x81, - 0x16, - 0x64, - 0x4a, - 0x52, - 0xa6, - 0x30, - 0x44, - 0xdc, - 0x1a, - 0x30, - 0xde, - 0xae, - 0x29, - 0x18, - 0xcf, - 0xc7, - 0xf3, - 0xcf, - 0x0c, - 0xb7, - 0x8e, - 0x2b, - 0x1e, - 0x21, - 0x01, - 0x0b, - 0xfb, - 0xe5, - 0xe6, - 0xcf, - 0x2b, - 0x84, - 0xe1, - 0x33, - 0xf8, - 0xba, - 0x02, - 0xfc, - 0x30, - 0xfa, - 0xc4, - 0x33, - 0xc7, - 0x37, - 0xc6, - 0x7f, - 0x72, - 0x31, - 0x92, - 0x1d, - 0x8f, - 0xa0, - 0xfb, - 0xe5, - 0x4a, - 0x08, - 0x31, - 0x78, - 0x80, - 0x9c, - 0x23, - 0xb4, - 0xe9, - 0x19, - 0x56, - 0x04, - 0xfa, - 0x0d, - 0x07, - 0x04, - 0xb7, - 0x43, - 0xac, - 0x4c, - 0x49, - 0x7c, - 0xc2, - 0xa1, - 0x44, - 0xc1, - 0x48, - 0x7d, - 0x28, - 0xe5, - 0x23, - 0x66, - 0x07, - 0x22, - 0xd5, - 0xf0, - 0xf1, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0xa3, - 0x3b, - 0x30, - 0x39, - 0x30, - 0x1f, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x23, - 0x04, - 0x18, - 0x30, - 0x16, - 0x80, - 0x14, - 0xdb, - 0xbb, - 0xb8, - 0x92, - 0x4e, - 0x24, - 0x0b, - 0x1b, - 0xbb, - 0x78, - 0x33, - 0xf9, - 0x01, - 0x02, - 0x23, - 0x0d, - 0x96, - 0x18, - 0x30, - 0x47, - 0x30, - 0x09, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x13, - 0x04, - 0x02, - 0x30, - 0x00, - 0x30, - 0x0b, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x0f, - 0x04, - 0x04, - 0x03, - 0x02, - 0x04, - 0xf0, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x0b, - 0x05, - 0x00, - 0x03, - 0x81, - 0x81, - 0x00, - 0x1c, - 0x13, - 0xdc, - 0x02, - 0xf1, - 0x44, - 0x36, - 0x65, - 0xa9, - 0xbe, - 0x30, - 0x1c, - 0x66, - 0x14, - 0x20, - 0x86, - 0x5a, - 0xa8, - 0x69, - 0x25, - 0xf8, - 0x1a, - 0xb6, - 0x9e, - 0x5e, - 0xe9, - 0x89, - 0xb8, - 0x67, - 0x70, - 0x19, - 0x87, - 0x60, - 0xeb, - 0x4b, - 0x11, - 0x71, - 0x85, - 0xf8, - 0xe9, - 0xa7, - 0x3e, - 0x20, - 0x42, - 0xec, - 0x43, - 0x25, - 0x01, - 0x03, - 0xe5, - 0x4d, - 0x83, - 0x22, - 0xf5, - 0x8e, - 0x3a, - 0x1a, - 0x1b, - 0xd4, - 0x1c, - 0xda, - 0x6b, - 0x9d, - 0x10, - 0x1b, - 0xee, - 0x67, - 0x4e, - 0x1f, - 0x69, - 0xab, - 0xbc, - 0xaa, - 0x62, - 0x8e, - 0x9e, - 0xc6, - 0xee, - 0xd6, - 0x09, - 0xc0, - 0xca, - 0xe0, - 0xaa, - 0x9f, - 0x07, - 0xb2, - 0xc2, - 0xbb, - 0x31, - 0x96, - 0xa2, - 0x04, - 0x62, - 0xd3, - 0x13, - 0x32, - 0x29, - 0x67, - 0x6e, - 0xad, - 0x2e, - 0x0b, - 0xea, - 0x04, - 0x7c, - 0x8c, - 0x5a, - 0x5d, - 0xac, - 0x14, - 0xaa, - 0x61, - 0x7f, - 0x28, - 0x6c, - 0x2d, - 0x64, - 0x2d, - 0xc3, - 0xaf, - 0x77, - 0x52, - 0x90, - 0xb4, - 0x37, - 0xc0, - 0x30, + 0x30, 0x82, 0x01, 0xed, 0x30, 0x82, 0x01, 0x56, 0xa0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0x8b, 0x4b, 0x5e, 0x6c, + 0x03, 0x28, 0x4e, 0xe6, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, + 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, + 0x19, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x03, + 0x0c, 0x0e, 0x50, 0x31, 0x32, 0x54, 0x65, 0x73, 0x74, 0x2d, + 0x52, 0x6f, 0x6f, 0x74, 0x2d, 0x41, 0x30, 0x1e, 0x17, 0x0d, + 0x31, 0x39, 0x30, 0x39, 0x33, 0x30, 0x30, 0x30, 0x34, 0x36, + 0x35, 0x36, 0x5a, 0x17, 0x0d, 0x32, 0x39, 0x30, 0x39, 0x32, + 0x37, 0x30, 0x30, 0x34, 0x36, 0x35, 0x36, 0x5a, 0x30, 0x1b, + 0x31, 0x19, 0x30, 0x17, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, + 0x10, 0x50, 0x31, 0x32, 0x54, 0x65, 0x73, 0x74, 0x2d, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2d, 0x31, 0x30, 0x81, 0x9f, + 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, + 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xbc, 0xdc, 0x6f, 0x8c, + 0x7a, 0x2a, 0x4b, 0xea, 0x66, 0x66, 0x04, 0xa9, 0x05, 0x92, + 0x53, 0xd7, 0x13, 0x3c, 0x49, 0xe1, 0xc8, 0xbb, 0xdf, 0x3d, + 0xcb, 0x88, 0x31, 0x07, 0x20, 0x59, 0x93, 0x24, 0x7f, 0x7d, + 0xc6, 0x84, 0x81, 0x16, 0x64, 0x4a, 0x52, 0xa6, 0x30, 0x44, + 0xdc, 0x1a, 0x30, 0xde, 0xae, 0x29, 0x18, 0xcf, 0xc7, 0xf3, + 0xcf, 0x0c, 0xb7, 0x8e, 0x2b, 0x1e, 0x21, 0x01, 0x0b, 0xfb, + 0xe5, 0xe6, 0xcf, 0x2b, 0x84, 0xe1, 0x33, 0xf8, 0xba, 0x02, + 0xfc, 0x30, 0xfa, 0xc4, 0x33, 0xc7, 0x37, 0xc6, 0x7f, 0x72, + 0x31, 0x92, 0x1d, 0x8f, 0xa0, 0xfb, 0xe5, 0x4a, 0x08, 0x31, + 0x78, 0x80, 0x9c, 0x23, 0xb4, 0xe9, 0x19, 0x56, 0x04, 0xfa, + 0x0d, 0x07, 0x04, 0xb7, 0x43, 0xac, 0x4c, 0x49, 0x7c, 0xc2, + 0xa1, 0x44, 0xc1, 0x48, 0x7d, 0x28, 0xe5, 0x23, 0x66, 0x07, + 0x22, 0xd5, 0xf0, 0xf1, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, + 0x3b, 0x30, 0x39, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, + 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xdb, 0xbb, 0xb8, 0x92, + 0x4e, 0x24, 0x0b, 0x1b, 0xbb, 0x78, 0x33, 0xf9, 0x01, 0x02, + 0x23, 0x0d, 0x96, 0x18, 0x30, 0x47, 0x30, 0x09, 0x06, 0x03, + 0x55, 0x1d, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, + 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x04, 0xf0, + 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x1c, + 0x13, 0xdc, 0x02, 0xf1, 0x44, 0x36, 0x65, 0xa9, 0xbe, 0x30, + 0x1c, 0x66, 0x14, 0x20, 0x86, 0x5a, 0xa8, 0x69, 0x25, 0xf8, + 0x1a, 0xb6, 0x9e, 0x5e, 0xe9, 0x89, 0xb8, 0x67, 0x70, 0x19, + 0x87, 0x60, 0xeb, 0x4b, 0x11, 0x71, 0x85, 0xf8, 0xe9, 0xa7, + 0x3e, 0x20, 0x42, 0xec, 0x43, 0x25, 0x01, 0x03, 0xe5, 0x4d, + 0x83, 0x22, 0xf5, 0x8e, 0x3a, 0x1a, 0x1b, 0xd4, 0x1c, 0xda, + 0x6b, 0x9d, 0x10, 0x1b, 0xee, 0x67, 0x4e, 0x1f, 0x69, 0xab, + 0xbc, 0xaa, 0x62, 0x8e, 0x9e, 0xc6, 0xee, 0xd6, 0x09, 0xc0, + 0xca, 0xe0, 0xaa, 0x9f, 0x07, 0xb2, 0xc2, 0xbb, 0x31, 0x96, + 0xa2, 0x04, 0x62, 0xd3, 0x13, 0x32, 0x29, 0x67, 0x6e, 0xad, + 0x2e, 0x0b, 0xea, 0x04, 0x7c, 0x8c, 0x5a, 0x5d, 0xac, 0x14, + 0xaa, 0x61, 0x7f, 0x28, 0x6c, 0x2d, 0x64, 0x2d, 0xc3, 0xaf, + 0x77, 0x52, 0x90, 0xb4, 0x37, 0xc0, 0x30 }; static const unsigned char CERT2[] = { - 0x30, - 0x82, - 0x01, - 0xed, - 0x30, - 0x82, - 0x01, - 0x56, - 0xa0, - 0x03, - 0x02, - 0x01, - 0x02, - 0x02, - 0x09, - 0x00, - 0x8b, - 0x4b, - 0x5e, - 0x6c, - 0x03, - 0x28, - 0x4e, - 0xe7, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x0b, - 0x05, - 0x00, - 0x30, - 0x19, - 0x31, - 0x17, - 0x30, - 0x15, - 0x06, - 0x03, - 0x55, - 0x04, - 0x03, - 0x0c, - 0x0e, - 0x50, - 0x31, - 0x32, - 0x54, - 0x65, - 0x73, - 0x74, - 0x2d, - 0x52, - 0x6f, - 0x6f, - 0x74, - 0x2d, - 0x41, - 0x30, - 0x1e, - 0x17, - 0x0d, - 0x31, - 0x39, - 0x30, - 0x39, - 0x33, - 0x30, - 0x30, - 0x30, - 0x34, - 0x36, - 0x35, - 0x36, - 0x5a, - 0x17, - 0x0d, - 0x32, - 0x39, - 0x30, - 0x39, - 0x32, - 0x37, - 0x30, - 0x30, - 0x34, - 0x36, - 0x35, - 0x36, - 0x5a, - 0x30, - 0x1b, - 0x31, - 0x19, - 0x30, - 0x17, - 0x06, - 0x03, - 0x55, - 0x04, - 0x03, - 0x0c, - 0x10, - 0x50, - 0x31, - 0x32, - 0x54, - 0x65, - 0x73, - 0x74, - 0x2d, - 0x43, - 0x6c, - 0x69, - 0x65, - 0x6e, - 0x74, - 0x2d, - 0x31, - 0x30, - 0x81, - 0x9f, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x01, - 0x05, - 0x00, - 0x03, - 0x81, - 0x8d, - 0x00, - 0x30, - 0x81, - 0x89, - 0x02, - 0x81, - 0x81, - 0x00, - 0xa8, - 0x6e, - 0x40, - 0x86, - 0x9f, - 0x98, - 0x59, - 0xfb, - 0x57, - 0xbf, - 0xc1, - 0x55, - 0x12, - 0x38, - 0xeb, - 0xb3, - 0x46, - 0x34, - 0xc9, - 0x35, - 0x4d, - 0xfd, - 0x03, - 0xe9, - 0x3a, - 0x88, - 0x9e, - 0x97, - 0x8f, - 0xf4, - 0xec, - 0x36, - 0x7b, - 0x3f, - 0xba, - 0xb8, - 0xa5, - 0x96, - 0x30, - 0x03, - 0xc5, - 0xc6, - 0xd9, - 0xa8, - 0x4e, - 0xbc, - 0x23, - 0x51, - 0xa1, - 0x96, - 0xd2, - 0x03, - 0x98, - 0x73, - 0xb6, - 0x17, - 0x9c, - 0x77, - 0xd4, - 0x95, - 0x1e, - 0x1b, - 0xb3, - 0x1b, - 0xc8, - 0x71, - 0xd1, - 0x2e, - 0x31, - 0xc7, - 0x6a, - 0x75, - 0x57, - 0x08, - 0x7f, - 0xba, - 0x70, - 0x76, - 0xf7, - 0x67, - 0xf4, - 0x4e, - 0xbe, - 0xfc, - 0x70, - 0x61, - 0x41, - 0x07, - 0x2b, - 0x7c, - 0x3c, - 0x3b, - 0xb3, - 0xbc, - 0xd5, - 0xa8, - 0xbd, - 0x28, - 0xd8, - 0x49, - 0xd3, - 0xe1, - 0x78, - 0xc8, - 0xc1, - 0x42, - 0x5e, - 0x18, - 0x36, - 0xa8, - 0x41, - 0xf7, - 0xc8, - 0xaa, - 0x35, - 0xfe, - 0x2d, - 0xd1, - 0xb4, - 0xcc, - 0x00, - 0x67, - 0xae, - 0x79, - 0xd3, - 0x28, - 0xd5, - 0x5b, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0xa3, - 0x3b, - 0x30, - 0x39, - 0x30, - 0x1f, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x23, - 0x04, - 0x18, - 0x30, - 0x16, - 0x80, - 0x14, - 0xdb, - 0xbb, - 0xb8, - 0x92, - 0x4e, - 0x24, - 0x0b, - 0x1b, - 0xbb, - 0x78, - 0x33, - 0xf9, - 0x01, - 0x02, - 0x23, - 0x0d, - 0x96, - 0x18, - 0x30, - 0x47, - 0x30, - 0x09, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x13, - 0x04, - 0x02, - 0x30, - 0x00, - 0x30, - 0x0b, - 0x06, - 0x03, - 0x55, - 0x1d, - 0x0f, - 0x04, - 0x04, - 0x03, - 0x02, - 0x04, - 0xf0, - 0x30, - 0x0d, - 0x06, - 0x09, - 0x2a, - 0x86, - 0x48, - 0x86, - 0xf7, - 0x0d, - 0x01, - 0x01, - 0x0b, - 0x05, - 0x00, - 0x03, - 0x81, - 0x81, - 0x00, - 0x3b, - 0xa6, - 0x73, - 0xbe, - 0xe0, - 0x28, - 0xed, - 0x1f, - 0x29, - 0x78, - 0x4c, - 0xc0, - 0x1f, - 0xe9, - 0x85, - 0xc6, - 0x8f, - 0xe3, - 0x87, - 0x7c, - 0xd9, - 0xe7, - 0x0a, - 0x37, - 0xe8, - 0xaa, - 0xb5, - 0xd2, - 0x7f, - 0xf8, - 0x90, - 0x20, - 0x80, - 0x35, - 0xa7, - 0x79, - 0x2b, - 0x04, - 0xa7, - 0xbf, - 0xe6, - 0x7b, - 0x58, - 0xcb, - 0xec, - 0x0e, - 0x58, - 0xef, - 0x2a, - 0x70, - 0x8a, - 0x56, - 0x8a, - 0xcf, - 0x6b, - 0x7a, - 0x74, - 0x0c, - 0xf4, - 0x15, - 0x37, - 0x93, - 0xcd, - 0xe6, - 0xb2, - 0xa1, - 0x83, - 0x09, - 0xdb, - 0x9e, - 0x4f, - 0xff, - 0x6a, - 0x17, - 0x4f, - 0x33, - 0xc9, - 0xcc, - 0x90, - 0x2a, - 0x67, - 0xff, - 0x16, - 0x78, - 0xa8, - 0x2c, - 0x10, - 0xe0, - 0x52, - 0x8c, - 0xe6, - 0xe9, - 0x90, - 0x8d, - 0xe0, - 0x62, - 0x04, - 0x9a, - 0x0f, - 0x44, - 0x01, - 0x82, - 0x14, - 0x92, - 0x44, - 0x25, - 0x69, - 0x22, - 0xb7, - 0xb8, - 0xc5, - 0x94, - 0x4c, - 0x4b, - 0x1c, - 0x9b, - 0x92, - 0x60, - 0x66, - 0x90, - 0x4e, - 0xb9, - 0xa8, - 0x4c, - 0x89, - 0xbb, - 0x0f, - 0x0b, + 0x30, 0x82, 0x01, 0xed, 0x30, 0x82, 0x01, 0x56, 0xa0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0x8b, 0x4b, 0x5e, 0x6c, + 0x03, 0x28, 0x4e, 0xe7, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, + 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, + 0x19, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x03, + 0x0c, 0x0e, 0x50, 0x31, 0x32, 0x54, 0x65, 0x73, 0x74, 0x2d, + 0x52, 0x6f, 0x6f, 0x74, 0x2d, 0x41, 0x30, 0x1e, 0x17, 0x0d, + 0x31, 0x39, 0x30, 0x39, 0x33, 0x30, 0x30, 0x30, 0x34, 0x36, + 0x35, 0x36, 0x5a, 0x17, 0x0d, 0x32, 0x39, 0x30, 0x39, 0x32, + 0x37, 0x30, 0x30, 0x34, 0x36, 0x35, 0x36, 0x5a, 0x30, 0x1b, + 0x31, 0x19, 0x30, 0x17, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, + 0x10, 0x50, 0x31, 0x32, 0x54, 0x65, 0x73, 0x74, 0x2d, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x31, 0x30, 0x81, 0x9f, + 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, + 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xa8, 0x6e, 0x40, 0x86, + 0x9f, 0x98, 0x59, 0xfb, 0x57, 0xbf, 0xc1, 0x55, 0x12, 0x38, + 0xeb, 0xb3, 0x46, 0x34, 0xc9, 0x35, 0x4d, 0xfd, 0x03, 0xe9, + 0x3a, 0x88, 0x9e, 0x97, 0x8f, 0xf4, 0xec, 0x36, 0x7b, 0x3f, + 0xba, 0xb8, 0xa5, 0x96, 0x30, 0x03, 0xc5, 0xc6, 0xd9, 0xa8, + 0x4e, 0xbc, 0x23, 0x51, 0xa1, 0x96, 0xd2, 0x03, 0x98, 0x73, + 0xb6, 0x17, 0x9c, 0x77, 0xd4, 0x95, 0x1e, 0x1b, 0xb3, 0x1b, + 0xc8, 0x71, 0xd1, 0x2e, 0x31, 0xc7, 0x6a, 0x75, 0x57, 0x08, + 0x7f, 0xba, 0x70, 0x76, 0xf7, 0x67, 0xf4, 0x4e, 0xbe, 0xfc, + 0x70, 0x61, 0x41, 0x07, 0x2b, 0x7c, 0x3c, 0x3b, 0xb3, 0xbc, + 0xd5, 0xa8, 0xbd, 0x28, 0xd8, 0x49, 0xd3, 0xe1, 0x78, 0xc8, + 0xc1, 0x42, 0x5e, 0x18, 0x36, 0xa8, 0x41, 0xf7, 0xc8, 0xaa, + 0x35, 0xfe, 0x2d, 0xd1, 0xb4, 0xcc, 0x00, 0x67, 0xae, 0x79, + 0xd3, 0x28, 0xd5, 0x5b, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, + 0x3b, 0x30, 0x39, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, + 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xdb, 0xbb, 0xb8, 0x92, + 0x4e, 0x24, 0x0b, 0x1b, 0xbb, 0x78, 0x33, 0xf9, 0x01, 0x02, + 0x23, 0x0d, 0x96, 0x18, 0x30, 0x47, 0x30, 0x09, 0x06, 0x03, + 0x55, 0x1d, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, + 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x04, 0xf0, + 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, + 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x3b, + 0xa6, 0x73, 0xbe, 0xe0, 0x28, 0xed, 0x1f, 0x29, 0x78, 0x4c, + 0xc0, 0x1f, 0xe9, 0x85, 0xc6, 0x8f, 0xe3, 0x87, 0x7c, 0xd9, + 0xe7, 0x0a, 0x37, 0xe8, 0xaa, 0xb5, 0xd2, 0x7f, 0xf8, 0x90, + 0x20, 0x80, 0x35, 0xa7, 0x79, 0x2b, 0x04, 0xa7, 0xbf, 0xe6, + 0x7b, 0x58, 0xcb, 0xec, 0x0e, 0x58, 0xef, 0x2a, 0x70, 0x8a, + 0x56, 0x8a, 0xcf, 0x6b, 0x7a, 0x74, 0x0c, 0xf4, 0x15, 0x37, + 0x93, 0xcd, 0xe6, 0xb2, 0xa1, 0x83, 0x09, 0xdb, 0x9e, 0x4f, + 0xff, 0x6a, 0x17, 0x4f, 0x33, 0xc9, 0xcc, 0x90, 0x2a, 0x67, + 0xff, 0x16, 0x78, 0xa8, 0x2c, 0x10, 0xe0, 0x52, 0x8c, 0xe6, + 0xe9, 0x90, 0x8d, 0xe0, 0x62, 0x04, 0x9a, 0x0f, 0x44, 0x01, + 0x82, 0x14, 0x92, 0x44, 0x25, 0x69, 0x22, 0xb7, 0xb8, 0xc5, + 0x94, 0x4c, 0x4b, 0x1c, 0x9b, 0x92, 0x60, 0x66, 0x90, 0x4e, + 0xb9, 0xa8, 0x4c, 0x89, 0xbb, 0x0f, 0x0b }; static const unsigned char KEY1[] = { - 0x30, - 0x82, - 0x02, - 0x5d, - 0x02, - 0x01, - 0x00, - 0x02, - 0x81, - 0x81, - 0x00, - 0xbc, - 0xdc, - 0x6f, - 0x8c, - 0x7a, - 0x2a, - 0x4b, - 0xea, - 0x66, - 0x66, - 0x04, - 0xa9, - 0x05, - 0x92, - 0x53, - 0xd7, - 0x13, - 0x3c, - 0x49, - 0xe1, - 0xc8, - 0xbb, - 0xdf, - 0x3d, - 0xcb, - 0x88, - 0x31, - 0x07, - 0x20, - 0x59, - 0x93, - 0x24, - 0x7f, - 0x7d, - 0xc6, - 0x84, - 0x81, - 0x16, - 0x64, - 0x4a, - 0x52, - 0xa6, - 0x30, - 0x44, - 0xdc, - 0x1a, - 0x30, - 0xde, - 0xae, - 0x29, - 0x18, - 0xcf, - 0xc7, - 0xf3, - 0xcf, - 0x0c, - 0xb7, - 0x8e, - 0x2b, - 0x1e, - 0x21, - 0x01, - 0x0b, - 0xfb, - 0xe5, - 0xe6, - 0xcf, - 0x2b, - 0x84, - 0xe1, - 0x33, - 0xf8, - 0xba, - 0x02, - 0xfc, - 0x30, - 0xfa, - 0xc4, - 0x33, - 0xc7, - 0x37, - 0xc6, - 0x7f, - 0x72, - 0x31, - 0x92, - 0x1d, - 0x8f, - 0xa0, - 0xfb, - 0xe5, - 0x4a, - 0x08, - 0x31, - 0x78, - 0x80, - 0x9c, - 0x23, - 0xb4, - 0xe9, - 0x19, - 0x56, - 0x04, - 0xfa, - 0x0d, - 0x07, - 0x04, - 0xb7, - 0x43, - 0xac, - 0x4c, - 0x49, - 0x7c, - 0xc2, - 0xa1, - 0x44, - 0xc1, - 0x48, - 0x7d, - 0x28, - 0xe5, - 0x23, - 0x66, - 0x07, - 0x22, - 0xd5, - 0xf0, - 0xf1, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x81, - 0x81, - 0x00, - 0xa5, - 0x6d, - 0xf9, - 0x8f, - 0xf5, - 0x5a, - 0xa3, - 0x50, - 0xd9, - 0x0d, - 0x37, - 0xbb, - 0xce, - 0x13, - 0x94, - 0xb8, - 0xea, - 0x32, - 0x7f, - 0x0c, - 0xf5, - 0x46, - 0x0b, - 0x90, - 0x17, - 0x7e, - 0x5e, - 0x63, - 0xbd, - 0xa4, - 0x78, - 0xcd, - 0x19, - 0x97, - 0xd4, - 0x92, - 0x30, - 0x78, - 0xaa, - 0xb4, - 0xa7, - 0x9c, - 0xc6, - 0xdf, - 0x2a, - 0x65, - 0x0e, - 0xb5, - 0x9f, - 0x9c, - 0x84, - 0x0d, - 0x4d, - 0x3a, - 0x74, - 0xfc, - 0xd0, - 0xb4, - 0x09, - 0x74, - 0xc4, - 0xb8, - 0x24, - 0x03, - 0xa8, - 0xf0, - 0xf8, - 0x0d, - 0x5c, - 0x8e, - 0xdf, - 0x4b, - 0xe1, - 0x0a, - 0x8f, - 0x4f, - 0xd5, - 0xc7, - 0x9b, - 0x54, - 0x55, - 0x8f, - 0x00, - 0x5c, - 0xea, - 0x4c, - 0x73, - 0xf9, - 0x1b, - 0xbf, - 0xb8, - 0x93, - 0x33, - 0x20, - 0xce, - 0x45, - 0xd9, - 0x03, - 0x02, - 0xb2, - 0x36, - 0xc5, - 0x0a, - 0x30, - 0x50, - 0x78, - 0x80, - 0x66, - 0x00, - 0x22, - 0x38, - 0x86, - 0xcf, - 0x63, - 0x4a, - 0x5c, - 0xbf, - 0x2b, - 0xd9, - 0x6e, - 0xe6, - 0xf0, - 0x39, - 0xad, - 0x12, - 0x25, - 0x41, - 0xb9, - 0x02, - 0x41, - 0x00, - 0xf3, - 0x7c, - 0x07, - 0x99, - 0x64, - 0x3a, - 0x28, - 0x8c, - 0x8d, - 0x05, - 0xfe, - 0x32, - 0xb5, - 0x4c, - 0x8c, - 0x6d, - 0xde, - 0x3d, - 0x16, - 0x08, - 0xa0, - 0x01, - 0x61, - 0x4f, - 0x8e, - 0xa0, - 0xf7, - 0x26, - 0x26, - 0xb5, - 0x8e, - 0xc0, - 0x7a, - 0xce, - 0x86, - 0x34, - 0xde, - 0xb8, - 0xef, - 0x86, - 0x01, - 0xbe, - 0x24, - 0xaa, - 0x9b, - 0x36, - 0x93, - 0x72, - 0x9b, - 0xf9, - 0xc6, - 0xcb, - 0x76, - 0x84, - 0x67, - 0x06, - 0x06, - 0x30, - 0x50, - 0xdf, - 0x42, - 0x17, - 0xe0, - 0xa7, - 0x02, - 0x41, - 0x00, - 0xc6, - 0x91, - 0xa0, - 0x41, - 0x34, - 0x11, - 0x67, - 0x4b, - 0x08, - 0x0f, - 0xda, - 0xa7, - 0x99, - 0xec, - 0x58, - 0x11, - 0xa5, - 0x82, - 0xdb, - 0x50, - 0xfe, - 0x77, - 0xe2, - 0xd1, - 0x53, - 0x9c, - 0x7d, - 0xe8, - 0xbf, - 0xe7, - 0x7c, - 0xa9, - 0x01, - 0xb1, - 0x87, - 0xc3, - 0x52, - 0x79, - 0x9e, - 0x2c, - 0xa7, - 0x6f, - 0x02, - 0x37, - 0x32, - 0xef, - 0x24, - 0x31, - 0x21, - 0x0b, - 0x86, - 0x05, - 0x32, - 0x4a, - 0x2e, - 0x0b, - 0x65, - 0x05, - 0xd3, - 0xd6, - 0x30, - 0xb2, - 0xfc, - 0xa7, - 0x02, - 0x41, - 0x00, - 0xc2, - 0xed, - 0x31, - 0xdc, - 0x40, - 0x9c, - 0x3a, - 0xe8, - 0x42, - 0xe2, - 0x60, - 0x5e, - 0x52, - 0x3c, - 0xc5, - 0x54, - 0x14, - 0x0e, - 0x8d, - 0x7c, - 0x3c, - 0x34, - 0xbe, - 0xa6, - 0x05, - 0x86, - 0xa2, - 0x36, - 0x5d, - 0xd9, - 0x0e, - 0x3e, - 0xd4, - 0x52, - 0x50, - 0xa9, - 0x35, - 0x01, - 0x93, - 0x68, - 0x92, - 0x2e, - 0x9a, - 0x86, - 0x27, - 0x1a, - 0xab, - 0x32, - 0x9e, - 0xe2, - 0x79, - 0x9f, - 0x5b, - 0xf3, - 0xa5, - 0xd2, - 0xf1, - 0xd3, - 0x6e, - 0x7b, - 0x3e, - 0x1b, - 0x85, - 0x93, - 0x02, - 0x40, - 0x68, - 0xb8, - 0xb6, - 0x7e, - 0x8c, - 0xba, - 0x3c, - 0xf2, - 0x8a, - 0x2e, - 0xea, - 0x4f, - 0x07, - 0xd3, - 0x68, - 0x62, - 0xee, - 0x1a, - 0x04, - 0x16, - 0x44, - 0x0d, - 0xef, - 0xf6, - 0x1b, - 0x95, - 0x65, - 0xa5, - 0xd1, - 0x47, - 0x81, - 0x2c, - 0x14, - 0xb3, - 0x8e, - 0xf9, - 0x08, - 0xcf, - 0x11, - 0x07, - 0x55, - 0xca, - 0x2a, - 0xad, - 0xf7, - 0xd3, - 0xbd, - 0x0f, - 0x97, - 0xf0, - 0xde, - 0xde, - 0x70, - 0xb6, - 0x44, - 0x70, - 0x47, - 0xf7, - 0xf9, - 0xcf, - 0x75, - 0x61, - 0x7f, - 0xf3, - 0x02, - 0x40, - 0x38, - 0x4a, - 0x67, - 0xaf, - 0xae, - 0xb6, - 0xb2, - 0x6a, - 0x00, - 0x25, - 0x5a, - 0xa4, - 0x65, - 0x20, - 0xb1, - 0x13, - 0xbd, - 0x83, - 0xff, - 0xb4, - 0xbc, - 0xf4, - 0xdd, - 0xa1, - 0xbb, - 0x1c, - 0x96, - 0x37, - 0x35, - 0xf4, - 0xbf, - 0xed, - 0x4c, - 0xed, - 0x92, - 0xe8, - 0xac, - 0xc9, - 0xc1, - 0xa5, - 0xa3, - 0x23, - 0x66, - 0x40, - 0x8a, - 0xa1, - 0xe6, - 0xe3, - 0x95, - 0xfe, - 0xc4, - 0x53, - 0xf5, - 0x7d, - 0x6e, - 0xca, - 0x45, - 0x42, - 0xe4, - 0xc2, - 0x9f, - 0xe5, - 0x1e, - 0xb5, + 0x30, 0x82, 0x02, 0x5d, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, + 0x00, 0xbc, 0xdc, 0x6f, 0x8c, 0x7a, 0x2a, 0x4b, 0xea, 0x66, + 0x66, 0x04, 0xa9, 0x05, 0x92, 0x53, 0xd7, 0x13, 0x3c, 0x49, + 0xe1, 0xc8, 0xbb, 0xdf, 0x3d, 0xcb, 0x88, 0x31, 0x07, 0x20, + 0x59, 0x93, 0x24, 0x7f, 0x7d, 0xc6, 0x84, 0x81, 0x16, 0x64, + 0x4a, 0x52, 0xa6, 0x30, 0x44, 0xdc, 0x1a, 0x30, 0xde, 0xae, + 0x29, 0x18, 0xcf, 0xc7, 0xf3, 0xcf, 0x0c, 0xb7, 0x8e, 0x2b, + 0x1e, 0x21, 0x01, 0x0b, 0xfb, 0xe5, 0xe6, 0xcf, 0x2b, 0x84, + 0xe1, 0x33, 0xf8, 0xba, 0x02, 0xfc, 0x30, 0xfa, 0xc4, 0x33, + 0xc7, 0x37, 0xc6, 0x7f, 0x72, 0x31, 0x92, 0x1d, 0x8f, 0xa0, + 0xfb, 0xe5, 0x4a, 0x08, 0x31, 0x78, 0x80, 0x9c, 0x23, 0xb4, + 0xe9, 0x19, 0x56, 0x04, 0xfa, 0x0d, 0x07, 0x04, 0xb7, 0x43, + 0xac, 0x4c, 0x49, 0x7c, 0xc2, 0xa1, 0x44, 0xc1, 0x48, 0x7d, + 0x28, 0xe5, 0x23, 0x66, 0x07, 0x22, 0xd5, 0xf0, 0xf1, 0x02, + 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x81, 0x00, 0xa5, 0x6d, + 0xf9, 0x8f, 0xf5, 0x5a, 0xa3, 0x50, 0xd9, 0x0d, 0x37, 0xbb, + 0xce, 0x13, 0x94, 0xb8, 0xea, 0x32, 0x7f, 0x0c, 0xf5, 0x46, + 0x0b, 0x90, 0x17, 0x7e, 0x5e, 0x63, 0xbd, 0xa4, 0x78, 0xcd, + 0x19, 0x97, 0xd4, 0x92, 0x30, 0x78, 0xaa, 0xb4, 0xa7, 0x9c, + 0xc6, 0xdf, 0x2a, 0x65, 0x0e, 0xb5, 0x9f, 0x9c, 0x84, 0x0d, + 0x4d, 0x3a, 0x74, 0xfc, 0xd0, 0xb4, 0x09, 0x74, 0xc4, 0xb8, + 0x24, 0x03, 0xa8, 0xf0, 0xf8, 0x0d, 0x5c, 0x8e, 0xdf, 0x4b, + 0xe1, 0x0a, 0x8f, 0x4f, 0xd5, 0xc7, 0x9b, 0x54, 0x55, 0x8f, + 0x00, 0x5c, 0xea, 0x4c, 0x73, 0xf9, 0x1b, 0xbf, 0xb8, 0x93, + 0x33, 0x20, 0xce, 0x45, 0xd9, 0x03, 0x02, 0xb2, 0x36, 0xc5, + 0x0a, 0x30, 0x50, 0x78, 0x80, 0x66, 0x00, 0x22, 0x38, 0x86, + 0xcf, 0x63, 0x4a, 0x5c, 0xbf, 0x2b, 0xd9, 0x6e, 0xe6, 0xf0, + 0x39, 0xad, 0x12, 0x25, 0x41, 0xb9, 0x02, 0x41, 0x00, 0xf3, + 0x7c, 0x07, 0x99, 0x64, 0x3a, 0x28, 0x8c, 0x8d, 0x05, 0xfe, + 0x32, 0xb5, 0x4c, 0x8c, 0x6d, 0xde, 0x3d, 0x16, 0x08, 0xa0, + 0x01, 0x61, 0x4f, 0x8e, 0xa0, 0xf7, 0x26, 0x26, 0xb5, 0x8e, + 0xc0, 0x7a, 0xce, 0x86, 0x34, 0xde, 0xb8, 0xef, 0x86, 0x01, + 0xbe, 0x24, 0xaa, 0x9b, 0x36, 0x93, 0x72, 0x9b, 0xf9, 0xc6, + 0xcb, 0x76, 0x84, 0x67, 0x06, 0x06, 0x30, 0x50, 0xdf, 0x42, + 0x17, 0xe0, 0xa7, 0x02, 0x41, 0x00, 0xc6, 0x91, 0xa0, 0x41, + 0x34, 0x11, 0x67, 0x4b, 0x08, 0x0f, 0xda, 0xa7, 0x99, 0xec, + 0x58, 0x11, 0xa5, 0x82, 0xdb, 0x50, 0xfe, 0x77, 0xe2, 0xd1, + 0x53, 0x9c, 0x7d, 0xe8, 0xbf, 0xe7, 0x7c, 0xa9, 0x01, 0xb1, + 0x87, 0xc3, 0x52, 0x79, 0x9e, 0x2c, 0xa7, 0x6f, 0x02, 0x37, + 0x32, 0xef, 0x24, 0x31, 0x21, 0x0b, 0x86, 0x05, 0x32, 0x4a, + 0x2e, 0x0b, 0x65, 0x05, 0xd3, 0xd6, 0x30, 0xb2, 0xfc, 0xa7, + 0x02, 0x41, 0x00, 0xc2, 0xed, 0x31, 0xdc, 0x40, 0x9c, 0x3a, + 0xe8, 0x42, 0xe2, 0x60, 0x5e, 0x52, 0x3c, 0xc5, 0x54, 0x14, + 0x0e, 0x8d, 0x7c, 0x3c, 0x34, 0xbe, 0xa6, 0x05, 0x86, 0xa2, + 0x36, 0x5d, 0xd9, 0x0e, 0x3e, 0xd4, 0x52, 0x50, 0xa9, 0x35, + 0x01, 0x93, 0x68, 0x92, 0x2e, 0x9a, 0x86, 0x27, 0x1a, 0xab, + 0x32, 0x9e, 0xe2, 0x79, 0x9f, 0x5b, 0xf3, 0xa5, 0xd2, 0xf1, + 0xd3, 0x6e, 0x7b, 0x3e, 0x1b, 0x85, 0x93, 0x02, 0x40, 0x68, + 0xb8, 0xb6, 0x7e, 0x8c, 0xba, 0x3c, 0xf2, 0x8a, 0x2e, 0xea, + 0x4f, 0x07, 0xd3, 0x68, 0x62, 0xee, 0x1a, 0x04, 0x16, 0x44, + 0x0d, 0xef, 0xf6, 0x1b, 0x95, 0x65, 0xa5, 0xd1, 0x47, 0x81, + 0x2c, 0x14, 0xb3, 0x8e, 0xf9, 0x08, 0xcf, 0x11, 0x07, 0x55, + 0xca, 0x2a, 0xad, 0xf7, 0xd3, 0xbd, 0x0f, 0x97, 0xf0, 0xde, + 0xde, 0x70, 0xb6, 0x44, 0x70, 0x47, 0xf7, 0xf9, 0xcf, 0x75, + 0x61, 0x7f, 0xf3, 0x02, 0x40, 0x38, 0x4a, 0x67, 0xaf, 0xae, + 0xb6, 0xb2, 0x6a, 0x00, 0x25, 0x5a, 0xa4, 0x65, 0x20, 0xb1, + 0x13, 0xbd, 0x83, 0xff, 0xb4, 0xbc, 0xf4, 0xdd, 0xa1, 0xbb, + 0x1c, 0x96, 0x37, 0x35, 0xf4, 0xbf, 0xed, 0x4c, 0xed, 0x92, + 0xe8, 0xac, 0xc9, 0xc1, 0xa5, 0xa3, 0x23, 0x66, 0x40, 0x8a, + 0xa1, 0xe6, 0xe3, 0x95, 0xfe, 0xc4, 0x53, 0xf5, 0x7d, 0x6e, + 0xca, 0x45, 0x42, 0xe4, 0xc2, 0x9f, 0xe5, 0x1e, 0xb5 }; static const unsigned char KEY2[] = { - 0x30, - 0x82, - 0x02, - 0x5c, - 0x02, - 0x01, - 0x00, - 0x02, - 0x81, - 0x81, - 0x00, - 0xa8, - 0x6e, - 0x40, - 0x86, - 0x9f, - 0x98, - 0x59, - 0xfb, - 0x57, - 0xbf, - 0xc1, - 0x55, - 0x12, - 0x38, - 0xeb, - 0xb3, - 0x46, - 0x34, - 0xc9, - 0x35, - 0x4d, - 0xfd, - 0x03, - 0xe9, - 0x3a, - 0x88, - 0x9e, - 0x97, - 0x8f, - 0xf4, - 0xec, - 0x36, - 0x7b, - 0x3f, - 0xba, - 0xb8, - 0xa5, - 0x96, - 0x30, - 0x03, - 0xc5, - 0xc6, - 0xd9, - 0xa8, - 0x4e, - 0xbc, - 0x23, - 0x51, - 0xa1, - 0x96, - 0xd2, - 0x03, - 0x98, - 0x73, - 0xb6, - 0x17, - 0x9c, - 0x77, - 0xd4, - 0x95, - 0x1e, - 0x1b, - 0xb3, - 0x1b, - 0xc8, - 0x71, - 0xd1, - 0x2e, - 0x31, - 0xc7, - 0x6a, - 0x75, - 0x57, - 0x08, - 0x7f, - 0xba, - 0x70, - 0x76, - 0xf7, - 0x67, - 0xf4, - 0x4e, - 0xbe, - 0xfc, - 0x70, - 0x61, - 0x41, - 0x07, - 0x2b, - 0x7c, - 0x3c, - 0x3b, - 0xb3, - 0xbc, - 0xd5, - 0xa8, - 0xbd, - 0x28, - 0xd8, - 0x49, - 0xd3, - 0xe1, - 0x78, - 0xc8, - 0xc1, - 0x42, - 0x5e, - 0x18, - 0x36, - 0xa8, - 0x41, - 0xf7, - 0xc8, - 0xaa, - 0x35, - 0xfe, - 0x2d, - 0xd1, - 0xb4, - 0xcc, - 0x00, - 0x67, - 0xae, - 0x79, - 0xd3, - 0x28, - 0xd5, - 0x5b, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x81, - 0x81, - 0x00, - 0xa6, - 0x00, - 0x83, - 0xf8, - 0x2b, - 0x33, - 0xac, - 0xfb, - 0xdb, - 0xf0, - 0x52, - 0x4b, - 0xd6, - 0x39, - 0xe3, - 0x94, - 0x3d, - 0x8d, - 0xa9, - 0x01, - 0xb0, - 0x6b, - 0xbe, - 0x7f, - 0x10, - 0x01, - 0xb6, - 0xcd, - 0x0a, - 0x45, - 0x0a, - 0xca, - 0x67, - 0x8e, - 0xd8, - 0x29, - 0x44, - 0x8a, - 0x51, - 0xa8, - 0x66, - 0x35, - 0x26, - 0x30, - 0x8b, - 0xe9, - 0x41, - 0xa6, - 0x22, - 0xec, - 0xd2, - 0xf0, - 0x58, - 0x41, - 0x33, - 0x26, - 0xf2, - 0x3f, - 0xe8, - 0x75, - 0x4f, - 0xc7, - 0x5d, - 0x2e, - 0x5a, - 0xa8, - 0x7a, - 0xd2, - 0xbf, - 0x59, - 0xa0, - 0x86, - 0x79, - 0x0b, - 0x92, - 0x6c, - 0x95, - 0x5d, - 0x87, - 0x63, - 0x5c, - 0xd6, - 0x1a, - 0xc0, - 0xf6, - 0x7a, - 0x15, - 0x8d, - 0xc7, - 0x3c, - 0xb6, - 0x9e, - 0xa6, - 0x58, - 0x46, - 0x9b, - 0xbf, - 0x3e, - 0x28, - 0x8c, - 0xdf, - 0x1a, - 0x87, - 0xaa, - 0x7e, - 0xf5, - 0xf2, - 0xcb, - 0x5e, - 0x84, - 0x2d, - 0xf6, - 0x82, - 0x7e, - 0x89, - 0x4e, - 0xf5, - 0xe6, - 0x3c, - 0x92, - 0x80, - 0x1e, - 0x98, - 0x1c, - 0x6a, - 0x7b, - 0x57, - 0x01, - 0x02, - 0x41, - 0x00, - 0xdd, - 0x60, - 0x95, - 0xd7, - 0xa1, - 0x9d, - 0x0c, - 0xa1, - 0x84, - 0xc5, - 0x39, - 0xca, - 0x67, - 0x4c, - 0x1c, - 0x06, - 0x71, - 0x5b, - 0x5c, - 0x2d, - 0x8d, - 0xce, - 0xcd, - 0xe2, - 0x79, - 0xc8, - 0x33, - 0xbe, - 0x50, - 0x37, - 0x60, - 0x9f, - 0x3b, - 0xb9, - 0x59, - 0x55, - 0x22, - 0x1f, - 0xa5, - 0x4b, - 0x1d, - 0xca, - 0x38, - 0xa0, - 0xab, - 0x87, - 0x9c, - 0x86, - 0x0e, - 0xdb, - 0x1c, - 0x4f, - 0x4f, - 0x07, - 0xed, - 0x18, - 0x3f, - 0x05, - 0x3c, - 0xec, - 0x78, - 0x11, - 0xf6, - 0x99, - 0x02, - 0x41, - 0x00, - 0xc2, - 0xc5, - 0xcf, - 0xbe, - 0x95, - 0x91, - 0xeb, - 0xcf, - 0x47, - 0xf3, - 0x33, - 0x32, - 0xc7, - 0x7e, - 0x93, - 0x56, - 0xf7, - 0xd8, - 0xf9, - 0xd4, - 0xb6, - 0xd6, - 0x20, - 0xac, - 0xba, - 0x8a, - 0x20, - 0x19, - 0x14, - 0xab, - 0xc5, - 0x5d, - 0xb2, - 0x08, - 0xcc, - 0x77, - 0x7c, - 0x65, - 0xa8, - 0xdb, - 0x66, - 0x97, - 0x36, - 0x44, - 0x2c, - 0x63, - 0xc0, - 0x6a, - 0x7e, - 0xb0, - 0x0b, - 0x5c, - 0x90, - 0x12, - 0x50, - 0xb4, - 0x36, - 0x60, - 0xc3, - 0x1f, - 0x22, - 0x0c, - 0xc8, - 0x13, - 0x02, - 0x40, - 0x33, - 0xc8, - 0x7e, - 0x04, - 0x7c, - 0x97, - 0x61, - 0xf6, - 0xfe, - 0x39, - 0xac, - 0x34, - 0xfe, - 0x48, - 0xbd, - 0x5d, - 0x7c, - 0x72, - 0xa4, - 0x73, - 0x3b, - 0x72, - 0x9e, - 0x92, - 0x55, - 0x6e, - 0x51, - 0x3c, - 0x39, - 0x43, - 0x5a, - 0xe4, - 0xa4, - 0x71, - 0xcc, - 0xc5, - 0xaf, - 0x3f, - 0xbb, - 0xc8, - 0x80, - 0x65, - 0x67, - 0x2d, - 0x9e, - 0x32, - 0x10, - 0x99, - 0x03, - 0x2c, - 0x99, - 0xc8, - 0xab, - 0x71, - 0xed, - 0x31, - 0xf8, - 0xbb, - 0xde, - 0xee, - 0x69, - 0x7f, - 0xba, - 0x31, - 0x02, - 0x40, - 0x7e, - 0xbc, - 0x60, - 0x55, - 0x4e, - 0xd5, - 0xc8, - 0x6e, - 0xf4, - 0x0e, - 0x57, - 0xbe, - 0x2e, - 0xf9, - 0x39, - 0xbe, - 0x59, - 0x3f, - 0xa2, - 0x30, - 0xbb, - 0x57, - 0xd1, - 0xa3, - 0x13, - 0x2e, - 0x55, - 0x7c, - 0x7c, - 0x6a, - 0xd8, - 0xde, - 0x02, - 0xbe, - 0x9e, - 0xed, - 0x10, - 0xd0, - 0xc5, - 0x73, - 0x1d, - 0xea, - 0x3e, - 0xb1, - 0x55, - 0x81, - 0x02, - 0xef, - 0x48, - 0xc8, - 0x1c, - 0x5c, - 0x7a, - 0x92, - 0xb0, - 0x58, - 0xd3, - 0x19, - 0x5b, - 0x5d, - 0xa2, - 0xb6, - 0x56, - 0x69, - 0x02, - 0x40, - 0x1e, - 0x00, - 0x6a, - 0x9f, - 0xba, - 0xee, - 0x46, - 0x5a, - 0xc5, - 0xb5, - 0x9f, - 0x91, - 0x33, - 0xdd, - 0xc9, - 0x96, - 0x75, - 0xb7, - 0x87, - 0xcf, - 0x18, - 0x1c, - 0xb7, - 0xb9, - 0x3f, - 0x04, - 0x10, - 0xb8, - 0x75, - 0xa9, - 0xb8, - 0xa0, - 0x31, - 0x35, - 0x03, - 0x30, - 0x89, - 0xc8, - 0x37, - 0x68, - 0x20, - 0x30, - 0x99, - 0x39, - 0x96, - 0xd6, - 0x2b, - 0x3d, - 0x5e, - 0x45, - 0x84, - 0xf7, - 0xd2, - 0x61, - 0x50, - 0xc9, - 0x50, - 0xba, - 0x8d, - 0x08, - 0xaa, - 0xd0, - 0x08, - 0x1e, + 0x30, 0x82, 0x02, 0x5c, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, + 0x00, 0xa8, 0x6e, 0x40, 0x86, 0x9f, 0x98, 0x59, 0xfb, 0x57, + 0xbf, 0xc1, 0x55, 0x12, 0x38, 0xeb, 0xb3, 0x46, 0x34, 0xc9, + 0x35, 0x4d, 0xfd, 0x03, 0xe9, 0x3a, 0x88, 0x9e, 0x97, 0x8f, + 0xf4, 0xec, 0x36, 0x7b, 0x3f, 0xba, 0xb8, 0xa5, 0x96, 0x30, + 0x03, 0xc5, 0xc6, 0xd9, 0xa8, 0x4e, 0xbc, 0x23, 0x51, 0xa1, + 0x96, 0xd2, 0x03, 0x98, 0x73, 0xb6, 0x17, 0x9c, 0x77, 0xd4, + 0x95, 0x1e, 0x1b, 0xb3, 0x1b, 0xc8, 0x71, 0xd1, 0x2e, 0x31, + 0xc7, 0x6a, 0x75, 0x57, 0x08, 0x7f, 0xba, 0x70, 0x76, 0xf7, + 0x67, 0xf4, 0x4e, 0xbe, 0xfc, 0x70, 0x61, 0x41, 0x07, 0x2b, + 0x7c, 0x3c, 0x3b, 0xb3, 0xbc, 0xd5, 0xa8, 0xbd, 0x28, 0xd8, + 0x49, 0xd3, 0xe1, 0x78, 0xc8, 0xc1, 0x42, 0x5e, 0x18, 0x36, + 0xa8, 0x41, 0xf7, 0xc8, 0xaa, 0x35, 0xfe, 0x2d, 0xd1, 0xb4, + 0xcc, 0x00, 0x67, 0xae, 0x79, 0xd3, 0x28, 0xd5, 0x5b, 0x02, + 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x81, 0x00, 0xa6, 0x00, + 0x83, 0xf8, 0x2b, 0x33, 0xac, 0xfb, 0xdb, 0xf0, 0x52, 0x4b, + 0xd6, 0x39, 0xe3, 0x94, 0x3d, 0x8d, 0xa9, 0x01, 0xb0, 0x6b, + 0xbe, 0x7f, 0x10, 0x01, 0xb6, 0xcd, 0x0a, 0x45, 0x0a, 0xca, + 0x67, 0x8e, 0xd8, 0x29, 0x44, 0x8a, 0x51, 0xa8, 0x66, 0x35, + 0x26, 0x30, 0x8b, 0xe9, 0x41, 0xa6, 0x22, 0xec, 0xd2, 0xf0, + 0x58, 0x41, 0x33, 0x26, 0xf2, 0x3f, 0xe8, 0x75, 0x4f, 0xc7, + 0x5d, 0x2e, 0x5a, 0xa8, 0x7a, 0xd2, 0xbf, 0x59, 0xa0, 0x86, + 0x79, 0x0b, 0x92, 0x6c, 0x95, 0x5d, 0x87, 0x63, 0x5c, 0xd6, + 0x1a, 0xc0, 0xf6, 0x7a, 0x15, 0x8d, 0xc7, 0x3c, 0xb6, 0x9e, + 0xa6, 0x58, 0x46, 0x9b, 0xbf, 0x3e, 0x28, 0x8c, 0xdf, 0x1a, + 0x87, 0xaa, 0x7e, 0xf5, 0xf2, 0xcb, 0x5e, 0x84, 0x2d, 0xf6, + 0x82, 0x7e, 0x89, 0x4e, 0xf5, 0xe6, 0x3c, 0x92, 0x80, 0x1e, + 0x98, 0x1c, 0x6a, 0x7b, 0x57, 0x01, 0x02, 0x41, 0x00, 0xdd, + 0x60, 0x95, 0xd7, 0xa1, 0x9d, 0x0c, 0xa1, 0x84, 0xc5, 0x39, + 0xca, 0x67, 0x4c, 0x1c, 0x06, 0x71, 0x5b, 0x5c, 0x2d, 0x8d, + 0xce, 0xcd, 0xe2, 0x79, 0xc8, 0x33, 0xbe, 0x50, 0x37, 0x60, + 0x9f, 0x3b, 0xb9, 0x59, 0x55, 0x22, 0x1f, 0xa5, 0x4b, 0x1d, + 0xca, 0x38, 0xa0, 0xab, 0x87, 0x9c, 0x86, 0x0e, 0xdb, 0x1c, + 0x4f, 0x4f, 0x07, 0xed, 0x18, 0x3f, 0x05, 0x3c, 0xec, 0x78, + 0x11, 0xf6, 0x99, 0x02, 0x41, 0x00, 0xc2, 0xc5, 0xcf, 0xbe, + 0x95, 0x91, 0xeb, 0xcf, 0x47, 0xf3, 0x33, 0x32, 0xc7, 0x7e, + 0x93, 0x56, 0xf7, 0xd8, 0xf9, 0xd4, 0xb6, 0xd6, 0x20, 0xac, + 0xba, 0x8a, 0x20, 0x19, 0x14, 0xab, 0xc5, 0x5d, 0xb2, 0x08, + 0xcc, 0x77, 0x7c, 0x65, 0xa8, 0xdb, 0x66, 0x97, 0x36, 0x44, + 0x2c, 0x63, 0xc0, 0x6a, 0x7e, 0xb0, 0x0b, 0x5c, 0x90, 0x12, + 0x50, 0xb4, 0x36, 0x60, 0xc3, 0x1f, 0x22, 0x0c, 0xc8, 0x13, + 0x02, 0x40, 0x33, 0xc8, 0x7e, 0x04, 0x7c, 0x97, 0x61, 0xf6, + 0xfe, 0x39, 0xac, 0x34, 0xfe, 0x48, 0xbd, 0x5d, 0x7c, 0x72, + 0xa4, 0x73, 0x3b, 0x72, 0x9e, 0x92, 0x55, 0x6e, 0x51, 0x3c, + 0x39, 0x43, 0x5a, 0xe4, 0xa4, 0x71, 0xcc, 0xc5, 0xaf, 0x3f, + 0xbb, 0xc8, 0x80, 0x65, 0x67, 0x2d, 0x9e, 0x32, 0x10, 0x99, + 0x03, 0x2c, 0x99, 0xc8, 0xab, 0x71, 0xed, 0x31, 0xf8, 0xbb, + 0xde, 0xee, 0x69, 0x7f, 0xba, 0x31, 0x02, 0x40, 0x7e, 0xbc, + 0x60, 0x55, 0x4e, 0xd5, 0xc8, 0x6e, 0xf4, 0x0e, 0x57, 0xbe, + 0x2e, 0xf9, 0x39, 0xbe, 0x59, 0x3f, 0xa2, 0x30, 0xbb, 0x57, + 0xd1, 0xa3, 0x13, 0x2e, 0x55, 0x7c, 0x7c, 0x6a, 0xd8, 0xde, + 0x02, 0xbe, 0x9e, 0xed, 0x10, 0xd0, 0xc5, 0x73, 0x1d, 0xea, + 0x3e, 0xb1, 0x55, 0x81, 0x02, 0xef, 0x48, 0xc8, 0x1c, 0x5c, + 0x7a, 0x92, 0xb0, 0x58, 0xd3, 0x19, 0x5b, 0x5d, 0xa2, 0xb6, + 0x56, 0x69, 0x02, 0x40, 0x1e, 0x00, 0x6a, 0x9f, 0xba, 0xee, + 0x46, 0x5a, 0xc5, 0xb5, 0x9f, 0x91, 0x33, 0xdd, 0xc9, 0x96, + 0x75, 0xb7, 0x87, 0xcf, 0x18, 0x1c, 0xb7, 0xb9, 0x3f, 0x04, + 0x10, 0xb8, 0x75, 0xa9, 0xb8, 0xa0, 0x31, 0x35, 0x03, 0x30, + 0x89, 0xc8, 0x37, 0x68, 0x20, 0x30, 0x99, 0x39, 0x96, 0xd6, + 0x2b, 0x3d, 0x5e, 0x45, 0x84, 0xf7, 0xd2, 0x61, 0x50, 0xc9, + 0x50, 0xba, 0x8d, 0x08, 0xaa, 0xd0, 0x08, 0x1e }; static const PKCS12_ATTR ATTRS1[] = { @@ -2783,615 +794,67 @@ static int pkcs12_create_test(void) const unsigned char *p; static const unsigned char rsa_key[] = { - 0x30, - 0x82, - 0x02, - 0x5d, - 0x02, - 0x01, - 0x00, - 0x02, - 0x81, - 0x81, - 0x00, - 0xbb, - 0x24, - 0x7a, - 0x09, - 0x7e, - 0x0e, - 0xb2, - 0x37, - 0x32, - 0xcc, - 0x39, - 0x67, - 0xad, - 0xf1, - 0x9e, - 0x3d, - 0x6b, - 0x82, - 0x83, - 0xd1, - 0xd0, - 0xac, - 0xa4, - 0xc0, - 0x18, - 0xbe, - 0x8d, - 0x98, - 0x00, - 0xc0, - 0x7b, - 0xff, - 0x07, - 0x44, - 0xc9, - 0xca, - 0x1c, - 0xba, - 0x36, - 0xe1, - 0x27, - 0x69, - 0xff, - 0xb1, - 0xe3, - 0x8d, - 0x8b, - 0xee, - 0x57, - 0xa9, - 0x3a, - 0xaa, - 0x16, - 0x43, - 0x39, - 0x54, - 0x19, - 0x7c, - 0xae, - 0x69, - 0x24, - 0x14, - 0xf6, - 0x64, - 0xff, - 0xbc, - 0x74, - 0xc6, - 0x67, - 0x6c, - 0x4c, - 0xf1, - 0x02, - 0x49, - 0x69, - 0xc7, - 0x2b, - 0xe1, - 0xe1, - 0xa1, - 0xa3, - 0x43, - 0x14, - 0xf4, - 0x77, - 0x8f, - 0xc8, - 0xd0, - 0x85, - 0x5a, - 0x35, - 0x95, - 0xac, - 0x62, - 0xa9, - 0xc1, - 0x21, - 0x00, - 0x77, - 0xa0, - 0x8b, - 0x97, - 0x30, - 0xb4, - 0x5a, - 0x2c, - 0xb8, - 0x90, - 0x2f, - 0x48, - 0xa0, - 0x05, - 0x28, - 0x4b, - 0xf2, - 0x0f, - 0x8d, - 0xec, - 0x8b, - 0x4d, - 0x03, - 0x42, - 0x75, - 0xd6, - 0xad, - 0x81, - 0xc0, - 0x11, - 0x02, - 0x03, - 0x01, - 0x00, - 0x01, - 0x02, - 0x81, - 0x80, - 0x00, - 0xfc, - 0xb9, - 0x4a, - 0x26, - 0x07, - 0x89, - 0x51, - 0x2b, - 0x53, - 0x72, - 0x91, - 0xe0, - 0x18, - 0x3e, - 0xa6, - 0x5e, - 0x31, - 0xef, - 0x9c, - 0x0c, - 0x16, - 0x24, - 0x42, - 0xd0, - 0x28, - 0x33, - 0xf9, - 0xfa, - 0xd0, - 0x3c, - 0x54, - 0x04, - 0x06, - 0xc0, - 0x15, - 0xf5, - 0x1b, - 0x9a, - 0xb3, - 0x24, - 0x31, - 0xab, - 0x3c, - 0x6b, - 0x47, - 0x43, - 0xb0, - 0xd2, - 0xa9, - 0xdc, - 0x05, - 0xe1, - 0x81, - 0x59, - 0xb6, - 0x04, - 0xe9, - 0x66, - 0x61, - 0xaa, - 0xd7, - 0x0b, - 0x00, - 0x8f, - 0x3d, - 0xe5, - 0xbf, - 0xa2, - 0xf8, - 0x5e, - 0x25, - 0x6c, - 0x1e, - 0x22, - 0x0f, - 0xb4, - 0xfd, - 0x41, - 0xe2, - 0x03, - 0x31, - 0x5f, - 0xda, - 0x20, - 0xc5, - 0xc0, - 0xf3, - 0x55, - 0x0e, - 0xe1, - 0xc9, - 0xec, - 0xd7, - 0x3e, - 0x2a, - 0x0c, - 0x01, - 0xca, - 0x7b, - 0x22, - 0xcb, - 0xac, - 0xf4, - 0x2b, - 0x27, - 0xf0, - 0x78, - 0x5f, - 0xb5, - 0xc2, - 0xf9, - 0xe8, - 0x14, - 0x5a, - 0x6e, - 0x7e, - 0x86, - 0xbd, - 0x6a, - 0x9b, - 0x20, - 0x0c, - 0xba, - 0xcc, - 0x97, - 0x20, - 0x11, - 0x02, - 0x41, - 0x00, - 0xc9, - 0x59, - 0x9f, - 0x29, - 0x8a, - 0x5b, - 0x9f, - 0xe3, - 0x2a, - 0xd8, - 0x7e, - 0xc2, - 0x40, - 0x9f, - 0xa8, - 0x45, - 0xe5, - 0x3e, - 0x11, - 0x8d, - 0x3c, - 0xed, - 0x6e, - 0xab, - 0xce, - 0xd0, - 0x65, - 0x46, - 0xd8, - 0xc7, - 0x07, - 0x63, - 0xb5, - 0x23, - 0x34, - 0xf4, - 0x9f, - 0x7e, - 0x1c, - 0xc7, - 0xc7, - 0xf9, - 0x65, - 0xd1, - 0xf4, - 0x04, - 0x42, - 0x38, - 0xbe, - 0x3a, - 0x0c, - 0x9d, - 0x08, - 0x25, - 0xfc, - 0xa3, - 0x71, - 0xd9, - 0xae, - 0x0c, - 0x39, - 0x61, - 0xf4, - 0x89, - 0x02, - 0x41, - 0x00, - 0xed, - 0xef, - 0xab, - 0xa9, - 0xd5, - 0x39, - 0x9c, - 0xee, - 0x59, - 0x1b, - 0xff, - 0xcf, - 0x48, - 0x44, - 0x1b, - 0xb6, - 0x32, - 0xe7, - 0x46, - 0x24, - 0xf3, - 0x04, - 0x7f, - 0xde, - 0x95, - 0x08, - 0x6d, - 0x75, - 0x9e, - 0x67, - 0x17, - 0xba, - 0x5c, - 0xa4, - 0xd4, - 0xe2, - 0xe2, - 0x4d, - 0x77, - 0xce, - 0xeb, - 0x66, - 0x29, - 0xc5, - 0x96, - 0xe0, - 0x62, - 0xbb, - 0xe5, - 0xac, - 0xdc, - 0x44, - 0x62, - 0x54, - 0x86, - 0xed, - 0x64, - 0x0c, - 0xce, - 0xd0, - 0x60, - 0x03, - 0x9d, - 0x49, - 0x02, - 0x40, - 0x54, - 0xd9, - 0x18, - 0x72, - 0x27, - 0xe4, - 0xbe, - 0x76, - 0xbb, - 0x1a, - 0x6a, - 0x28, - 0x2f, - 0x95, - 0x58, - 0x12, - 0xc4, - 0x2c, - 0xa8, - 0xb6, - 0xcc, - 0xe2, - 0xfd, - 0x0d, - 0x17, - 0x64, - 0xc8, - 0x18, - 0xd7, - 0xc6, - 0xdf, - 0x3d, - 0x4c, - 0x1a, - 0x9e, - 0xf9, - 0x2a, - 0xb0, - 0xb9, - 0x2e, - 0x12, - 0xfd, - 0xec, - 0xc3, - 0x51, - 0xc1, - 0xed, - 0xa9, - 0xfd, - 0xb7, - 0x76, - 0x93, - 0x41, - 0xd8, - 0xc8, - 0x22, - 0x94, - 0x1a, - 0x77, - 0xf6, - 0x9c, - 0xc3, - 0xc3, - 0x89, - 0x02, - 0x41, - 0x00, - 0x8e, - 0xf9, - 0xa7, - 0x08, - 0xad, - 0xb5, - 0x2a, - 0x04, - 0xdb, - 0x8d, - 0x04, - 0xa1, - 0xb5, - 0x06, - 0x20, - 0x34, - 0xd2, - 0xcf, - 0xc0, - 0x89, - 0xb1, - 0x72, - 0x31, - 0xb8, - 0x39, - 0x8b, - 0xcf, - 0xe2, - 0x8e, - 0xa5, - 0xda, - 0x4f, - 0x45, - 0x1e, - 0x53, - 0x42, - 0x66, - 0xc4, - 0x30, - 0x4b, - 0x29, - 0x8e, - 0xc1, - 0x69, - 0x17, - 0x29, - 0x8c, - 0x8a, - 0xe6, - 0x0f, - 0x82, - 0x68, - 0xa1, - 0x41, - 0xb3, - 0xb6, - 0x70, - 0x99, - 0x75, - 0xa9, - 0x27, - 0x18, - 0xe4, - 0xe9, - 0x02, - 0x41, - 0x00, - 0x89, - 0xea, - 0x6e, - 0x6d, - 0x70, - 0xdf, - 0x25, - 0x5f, - 0x18, - 0x3f, - 0x48, - 0xda, - 0x63, - 0x10, - 0x8b, - 0xfe, - 0xa8, - 0x0c, - 0x94, - 0x0f, - 0xde, - 0x97, - 0x56, - 0x53, - 0x89, - 0x94, - 0xe2, - 0x1e, - 0x2c, - 0x74, - 0x3c, - 0x91, - 0x81, - 0x34, - 0x0b, - 0xa6, - 0x40, - 0xf8, - 0xcb, - 0x2a, - 0x60, - 0x8c, - 0xe0, - 0x02, - 0xb7, - 0x89, - 0x93, - 0xcf, - 0x18, - 0x9f, - 0x49, - 0x54, - 0xfd, - 0x7d, - 0x3f, - 0x9a, - 0xef, - 0xd4, - 0xa4, - 0x4f, - 0xc1, - 0x45, - 0x99, - 0x91, + 0x30, 0x82, 0x02, 0x5d, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, + 0x00, 0xbb, 0x24, 0x7a, 0x09, 0x7e, 0x0e, 0xb2, 0x37, 0x32, + 0xcc, 0x39, 0x67, 0xad, 0xf1, 0x9e, 0x3d, 0x6b, 0x82, 0x83, + 0xd1, 0xd0, 0xac, 0xa4, 0xc0, 0x18, 0xbe, 0x8d, 0x98, 0x00, + 0xc0, 0x7b, 0xff, 0x07, 0x44, 0xc9, 0xca, 0x1c, 0xba, 0x36, + 0xe1, 0x27, 0x69, 0xff, 0xb1, 0xe3, 0x8d, 0x8b, 0xee, 0x57, + 0xa9, 0x3a, 0xaa, 0x16, 0x43, 0x39, 0x54, 0x19, 0x7c, 0xae, + 0x69, 0x24, 0x14, 0xf6, 0x64, 0xff, 0xbc, 0x74, 0xc6, 0x67, + 0x6c, 0x4c, 0xf1, 0x02, 0x49, 0x69, 0xc7, 0x2b, 0xe1, 0xe1, + 0xa1, 0xa3, 0x43, 0x14, 0xf4, 0x77, 0x8f, 0xc8, 0xd0, 0x85, + 0x5a, 0x35, 0x95, 0xac, 0x62, 0xa9, 0xc1, 0x21, 0x00, 0x77, + 0xa0, 0x8b, 0x97, 0x30, 0xb4, 0x5a, 0x2c, 0xb8, 0x90, 0x2f, + 0x48, 0xa0, 0x05, 0x28, 0x4b, 0xf2, 0x0f, 0x8d, 0xec, 0x8b, + 0x4d, 0x03, 0x42, 0x75, 0xd6, 0xad, 0x81, 0xc0, 0x11, 0x02, + 0x03, 0x01, 0x00, 0x01, 0x02, 0x81, 0x80, 0x00, 0xfc, 0xb9, + 0x4a, 0x26, 0x07, 0x89, 0x51, 0x2b, 0x53, 0x72, 0x91, 0xe0, + 0x18, 0x3e, 0xa6, 0x5e, 0x31, 0xef, 0x9c, 0x0c, 0x16, 0x24, + 0x42, 0xd0, 0x28, 0x33, 0xf9, 0xfa, 0xd0, 0x3c, 0x54, 0x04, + 0x06, 0xc0, 0x15, 0xf5, 0x1b, 0x9a, 0xb3, 0x24, 0x31, 0xab, + 0x3c, 0x6b, 0x47, 0x43, 0xb0, 0xd2, 0xa9, 0xdc, 0x05, 0xe1, + 0x81, 0x59, 0xb6, 0x04, 0xe9, 0x66, 0x61, 0xaa, 0xd7, 0x0b, + 0x00, 0x8f, 0x3d, 0xe5, 0xbf, 0xa2, 0xf8, 0x5e, 0x25, 0x6c, + 0x1e, 0x22, 0x0f, 0xb4, 0xfd, 0x41, 0xe2, 0x03, 0x31, 0x5f, + 0xda, 0x20, 0xc5, 0xc0, 0xf3, 0x55, 0x0e, 0xe1, 0xc9, 0xec, + 0xd7, 0x3e, 0x2a, 0x0c, 0x01, 0xca, 0x7b, 0x22, 0xcb, 0xac, + 0xf4, 0x2b, 0x27, 0xf0, 0x78, 0x5f, 0xb5, 0xc2, 0xf9, 0xe8, + 0x14, 0x5a, 0x6e, 0x7e, 0x86, 0xbd, 0x6a, 0x9b, 0x20, 0x0c, + 0xba, 0xcc, 0x97, 0x20, 0x11, 0x02, 0x41, 0x00, 0xc9, 0x59, + 0x9f, 0x29, 0x8a, 0x5b, 0x9f, 0xe3, 0x2a, 0xd8, 0x7e, 0xc2, + 0x40, 0x9f, 0xa8, 0x45, 0xe5, 0x3e, 0x11, 0x8d, 0x3c, 0xed, + 0x6e, 0xab, 0xce, 0xd0, 0x65, 0x46, 0xd8, 0xc7, 0x07, 0x63, + 0xb5, 0x23, 0x34, 0xf4, 0x9f, 0x7e, 0x1c, 0xc7, 0xc7, 0xf9, + 0x65, 0xd1, 0xf4, 0x04, 0x42, 0x38, 0xbe, 0x3a, 0x0c, 0x9d, + 0x08, 0x25, 0xfc, 0xa3, 0x71, 0xd9, 0xae, 0x0c, 0x39, 0x61, + 0xf4, 0x89, 0x02, 0x41, 0x00, 0xed, 0xef, 0xab, 0xa9, 0xd5, + 0x39, 0x9c, 0xee, 0x59, 0x1b, 0xff, 0xcf, 0x48, 0x44, 0x1b, + 0xb6, 0x32, 0xe7, 0x46, 0x24, 0xf3, 0x04, 0x7f, 0xde, 0x95, + 0x08, 0x6d, 0x75, 0x9e, 0x67, 0x17, 0xba, 0x5c, 0xa4, 0xd4, + 0xe2, 0xe2, 0x4d, 0x77, 0xce, 0xeb, 0x66, 0x29, 0xc5, 0x96, + 0xe0, 0x62, 0xbb, 0xe5, 0xac, 0xdc, 0x44, 0x62, 0x54, 0x86, + 0xed, 0x64, 0x0c, 0xce, 0xd0, 0x60, 0x03, 0x9d, 0x49, 0x02, + 0x40, 0x54, 0xd9, 0x18, 0x72, 0x27, 0xe4, 0xbe, 0x76, 0xbb, + 0x1a, 0x6a, 0x28, 0x2f, 0x95, 0x58, 0x12, 0xc4, 0x2c, 0xa8, + 0xb6, 0xcc, 0xe2, 0xfd, 0x0d, 0x17, 0x64, 0xc8, 0x18, 0xd7, + 0xc6, 0xdf, 0x3d, 0x4c, 0x1a, 0x9e, 0xf9, 0x2a, 0xb0, 0xb9, + 0x2e, 0x12, 0xfd, 0xec, 0xc3, 0x51, 0xc1, 0xed, 0xa9, 0xfd, + 0xb7, 0x76, 0x93, 0x41, 0xd8, 0xc8, 0x22, 0x94, 0x1a, 0x77, + 0xf6, 0x9c, 0xc3, 0xc3, 0x89, 0x02, 0x41, 0x00, 0x8e, 0xf9, + 0xa7, 0x08, 0xad, 0xb5, 0x2a, 0x04, 0xdb, 0x8d, 0x04, 0xa1, + 0xb5, 0x06, 0x20, 0x34, 0xd2, 0xcf, 0xc0, 0x89, 0xb1, 0x72, + 0x31, 0xb8, 0x39, 0x8b, 0xcf, 0xe2, 0x8e, 0xa5, 0xda, 0x4f, + 0x45, 0x1e, 0x53, 0x42, 0x66, 0xc4, 0x30, 0x4b, 0x29, 0x8e, + 0xc1, 0x69, 0x17, 0x29, 0x8c, 0x8a, 0xe6, 0x0f, 0x82, 0x68, + 0xa1, 0x41, 0xb3, 0xb6, 0x70, 0x99, 0x75, 0xa9, 0x27, 0x18, + 0xe4, 0xe9, 0x02, 0x41, 0x00, 0x89, 0xea, 0x6e, 0x6d, 0x70, + 0xdf, 0x25, 0x5f, 0x18, 0x3f, 0x48, 0xda, 0x63, 0x10, 0x8b, + 0xfe, 0xa8, 0x0c, 0x94, 0x0f, 0xde, 0x97, 0x56, 0x53, 0x89, + 0x94, 0xe2, 0x1e, 0x2c, 0x74, 0x3c, 0x91, 0x81, 0x34, 0x0b, + 0xa6, 0x40, 0xf8, 0xcb, 0x2a, 0x60, 0x8c, 0xe0, 0x02, 0xb7, + 0x89, 0x93, 0xcf, 0x18, 0x9f, 0x49, 0x54, 0xfd, 0x7d, 0x3f, + 0x9a, 0xef, 0xd4, 0xa4, 0x4f, 0xc1, 0x45, 0x99, 0x91 }; p = rsa_key; diff --git a/crypto/openssl/test/recipes/70-test_tls13ticket.t b/crypto/openssl/test/recipes/70-test_tls13ticket.t new file mode 100644 index 000000000000..d05bb357d2a7 --- /dev/null +++ b/crypto/openssl/test/recipes/70-test_tls13ticket.t @@ -0,0 +1,26 @@ +#! /usr/bin/env perl +# Copyright 2026 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the Apache License 2.0 (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + +use OpenSSL::Test::Simple; +use OpenSSL::Test qw/:DEFAULT srctop_file/; +use OpenSSL::Test::Utils qw(disabled); + +setup("test_tls13ticket"); + +plan skip_all => "needs TLSv1.3 enabled" + if disabled("tls1_3"); + +plan skip_all => "needs EC enabled" + if disabled("ec"); + + +plan tests => 1; + +ok(run(test(["tls13ticket_test", srctop_file("apps", "server.pem"), + srctop_file("apps", "server.pem")])), + "running tls13ticket_test"); diff --git a/crypto/openssl/test/recipes/80-test_cms.t b/crypto/openssl/test/recipes/80-test_cms.t index f573651e26bc..2f850c6e0ee8 100644 --- a/crypto/openssl/test/recipes/80-test_cms.t +++ b/crypto/openssl/test/recipes/80-test_cms.t @@ -51,7 +51,7 @@ my ($no_des, $no_dh, $no_dsa, $no_ec, $no_ec2m, $no_rc2, $no_zlib) $no_rc2 = 1 if disabled("legacy"); -plan tests => 24; +plan tests => 26; ok(run(test(["pkcs7_test"])), "test pkcs7"); @@ -1011,6 +1011,23 @@ subtest "CMS binary input tests\n" => sub { "verify binary input with -binary missing -crlfeol"); }; +# Regression test for PKCS7_verify() ownership handling when +# digestAlgorithms is an empty SET. +# The malformed structure must fail cleanly without crashing or +# triggering use-after-free behaviour. +with({ exit_checker => sub { return shift == 4; } }, + sub { + ok(run(app([ + 'openssl', 'smime', + '-verify', + '-noverify', + '-in', + srctop_file('test', 'smime-eml', + 'pkcs7-empty-digest-set.eml'), + ])), + "Check empty digestAlgorithms SET is handled safely"); + }); + # Test case for missing MD algorithm (must not segfault) with({ exit_checker => sub { return shift == 4; } }, @@ -1206,3 +1223,21 @@ subtest "encrypt to three recipients with RSA-OAEP, key only decrypt" => sub { "decrypt with key only"); is(compare($pt, $ptpt), 0, "compare original message with decrypted ciphertext"); }; + +# Regression test for NULL dereference in PWRI decrypt path +# when optional keyDerivationAlgorithm is omitted. +subtest "PWRI missing keyDerivationAlgorithm regression" => sub { + plan tests => 1; + + with({ exit_checker => sub { return shift == 4; } }, sub { + ok(run(app([ + "openssl", "cms", @prov, + "-decrypt", + "-inform", "DER", + "-in", + srctop_file('test', 'cms-msg', 'missing-kdf.der'), + "-out", "pwri-out.txt", + "-pwri_password", "secret"])), + "missing keyDerivationAlgorithm is rejected"); + }); +}; diff --git a/crypto/openssl/test/siphash_internal_test.c b/crypto/openssl/test/siphash_internal_test.c index 8a97bd700e88..954a014f0dbb 100644 --- a/crypto/openssl/test/siphash_internal_test.c +++ b/crypto/openssl/test/siphash_internal_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2026 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -36,1798 +36,134 @@ typedef struct { /* From C reference: https://131002.net/siphash/ */ static TESTDATA tests[] = { - { 0, { 8, { - 0x31, - 0x0e, - 0x0e, - 0xdd, - 0x47, - 0xdb, - 0x6f, - 0x72, - } } }, - { 1, { 8, { - 0xfd, - 0x67, - 0xdc, - 0x93, - 0xc5, - 0x39, - 0xf8, - 0x74, - } } }, - { 2, { 8, { - 0x5a, - 0x4f, - 0xa9, - 0xd9, - 0x09, - 0x80, - 0x6c, - 0x0d, - } } }, - { 3, { 8, { - 0x2d, - 0x7e, - 0xfb, - 0xd7, - 0x96, - 0x66, - 0x67, - 0x85, - } } }, - { 4, { 8, { - 0xb7, - 0x87, - 0x71, - 0x27, - 0xe0, - 0x94, - 0x27, - 0xcf, - } } }, - { 5, { 8, { - 0x8d, - 0xa6, - 0x99, - 0xcd, - 0x64, - 0x55, - 0x76, - 0x18, - } } }, - { 6, { 8, { - 0xce, - 0xe3, - 0xfe, - 0x58, - 0x6e, - 0x46, - 0xc9, - 0xcb, - } } }, - { 7, { 8, { - 0x37, - 0xd1, - 0x01, - 0x8b, - 0xf5, - 0x00, - 0x02, - 0xab, - } } }, - { 8, { 8, { - 0x62, - 0x24, - 0x93, - 0x9a, - 0x79, - 0xf5, - 0xf5, - 0x93, - } } }, - { 9, { 8, { - 0xb0, - 0xe4, - 0xa9, - 0x0b, - 0xdf, - 0x82, - 0x00, - 0x9e, - } } }, - { 10, { 8, { - 0xf3, - 0xb9, - 0xdd, - 0x94, - 0xc5, - 0xbb, - 0x5d, - 0x7a, - } } }, - { 11, { 8, { - 0xa7, - 0xad, - 0x6b, - 0x22, - 0x46, - 0x2f, - 0xb3, - 0xf4, - } } }, - { 12, { 8, { - 0xfb, - 0xe5, - 0x0e, - 0x86, - 0xbc, - 0x8f, - 0x1e, - 0x75, - } } }, - { 13, { 8, { - 0x90, - 0x3d, - 0x84, - 0xc0, - 0x27, - 0x56, - 0xea, - 0x14, - } } }, - { 14, { 8, { - 0xee, - 0xf2, - 0x7a, - 0x8e, - 0x90, - 0xca, - 0x23, - 0xf7, - } } }, - { 15, { 8, { - 0xe5, - 0x45, - 0xbe, - 0x49, - 0x61, - 0xca, - 0x29, - 0xa1, - } } }, - { 16, { 8, { - 0xdb, - 0x9b, - 0xc2, - 0x57, - 0x7f, - 0xcc, - 0x2a, - 0x3f, - } } }, - { 17, { 8, { - 0x94, - 0x47, - 0xbe, - 0x2c, - 0xf5, - 0xe9, - 0x9a, - 0x69, - } } }, - { 18, { 8, { - 0x9c, - 0xd3, - 0x8d, - 0x96, - 0xf0, - 0xb3, - 0xc1, - 0x4b, - } } }, - { 19, { 8, { - 0xbd, - 0x61, - 0x79, - 0xa7, - 0x1d, - 0xc9, - 0x6d, - 0xbb, - } } }, - { 20, { 8, { - 0x98, - 0xee, - 0xa2, - 0x1a, - 0xf2, - 0x5c, - 0xd6, - 0xbe, - } } }, - { 21, { 8, { - 0xc7, - 0x67, - 0x3b, - 0x2e, - 0xb0, - 0xcb, - 0xf2, - 0xd0, - } } }, - { 22, { 8, { - 0x88, - 0x3e, - 0xa3, - 0xe3, - 0x95, - 0x67, - 0x53, - 0x93, - } } }, - { 23, { 8, { - 0xc8, - 0xce, - 0x5c, - 0xcd, - 0x8c, - 0x03, - 0x0c, - 0xa8, - } } }, - { 24, { 8, { - 0x94, - 0xaf, - 0x49, - 0xf6, - 0xc6, - 0x50, - 0xad, - 0xb8, - } } }, - { 25, { 8, { - 0xea, - 0xb8, - 0x85, - 0x8a, - 0xde, - 0x92, - 0xe1, - 0xbc, - } } }, - { 26, { 8, { - 0xf3, - 0x15, - 0xbb, - 0x5b, - 0xb8, - 0x35, - 0xd8, - 0x17, - } } }, - { 27, { 8, { - 0xad, - 0xcf, - 0x6b, - 0x07, - 0x63, - 0x61, - 0x2e, - 0x2f, - } } }, - { 28, { 8, { - 0xa5, - 0xc9, - 0x1d, - 0xa7, - 0xac, - 0xaa, - 0x4d, - 0xde, - } } }, - { 29, { 8, { - 0x71, - 0x65, - 0x95, - 0x87, - 0x66, - 0x50, - 0xa2, - 0xa6, - } } }, - { 30, { 8, { - 0x28, - 0xef, - 0x49, - 0x5c, - 0x53, - 0xa3, - 0x87, - 0xad, - } } }, - { 31, { 8, { - 0x42, - 0xc3, - 0x41, - 0xd8, - 0xfa, - 0x92, - 0xd8, - 0x32, - } } }, - { 32, { 8, { - 0xce, - 0x7c, - 0xf2, - 0x72, - 0x2f, - 0x51, - 0x27, - 0x71, - } } }, - { 33, { 8, { - 0xe3, - 0x78, - 0x59, - 0xf9, - 0x46, - 0x23, - 0xf3, - 0xa7, - } } }, - { 34, { 8, { - 0x38, - 0x12, - 0x05, - 0xbb, - 0x1a, - 0xb0, - 0xe0, - 0x12, - } } }, - { 35, { 8, { - 0xae, - 0x97, - 0xa1, - 0x0f, - 0xd4, - 0x34, - 0xe0, - 0x15, - } } }, - { 36, { 8, { - 0xb4, - 0xa3, - 0x15, - 0x08, - 0xbe, - 0xff, - 0x4d, - 0x31, - } } }, - { 37, { 8, { - 0x81, - 0x39, - 0x62, - 0x29, - 0xf0, - 0x90, - 0x79, - 0x02, - } } }, - { 38, { 8, { - 0x4d, - 0x0c, - 0xf4, - 0x9e, - 0xe5, - 0xd4, - 0xdc, - 0xca, - } } }, - { 39, { 8, { - 0x5c, - 0x73, - 0x33, - 0x6a, - 0x76, - 0xd8, - 0xbf, - 0x9a, - } } }, - { 40, { 8, { - 0xd0, - 0xa7, - 0x04, - 0x53, - 0x6b, - 0xa9, - 0x3e, - 0x0e, - } } }, - { 41, { 8, { - 0x92, - 0x59, - 0x58, - 0xfc, - 0xd6, - 0x42, - 0x0c, - 0xad, - } } }, - { 42, { 8, { - 0xa9, - 0x15, - 0xc2, - 0x9b, - 0xc8, - 0x06, - 0x73, - 0x18, - } } }, - { 43, { 8, { - 0x95, - 0x2b, - 0x79, - 0xf3, - 0xbc, - 0x0a, - 0xa6, - 0xd4, - } } }, - { 44, { 8, { - 0xf2, - 0x1d, - 0xf2, - 0xe4, - 0x1d, - 0x45, - 0x35, - 0xf9, - } } }, - { 45, { 8, { - 0x87, - 0x57, - 0x75, - 0x19, - 0x04, - 0x8f, - 0x53, - 0xa9, - } } }, - { 46, { 8, { - 0x10, - 0xa5, - 0x6c, - 0xf5, - 0xdf, - 0xcd, - 0x9a, - 0xdb, - } } }, - { 47, { 8, { - 0xeb, - 0x75, - 0x09, - 0x5c, - 0xcd, - 0x98, - 0x6c, - 0xd0, - } } }, - { 48, { 8, { - 0x51, - 0xa9, - 0xcb, - 0x9e, - 0xcb, - 0xa3, - 0x12, - 0xe6, - } } }, - { 49, { 8, { - 0x96, - 0xaf, - 0xad, - 0xfc, - 0x2c, - 0xe6, - 0x66, - 0xc7, - } } }, - { 50, { 8, { - 0x72, - 0xfe, - 0x52, - 0x97, - 0x5a, - 0x43, - 0x64, - 0xee, - } } }, - { 51, { 8, { - 0x5a, - 0x16, - 0x45, - 0xb2, - 0x76, - 0xd5, - 0x92, - 0xa1, - } } }, - { 52, { 8, { - 0xb2, - 0x74, - 0xcb, - 0x8e, - 0xbf, - 0x87, - 0x87, - 0x0a, - } } }, - { 53, { 8, { - 0x6f, - 0x9b, - 0xb4, - 0x20, - 0x3d, - 0xe7, - 0xb3, - 0x81, - } } }, - { 54, { 8, { - 0xea, - 0xec, - 0xb2, - 0xa3, - 0x0b, - 0x22, - 0xa8, - 0x7f, - } } }, - { 55, { 8, { - 0x99, - 0x24, - 0xa4, - 0x3c, - 0xc1, - 0x31, - 0x57, - 0x24, - } } }, - { 56, { 8, { - 0xbd, - 0x83, - 0x8d, - 0x3a, - 0xaf, - 0xbf, - 0x8d, - 0xb7, - } } }, - { 57, { 8, { - 0x0b, - 0x1a, - 0x2a, - 0x32, - 0x65, - 0xd5, - 0x1a, - 0xea, - } } }, - { 58, { 8, { - 0x13, - 0x50, - 0x79, - 0xa3, - 0x23, - 0x1c, - 0xe6, - 0x60, - } } }, - { 59, { 8, { - 0x93, - 0x2b, - 0x28, - 0x46, - 0xe4, - 0xd7, - 0x06, - 0x66, - } } }, - { 60, { 8, { - 0xe1, - 0x91, - 0x5f, - 0x5c, - 0xb1, - 0xec, - 0xa4, - 0x6c, - } } }, - { 61, { 8, { - 0xf3, - 0x25, - 0x96, - 0x5c, - 0xa1, - 0x6d, - 0x62, - 0x9f, - } } }, - { 62, { 8, { - 0x57, - 0x5f, - 0xf2, - 0x8e, - 0x60, - 0x38, - 0x1b, - 0xe5, - } } }, - { 63, { 8, { - 0x72, - 0x45, - 0x06, - 0xeb, - 0x4c, - 0x32, - 0x8a, - 0x95, - } } }, - { 0, { 16, { - 0xa3, - 0x81, - 0x7f, - 0x04, - 0xba, - 0x25, - 0xa8, - 0xe6, - 0x6d, - 0xf6, - 0x72, - 0x14, - 0xc7, - 0x55, - 0x02, - 0x93, - } } }, - { 1, { 16, { - 0xda, - 0x87, - 0xc1, - 0xd8, - 0x6b, - 0x99, - 0xaf, - 0x44, - 0x34, - 0x76, - 0x59, - 0x11, - 0x9b, - 0x22, - 0xfc, - 0x45, - } } }, - { 2, { 16, { - 0x81, - 0x77, - 0x22, - 0x8d, - 0xa4, - 0xa4, - 0x5d, - 0xc7, - 0xfc, - 0xa3, - 0x8b, - 0xde, - 0xf6, - 0x0a, - 0xff, - 0xe4, - } } }, - { 3, { 16, { - 0x9c, - 0x70, - 0xb6, - 0x0c, - 0x52, - 0x67, - 0xa9, - 0x4e, - 0x5f, - 0x33, - 0xb6, - 0xb0, - 0x29, - 0x85, - 0xed, - 0x51, - } } }, - { 4, { 16, { - 0xf8, - 0x81, - 0x64, - 0xc1, - 0x2d, - 0x9c, - 0x8f, - 0xaf, - 0x7d, - 0x0f, - 0x6e, - 0x7c, - 0x7b, - 0xcd, - 0x55, - 0x79, - } } }, - { 5, { 16, { - 0x13, - 0x68, - 0x87, - 0x59, - 0x80, - 0x77, - 0x6f, - 0x88, - 0x54, - 0x52, - 0x7a, - 0x07, - 0x69, - 0x0e, - 0x96, - 0x27, - } } }, - { 6, { 16, { - 0x14, - 0xee, - 0xca, - 0x33, - 0x8b, - 0x20, - 0x86, - 0x13, - 0x48, - 0x5e, - 0xa0, - 0x30, - 0x8f, - 0xd7, - 0xa1, - 0x5e, - } } }, - { 7, { 16, { - 0xa1, - 0xf1, - 0xeb, - 0xbe, - 0xd8, - 0xdb, - 0xc1, - 0x53, - 0xc0, - 0xb8, - 0x4a, - 0xa6, - 0x1f, - 0xf0, - 0x82, - 0x39, - } } }, - { 8, { 16, { - 0x3b, - 0x62, - 0xa9, - 0xba, - 0x62, - 0x58, - 0xf5, - 0x61, - 0x0f, - 0x83, - 0xe2, - 0x64, - 0xf3, - 0x14, - 0x97, - 0xb4, - } } }, - { 9, { 16, { - 0x26, - 0x44, - 0x99, - 0x06, - 0x0a, - 0xd9, - 0xba, - 0xab, - 0xc4, - 0x7f, - 0x8b, - 0x02, - 0xbb, - 0x6d, - 0x71, - 0xed, - } } }, - { 10, { 16, { - 0x00, - 0x11, - 0x0d, - 0xc3, - 0x78, - 0x14, - 0x69, - 0x56, - 0xc9, - 0x54, - 0x47, - 0xd3, - 0xf3, - 0xd0, - 0xfb, - 0xba, - } } }, - { 11, { 16, { - 0x01, - 0x51, - 0xc5, - 0x68, - 0x38, - 0x6b, - 0x66, - 0x77, - 0xa2, - 0xb4, - 0xdc, - 0x6f, - 0x81, - 0xe5, - 0xdc, - 0x18, - } } }, - { 12, { 16, { - 0xd6, - 0x26, - 0xb2, - 0x66, - 0x90, - 0x5e, - 0xf3, - 0x58, - 0x82, - 0x63, - 0x4d, - 0xf6, - 0x85, - 0x32, - 0xc1, - 0x25, - } } }, - { 13, { 16, { - 0x98, - 0x69, - 0xe2, - 0x47, - 0xe9, - 0xc0, - 0x8b, - 0x10, - 0xd0, - 0x29, - 0x93, - 0x4f, - 0xc4, - 0xb9, - 0x52, - 0xf7, - } } }, - { 14, { 16, { - 0x31, - 0xfc, - 0xef, - 0xac, - 0x66, - 0xd7, - 0xde, - 0x9c, - 0x7e, - 0xc7, - 0x48, - 0x5f, - 0xe4, - 0x49, - 0x49, - 0x02, - } } }, - { 15, { 16, { - 0x54, - 0x93, - 0xe9, - 0x99, - 0x33, - 0xb0, - 0xa8, - 0x11, - 0x7e, - 0x08, - 0xec, - 0x0f, - 0x97, - 0xcf, - 0xc3, - 0xd9, - } } }, - { 16, { 16, { - 0x6e, - 0xe2, - 0xa4, - 0xca, - 0x67, - 0xb0, - 0x54, - 0xbb, - 0xfd, - 0x33, - 0x15, - 0xbf, - 0x85, - 0x23, - 0x05, - 0x77, - } } }, - { 17, { 16, { - 0x47, - 0x3d, - 0x06, - 0xe8, - 0x73, - 0x8d, - 0xb8, - 0x98, - 0x54, - 0xc0, - 0x66, - 0xc4, - 0x7a, - 0xe4, - 0x77, - 0x40, - } } }, - { 18, { 16, { - 0xa4, - 0x26, - 0xe5, - 0xe4, - 0x23, - 0xbf, - 0x48, - 0x85, - 0x29, - 0x4d, - 0xa4, - 0x81, - 0xfe, - 0xae, - 0xf7, - 0x23, - } } }, - { 19, { 16, { - 0x78, - 0x01, - 0x77, - 0x31, - 0xcf, - 0x65, - 0xfa, - 0xb0, - 0x74, - 0xd5, - 0x20, - 0x89, - 0x52, - 0x51, - 0x2e, - 0xb1, - } } }, - { 20, { 16, { - 0x9e, - 0x25, - 0xfc, - 0x83, - 0x3f, - 0x22, - 0x90, - 0x73, - 0x3e, - 0x93, - 0x44, - 0xa5, - 0xe8, - 0x38, - 0x39, - 0xeb, - } } }, - { 21, { 16, { - 0x56, - 0x8e, - 0x49, - 0x5a, - 0xbe, - 0x52, - 0x5a, - 0x21, - 0x8a, - 0x22, - 0x14, - 0xcd, - 0x3e, - 0x07, - 0x1d, - 0x12, - } } }, - { 22, { 16, { - 0x4a, - 0x29, - 0xb5, - 0x45, - 0x52, - 0xd1, - 0x6b, - 0x9a, - 0x46, - 0x9c, - 0x10, - 0x52, - 0x8e, - 0xff, - 0x0a, - 0xae, - } } }, - { 23, { 16, { - 0xc9, - 0xd1, - 0x84, - 0xdd, - 0xd5, - 0xa9, - 0xf5, - 0xe0, - 0xcf, - 0x8c, - 0xe2, - 0x9a, - 0x9a, - 0xbf, - 0x69, - 0x1c, - } } }, - { 24, { 16, { - 0x2d, - 0xb4, - 0x79, - 0xae, - 0x78, - 0xbd, - 0x50, - 0xd8, - 0x88, - 0x2a, - 0x8a, - 0x17, - 0x8a, - 0x61, - 0x32, - 0xad, - } } }, - { 25, { 16, { - 0x8e, - 0xce, - 0x5f, - 0x04, - 0x2d, - 0x5e, - 0x44, - 0x7b, - 0x50, - 0x51, - 0xb9, - 0xea, - 0xcb, - 0x8d, - 0x8f, - 0x6f, - } } }, - { 26, { 16, { - 0x9c, - 0x0b, - 0x53, - 0xb4, - 0xb3, - 0xc3, - 0x07, - 0xe8, - 0x7e, - 0xae, - 0xe0, - 0x86, - 0x78, - 0x14, - 0x1f, - 0x66, - } } }, - { 27, { 16, { - 0xab, - 0xf2, - 0x48, - 0xaf, - 0x69, - 0xa6, - 0xea, - 0xe4, - 0xbf, - 0xd3, - 0xeb, - 0x2f, - 0x12, - 0x9e, - 0xeb, - 0x94, - } } }, - { 28, { 16, { - 0x06, - 0x64, - 0xda, - 0x16, - 0x68, - 0x57, - 0x4b, - 0x88, - 0xb9, - 0x35, - 0xf3, - 0x02, - 0x73, - 0x58, - 0xae, - 0xf4, - } } }, - { 29, { 16, { - 0xaa, - 0x4b, - 0x9d, - 0xc4, - 0xbf, - 0x33, - 0x7d, - 0xe9, - 0x0c, - 0xd4, - 0xfd, - 0x3c, - 0x46, - 0x7c, - 0x6a, - 0xb7, - } } }, - { 30, { 16, { - 0xea, - 0x5c, - 0x7f, - 0x47, - 0x1f, - 0xaf, - 0x6b, - 0xde, - 0x2b, - 0x1a, - 0xd7, - 0xd4, - 0x68, - 0x6d, - 0x22, - 0x87, - } } }, - { 31, { 16, { - 0x29, - 0x39, - 0xb0, - 0x18, - 0x32, - 0x23, - 0xfa, - 0xfc, - 0x17, - 0x23, - 0xde, - 0x4f, - 0x52, - 0xc4, - 0x3d, - 0x35, - } } }, - { 32, { 16, { - 0x7c, - 0x39, - 0x56, - 0xca, - 0x5e, - 0xea, - 0xfc, - 0x3e, - 0x36, - 0x3e, - 0x9d, - 0x55, - 0x65, - 0x46, - 0xeb, - 0x68, - } } }, - { 33, { 16, { - 0x77, - 0xc6, - 0x07, - 0x71, - 0x46, - 0xf0, - 0x1c, - 0x32, - 0xb6, - 0xb6, - 0x9d, - 0x5f, - 0x4e, - 0xa9, - 0xff, - 0xcf, - } } }, - { 34, { 16, { - 0x37, - 0xa6, - 0x98, - 0x6c, - 0xb8, - 0x84, - 0x7e, - 0xdf, - 0x09, - 0x25, - 0xf0, - 0xf1, - 0x30, - 0x9b, - 0x54, - 0xde, - } } }, - { 35, { 16, { - 0xa7, - 0x05, - 0xf0, - 0xe6, - 0x9d, - 0xa9, - 0xa8, - 0xf9, - 0x07, - 0x24, - 0x1a, - 0x2e, - 0x92, - 0x3c, - 0x8c, - 0xc8, - } } }, - { 36, { 16, { - 0x3d, - 0xc4, - 0x7d, - 0x1f, - 0x29, - 0xc4, - 0x48, - 0x46, - 0x1e, - 0x9e, - 0x76, - 0xed, - 0x90, - 0x4f, - 0x67, - 0x11, - } } }, - { 37, { 16, { - 0x0d, - 0x62, - 0xbf, - 0x01, - 0xe6, - 0xfc, - 0x0e, - 0x1a, - 0x0d, - 0x3c, - 0x47, - 0x51, - 0xc5, - 0xd3, - 0x69, - 0x2b, - } } }, - { 38, { 16, { - 0x8c, - 0x03, - 0x46, - 0x8b, - 0xca, - 0x7c, - 0x66, - 0x9e, - 0xe4, - 0xfd, - 0x5e, - 0x08, - 0x4b, - 0xbe, - 0xe7, - 0xb5, - } } }, - { 39, { 16, { - 0x52, - 0x8a, - 0x5b, - 0xb9, - 0x3b, - 0xaf, - 0x2c, - 0x9c, - 0x44, - 0x73, - 0xcc, - 0xe5, - 0xd0, - 0xd2, - 0x2b, - 0xd9, - } } }, - { 40, { 16, { - 0xdf, - 0x6a, - 0x30, - 0x1e, - 0x95, - 0xc9, - 0x5d, - 0xad, - 0x97, - 0xae, - 0x0c, - 0xc8, - 0xc6, - 0x91, - 0x3b, - 0xd8, - } } }, - { 41, { 16, { - 0x80, - 0x11, - 0x89, - 0x90, - 0x2c, - 0x85, - 0x7f, - 0x39, - 0xe7, - 0x35, - 0x91, - 0x28, - 0x5e, - 0x70, - 0xb6, - 0xdb, - } } }, - { 42, { 16, { - 0xe6, - 0x17, - 0x34, - 0x6a, - 0xc9, - 0xc2, - 0x31, - 0xbb, - 0x36, - 0x50, - 0xae, - 0x34, - 0xcc, - 0xca, - 0x0c, - 0x5b, - } } }, - { 43, { 16, { - 0x27, - 0xd9, - 0x34, - 0x37, - 0xef, - 0xb7, - 0x21, - 0xaa, - 0x40, - 0x18, - 0x21, - 0xdc, - 0xec, - 0x5a, - 0xdf, - 0x89, - } } }, - { 44, { 16, { - 0x89, - 0x23, - 0x7d, - 0x9d, - 0xed, - 0x9c, - 0x5e, - 0x78, - 0xd8, - 0xb1, - 0xc9, - 0xb1, - 0x66, - 0xcc, - 0x73, - 0x42, - } } }, - { 45, { 16, { - 0x4a, - 0x6d, - 0x80, - 0x91, - 0xbf, - 0x5e, - 0x7d, - 0x65, - 0x11, - 0x89, - 0xfa, - 0x94, - 0xa2, - 0x50, - 0xb1, - 0x4c, - } } }, - { 46, { 16, { - 0x0e, - 0x33, - 0xf9, - 0x60, - 0x55, - 0xe7, - 0xae, - 0x89, - 0x3f, - 0xfc, - 0x0e, - 0x3d, - 0xcf, - 0x49, - 0x29, - 0x02, - } } }, - { 47, { 16, { - 0xe6, - 0x1c, - 0x43, - 0x2b, - 0x72, - 0x0b, - 0x19, - 0xd1, - 0x8e, - 0xc8, - 0xd8, - 0x4b, - 0xdc, - 0x63, - 0x15, - 0x1b, - } } }, - { 48, { 16, { - 0xf7, - 0xe5, - 0xae, - 0xf5, - 0x49, - 0xf7, - 0x82, - 0xcf, - 0x37, - 0x90, - 0x55, - 0xa6, - 0x08, - 0x26, - 0x9b, - 0x16, - } } }, - { 49, { 16, { - 0x43, - 0x8d, - 0x03, - 0x0f, - 0xd0, - 0xb7, - 0xa5, - 0x4f, - 0xa8, - 0x37, - 0xf2, - 0xad, - 0x20, - 0x1a, - 0x64, - 0x03, - } } }, - { 50, { 16, { - 0xa5, - 0x90, - 0xd3, - 0xee, - 0x4f, - 0xbf, - 0x04, - 0xe3, - 0x24, - 0x7e, - 0x0d, - 0x27, - 0xf2, - 0x86, - 0x42, - 0x3f, - } } }, - { 51, { 16, { - 0x5f, - 0xe2, - 0xc1, - 0xa1, - 0x72, - 0xfe, - 0x93, - 0xc4, - 0xb1, - 0x5c, - 0xd3, - 0x7c, - 0xae, - 0xf9, - 0xf5, - 0x38, - } } }, - { 52, { 16, { - 0x2c, - 0x97, - 0x32, - 0x5c, - 0xbd, - 0x06, - 0xb3, - 0x6e, - 0xb2, - 0x13, - 0x3d, - 0xd0, - 0x8b, - 0x3a, - 0x01, - 0x7c, - } } }, - { 53, { 16, { - 0x92, - 0xc8, - 0x14, - 0x22, - 0x7a, - 0x6b, - 0xca, - 0x94, - 0x9f, - 0xf0, - 0x65, - 0x9f, - 0x00, - 0x2a, - 0xd3, - 0x9e, - } } }, - { 54, { 16, { - 0xdc, - 0xe8, - 0x50, - 0x11, - 0x0b, - 0xd8, - 0x32, - 0x8c, - 0xfb, - 0xd5, - 0x08, - 0x41, - 0xd6, - 0x91, - 0x1d, - 0x87, - } } }, - { 55, { 16, { - 0x67, - 0xf1, - 0x49, - 0x84, - 0xc7, - 0xda, - 0x79, - 0x12, - 0x48, - 0xe3, - 0x2b, - 0xb5, - 0x92, - 0x25, - 0x83, - 0xda, - } } }, - { 56, { 16, { - 0x19, - 0x38, - 0xf2, - 0xcf, - 0x72, - 0xd5, - 0x4e, - 0xe9, - 0x7e, - 0x94, - 0x16, - 0x6f, - 0xa9, - 0x1d, - 0x2a, - 0x36, - } } }, - { 57, { 16, { - 0x74, - 0x48, - 0x1e, - 0x96, - 0x46, - 0xed, - 0x49, - 0xfe, - 0x0f, - 0x62, - 0x24, - 0x30, - 0x16, - 0x04, - 0x69, - 0x8e, - } } }, - { 58, { 16, { - 0x57, - 0xfc, - 0xa5, - 0xde, - 0x98, - 0xa9, - 0xd6, - 0xd8, - 0x00, - 0x64, - 0x38, - 0xd0, - 0x58, - 0x3d, - 0x8a, - 0x1d, - } } }, - { 59, { 16, { - 0x9f, - 0xec, - 0xde, - 0x1c, - 0xef, - 0xdc, - 0x1c, - 0xbe, - 0xd4, - 0x76, - 0x36, - 0x74, - 0xd9, - 0x57, - 0x53, - 0x59, - } } }, - { 60, { 16, { - 0xe3, - 0x04, - 0x0c, - 0x00, - 0xeb, - 0x28, - 0xf1, - 0x53, - 0x66, - 0xca, - 0x73, - 0xcb, - 0xd8, - 0x72, - 0xe7, - 0x40, - } } }, - { 61, { 16, { - 0x76, - 0x97, - 0x00, - 0x9a, - 0x6a, - 0x83, - 0x1d, - 0xfe, - 0xcc, - 0xa9, - 0x1c, - 0x59, - 0x93, - 0x67, - 0x0f, - 0x7a, - } } }, - { 62, { 16, { - 0x58, - 0x53, - 0x54, - 0x23, - 0x21, - 0xf5, - 0x67, - 0xa0, - 0x05, - 0xd5, - 0x47, - 0xa4, - 0xf0, - 0x47, - 0x59, - 0xbd, - } } }, - { 63, { 16, { - 0x51, - 0x50, - 0xd1, - 0x77, - 0x2f, - 0x50, - 0x83, - 0x4a, - 0x50, - 0x3e, - 0x06, - 0x9a, - 0x97, - 0x3f, - 0xbd, - 0x7c, - } } } + { 0, { 8, { 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72 } } }, + { 1, { 8, { 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74 } } }, + { 2, { 8, { 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d } } }, + { 3, { 8, { 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85 } } }, + { 4, { 8, { 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf } } }, + { 5, { 8, { 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18 } } }, + { 6, { 8, { 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb } } }, + { 7, { 8, { 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab } } }, + { 8, { 8, { 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93 } } }, + { 9, { 8, { 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e } } }, + { 10, { 8, { 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a } } }, + { 11, { 8, { 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4 } } }, + { 12, { 8, { 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75 } } }, + { 13, { 8, { 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14 } } }, + { 14, { 8, { 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7 } } }, + { 15, { 8, { 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1 } } }, + { 16, { 8, { 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f } } }, + { 17, { 8, { 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69 } } }, + { 18, { 8, { 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b } } }, + { 19, { 8, { 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb } } }, + { 20, { 8, { 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe } } }, + { 21, { 8, { 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0 } } }, + { 22, { 8, { 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93 } } }, + { 23, { 8, { 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8 } } }, + { 24, { 8, { 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8 } } }, + { 25, { 8, { 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc } } }, + { 26, { 8, { 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17 } } }, + { 27, { 8, { 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f } } }, + { 28, { 8, { 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde } } }, + { 29, { 8, { 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6 } } }, + { 30, { 8, { 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad } } }, + { 31, { 8, { 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32 } } }, + { 32, { 8, { 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71 } } }, + { 33, { 8, { 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7 } } }, + { 34, { 8, { 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12 } } }, + { 35, { 8, { 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15 } } }, + { 36, { 8, { 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31 } } }, + { 37, { 8, { 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02 } } }, + { 38, { 8, { 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca } } }, + { 39, { 8, { 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a } } }, + { 40, { 8, { 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e } } }, + { 41, { 8, { 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad } } }, + { 42, { 8, { 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18 } } }, + { 43, { 8, { 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4 } } }, + { 44, { 8, { 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9 } } }, + { 45, { 8, { 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9 } } }, + { 46, { 8, { 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb } } }, + { 47, { 8, { 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0 } } }, + { 48, { 8, { 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6 } } }, + { 49, { 8, { 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7 } } }, + { 50, { 8, { 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee } } }, + { 51, { 8, { 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1 } } }, + { 52, { 8, { 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a } } }, + { 53, { 8, { 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81 } } }, + { 54, { 8, { 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f } } }, + { 55, { 8, { 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24 } } }, + { 56, { 8, { 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7 } } }, + { 57, { 8, { 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea } } }, + { 58, { 8, { 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60 } } }, + { 59, { 8, { 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66 } } }, + { 60, { 8, { 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c } } }, + { 61, { 8, { 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f } } }, + { 62, { 8, { 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5 } } }, + { 63, { 8, { 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95 } } }, + { 0, { 16, { 0xa3, 0x81, 0x7f, 0x04, 0xba, 0x25, 0xa8, 0xe6, 0x6d, 0xf6, 0x72, 0x14, 0xc7, 0x55, 0x02, 0x93 } } }, + { 1, { 16, { 0xda, 0x87, 0xc1, 0xd8, 0x6b, 0x99, 0xaf, 0x44, 0x34, 0x76, 0x59, 0x11, 0x9b, 0x22, 0xfc, 0x45 } } }, + { 2, { 16, { 0x81, 0x77, 0x22, 0x8d, 0xa4, 0xa4, 0x5d, 0xc7, 0xfc, 0xa3, 0x8b, 0xde, 0xf6, 0x0a, 0xff, 0xe4 } } }, + { 3, { 16, { 0x9c, 0x70, 0xb6, 0x0c, 0x52, 0x67, 0xa9, 0x4e, 0x5f, 0x33, 0xb6, 0xb0, 0x29, 0x85, 0xed, 0x51 } } }, + { 4, { 16, { 0xf8, 0x81, 0x64, 0xc1, 0x2d, 0x9c, 0x8f, 0xaf, 0x7d, 0x0f, 0x6e, 0x7c, 0x7b, 0xcd, 0x55, 0x79 } } }, + { 5, { 16, { 0x13, 0x68, 0x87, 0x59, 0x80, 0x77, 0x6f, 0x88, 0x54, 0x52, 0x7a, 0x07, 0x69, 0x0e, 0x96, 0x27 } } }, + { 6, { 16, { 0x14, 0xee, 0xca, 0x33, 0x8b, 0x20, 0x86, 0x13, 0x48, 0x5e, 0xa0, 0x30, 0x8f, 0xd7, 0xa1, 0x5e } } }, + { 7, { 16, { 0xa1, 0xf1, 0xeb, 0xbe, 0xd8, 0xdb, 0xc1, 0x53, 0xc0, 0xb8, 0x4a, 0xa6, 0x1f, 0xf0, 0x82, 0x39 } } }, + { 8, { 16, { 0x3b, 0x62, 0xa9, 0xba, 0x62, 0x58, 0xf5, 0x61, 0x0f, 0x83, 0xe2, 0x64, 0xf3, 0x14, 0x97, 0xb4 } } }, + { 9, { 16, { 0x26, 0x44, 0x99, 0x06, 0x0a, 0xd9, 0xba, 0xab, 0xc4, 0x7f, 0x8b, 0x02, 0xbb, 0x6d, 0x71, 0xed } } }, + { 10, { 16, { 0x00, 0x11, 0x0d, 0xc3, 0x78, 0x14, 0x69, 0x56, 0xc9, 0x54, 0x47, 0xd3, 0xf3, 0xd0, 0xfb, 0xba } } }, + { 11, { 16, { 0x01, 0x51, 0xc5, 0x68, 0x38, 0x6b, 0x66, 0x77, 0xa2, 0xb4, 0xdc, 0x6f, 0x81, 0xe5, 0xdc, 0x18 } } }, + { 12, { 16, { 0xd6, 0x26, 0xb2, 0x66, 0x90, 0x5e, 0xf3, 0x58, 0x82, 0x63, 0x4d, 0xf6, 0x85, 0x32, 0xc1, 0x25 } } }, + { 13, { 16, { 0x98, 0x69, 0xe2, 0x47, 0xe9, 0xc0, 0x8b, 0x10, 0xd0, 0x29, 0x93, 0x4f, 0xc4, 0xb9, 0x52, 0xf7 } } }, + { 14, { 16, { 0x31, 0xfc, 0xef, 0xac, 0x66, 0xd7, 0xde, 0x9c, 0x7e, 0xc7, 0x48, 0x5f, 0xe4, 0x49, 0x49, 0x02 } } }, + { 15, { 16, { 0x54, 0x93, 0xe9, 0x99, 0x33, 0xb0, 0xa8, 0x11, 0x7e, 0x08, 0xec, 0x0f, 0x97, 0xcf, 0xc3, 0xd9 } } }, + { 16, { 16, { 0x6e, 0xe2, 0xa4, 0xca, 0x67, 0xb0, 0x54, 0xbb, 0xfd, 0x33, 0x15, 0xbf, 0x85, 0x23, 0x05, 0x77 } } }, + { 17, { 16, { 0x47, 0x3d, 0x06, 0xe8, 0x73, 0x8d, 0xb8, 0x98, 0x54, 0xc0, 0x66, 0xc4, 0x7a, 0xe4, 0x77, 0x40 } } }, + { 18, { 16, { 0xa4, 0x26, 0xe5, 0xe4, 0x23, 0xbf, 0x48, 0x85, 0x29, 0x4d, 0xa4, 0x81, 0xfe, 0xae, 0xf7, 0x23 } } }, + { 19, { 16, { 0x78, 0x01, 0x77, 0x31, 0xcf, 0x65, 0xfa, 0xb0, 0x74, 0xd5, 0x20, 0x89, 0x52, 0x51, 0x2e, 0xb1 } } }, + { 20, { 16, { 0x9e, 0x25, 0xfc, 0x83, 0x3f, 0x22, 0x90, 0x73, 0x3e, 0x93, 0x44, 0xa5, 0xe8, 0x38, 0x39, 0xeb } } }, + { 21, { 16, { 0x56, 0x8e, 0x49, 0x5a, 0xbe, 0x52, 0x5a, 0x21, 0x8a, 0x22, 0x14, 0xcd, 0x3e, 0x07, 0x1d, 0x12 } } }, + { 22, { 16, { 0x4a, 0x29, 0xb5, 0x45, 0x52, 0xd1, 0x6b, 0x9a, 0x46, 0x9c, 0x10, 0x52, 0x8e, 0xff, 0x0a, 0xae } } }, + { 23, { 16, { 0xc9, 0xd1, 0x84, 0xdd, 0xd5, 0xa9, 0xf5, 0xe0, 0xcf, 0x8c, 0xe2, 0x9a, 0x9a, 0xbf, 0x69, 0x1c } } }, + { 24, { 16, { 0x2d, 0xb4, 0x79, 0xae, 0x78, 0xbd, 0x50, 0xd8, 0x88, 0x2a, 0x8a, 0x17, 0x8a, 0x61, 0x32, 0xad } } }, + { 25, { 16, { 0x8e, 0xce, 0x5f, 0x04, 0x2d, 0x5e, 0x44, 0x7b, 0x50, 0x51, 0xb9, 0xea, 0xcb, 0x8d, 0x8f, 0x6f } } }, + { 26, { 16, { 0x9c, 0x0b, 0x53, 0xb4, 0xb3, 0xc3, 0x07, 0xe8, 0x7e, 0xae, 0xe0, 0x86, 0x78, 0x14, 0x1f, 0x66 } } }, + { 27, { 16, { 0xab, 0xf2, 0x48, 0xaf, 0x69, 0xa6, 0xea, 0xe4, 0xbf, 0xd3, 0xeb, 0x2f, 0x12, 0x9e, 0xeb, 0x94 } } }, + { 28, { 16, { 0x06, 0x64, 0xda, 0x16, 0x68, 0x57, 0x4b, 0x88, 0xb9, 0x35, 0xf3, 0x02, 0x73, 0x58, 0xae, 0xf4 } } }, + { 29, { 16, { 0xaa, 0x4b, 0x9d, 0xc4, 0xbf, 0x33, 0x7d, 0xe9, 0x0c, 0xd4, 0xfd, 0x3c, 0x46, 0x7c, 0x6a, 0xb7 } } }, + { 30, { 16, { 0xea, 0x5c, 0x7f, 0x47, 0x1f, 0xaf, 0x6b, 0xde, 0x2b, 0x1a, 0xd7, 0xd4, 0x68, 0x6d, 0x22, 0x87 } } }, + { 31, { 16, { 0x29, 0x39, 0xb0, 0x18, 0x32, 0x23, 0xfa, 0xfc, 0x17, 0x23, 0xde, 0x4f, 0x52, 0xc4, 0x3d, 0x35 } } }, + { 32, { 16, { 0x7c, 0x39, 0x56, 0xca, 0x5e, 0xea, 0xfc, 0x3e, 0x36, 0x3e, 0x9d, 0x55, 0x65, 0x46, 0xeb, 0x68 } } }, + { 33, { 16, { 0x77, 0xc6, 0x07, 0x71, 0x46, 0xf0, 0x1c, 0x32, 0xb6, 0xb6, 0x9d, 0x5f, 0x4e, 0xa9, 0xff, 0xcf } } }, + { 34, { 16, { 0x37, 0xa6, 0x98, 0x6c, 0xb8, 0x84, 0x7e, 0xdf, 0x09, 0x25, 0xf0, 0xf1, 0x30, 0x9b, 0x54, 0xde } } }, + { 35, { 16, { 0xa7, 0x05, 0xf0, 0xe6, 0x9d, 0xa9, 0xa8, 0xf9, 0x07, 0x24, 0x1a, 0x2e, 0x92, 0x3c, 0x8c, 0xc8 } } }, + { 36, { 16, { 0x3d, 0xc4, 0x7d, 0x1f, 0x29, 0xc4, 0x48, 0x46, 0x1e, 0x9e, 0x76, 0xed, 0x90, 0x4f, 0x67, 0x11 } } }, + { 37, { 16, { 0x0d, 0x62, 0xbf, 0x01, 0xe6, 0xfc, 0x0e, 0x1a, 0x0d, 0x3c, 0x47, 0x51, 0xc5, 0xd3, 0x69, 0x2b } } }, + { 38, { 16, { 0x8c, 0x03, 0x46, 0x8b, 0xca, 0x7c, 0x66, 0x9e, 0xe4, 0xfd, 0x5e, 0x08, 0x4b, 0xbe, 0xe7, 0xb5 } } }, + { 39, { 16, { 0x52, 0x8a, 0x5b, 0xb9, 0x3b, 0xaf, 0x2c, 0x9c, 0x44, 0x73, 0xcc, 0xe5, 0xd0, 0xd2, 0x2b, 0xd9 } } }, + { 40, { 16, { 0xdf, 0x6a, 0x30, 0x1e, 0x95, 0xc9, 0x5d, 0xad, 0x97, 0xae, 0x0c, 0xc8, 0xc6, 0x91, 0x3b, 0xd8 } } }, + { 41, { 16, { 0x80, 0x11, 0x89, 0x90, 0x2c, 0x85, 0x7f, 0x39, 0xe7, 0x35, 0x91, 0x28, 0x5e, 0x70, 0xb6, 0xdb } } }, + { 42, { 16, { 0xe6, 0x17, 0x34, 0x6a, 0xc9, 0xc2, 0x31, 0xbb, 0x36, 0x50, 0xae, 0x34, 0xcc, 0xca, 0x0c, 0x5b } } }, + { 43, { 16, { 0x27, 0xd9, 0x34, 0x37, 0xef, 0xb7, 0x21, 0xaa, 0x40, 0x18, 0x21, 0xdc, 0xec, 0x5a, 0xdf, 0x89 } } }, + { 44, { 16, { 0x89, 0x23, 0x7d, 0x9d, 0xed, 0x9c, 0x5e, 0x78, 0xd8, 0xb1, 0xc9, 0xb1, 0x66, 0xcc, 0x73, 0x42 } } }, + { 45, { 16, { 0x4a, 0x6d, 0x80, 0x91, 0xbf, 0x5e, 0x7d, 0x65, 0x11, 0x89, 0xfa, 0x94, 0xa2, 0x50, 0xb1, 0x4c } } }, + { 46, { 16, { 0x0e, 0x33, 0xf9, 0x60, 0x55, 0xe7, 0xae, 0x89, 0x3f, 0xfc, 0x0e, 0x3d, 0xcf, 0x49, 0x29, 0x02 } } }, + { 47, { 16, { 0xe6, 0x1c, 0x43, 0x2b, 0x72, 0x0b, 0x19, 0xd1, 0x8e, 0xc8, 0xd8, 0x4b, 0xdc, 0x63, 0x15, 0x1b } } }, + { 48, { 16, { 0xf7, 0xe5, 0xae, 0xf5, 0x49, 0xf7, 0x82, 0xcf, 0x37, 0x90, 0x55, 0xa6, 0x08, 0x26, 0x9b, 0x16 } } }, + { 49, { 16, { 0x43, 0x8d, 0x03, 0x0f, 0xd0, 0xb7, 0xa5, 0x4f, 0xa8, 0x37, 0xf2, 0xad, 0x20, 0x1a, 0x64, 0x03 } } }, + { 50, { 16, { 0xa5, 0x90, 0xd3, 0xee, 0x4f, 0xbf, 0x04, 0xe3, 0x24, 0x7e, 0x0d, 0x27, 0xf2, 0x86, 0x42, 0x3f } } }, + { 51, { 16, { 0x5f, 0xe2, 0xc1, 0xa1, 0x72, 0xfe, 0x93, 0xc4, 0xb1, 0x5c, 0xd3, 0x7c, 0xae, 0xf9, 0xf5, 0x38 } } }, + { 52, { 16, { 0x2c, 0x97, 0x32, 0x5c, 0xbd, 0x06, 0xb3, 0x6e, 0xb2, 0x13, 0x3d, 0xd0, 0x8b, 0x3a, 0x01, 0x7c } } }, + { 53, { 16, { 0x92, 0xc8, 0x14, 0x22, 0x7a, 0x6b, 0xca, 0x94, 0x9f, 0xf0, 0x65, 0x9f, 0x00, 0x2a, 0xd3, 0x9e } } }, + { 54, { 16, { 0xdc, 0xe8, 0x50, 0x11, 0x0b, 0xd8, 0x32, 0x8c, 0xfb, 0xd5, 0x08, 0x41, 0xd6, 0x91, 0x1d, 0x87 } } }, + { 55, { 16, { 0x67, 0xf1, 0x49, 0x84, 0xc7, 0xda, 0x79, 0x12, 0x48, 0xe3, 0x2b, 0xb5, 0x92, 0x25, 0x83, 0xda } } }, + { 56, { 16, { 0x19, 0x38, 0xf2, 0xcf, 0x72, 0xd5, 0x4e, 0xe9, 0x7e, 0x94, 0x16, 0x6f, 0xa9, 0x1d, 0x2a, 0x36 } } }, + { 57, { 16, { 0x74, 0x48, 0x1e, 0x96, 0x46, 0xed, 0x49, 0xfe, 0x0f, 0x62, 0x24, 0x30, 0x16, 0x04, 0x69, 0x8e } } }, + { 58, { 16, { 0x57, 0xfc, 0xa5, 0xde, 0x98, 0xa9, 0xd6, 0xd8, 0x00, 0x64, 0x38, 0xd0, 0x58, 0x3d, 0x8a, 0x1d } } }, + { 59, { 16, { 0x9f, 0xec, 0xde, 0x1c, 0xef, 0xdc, 0x1c, 0xbe, 0xd4, 0x76, 0x36, 0x74, 0xd9, 0x57, 0x53, 0x59 } } }, + { 60, { 16, { 0xe3, 0x04, 0x0c, 0x00, 0xeb, 0x28, 0xf1, 0x53, 0x66, 0xca, 0x73, 0xcb, 0xd8, 0x72, 0xe7, 0x40 } } }, + { 61, { 16, { 0x76, 0x97, 0x00, 0x9a, 0x6a, 0x83, 0x1d, 0xfe, 0xcc, 0xa9, 0x1c, 0x59, 0x93, 0x67, 0x0f, 0x7a } } }, + { 62, { 16, { 0x58, 0x53, 0x54, 0x23, 0x21, 0xf5, 0x67, 0xa0, 0x05, 0xd5, 0x47, 0xa4, 0xf0, 0x47, 0x59, 0xbd } } }, + { 63, { 16, { 0x51, 0x50, 0xd1, 0x77, 0x2f, 0x50, 0x83, 0x4a, 0x50, 0x3e, 0x06, 0x9a, 0x97, 0x3f, 0xbd, 0x7c } } } }; static int test_siphash(int idx) diff --git a/crypto/openssl/test/smime-eml/pkcs7-empty-digest-set.eml b/crypto/openssl/test/smime-eml/pkcs7-empty-digest-set.eml new file mode 100644 index 000000000000..a6db2c38adfa --- /dev/null +++ b/crypto/openssl/test/smime-eml/pkcs7-empty-digest-set.eml @@ -0,0 +1,45 @@ +MIME-Version: 1.0 +Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="sha-256"; boundary="----E0314CC5D732C92AE2D7A3BACDCDCFCE" + +This is an S/MIME signed message + +------E0314CC5D732C92AE2D7A3BACDCDCFCE +This is the content to be signed. + +------E0314CC5D732C92AE2D7A3BACDCDCFCE +Content-Type: application/x-pkcs7-signature; name="smime.p7s" +Content-Transfer-Encoding: base64 +Content-Disposition: attachment; filename="smime.p7s" + +MIIFWgYJKoZIhvcNAQcCoIIFSzCCBUcCAQExADALBgkqhkiG9w0BBwGgggLuMIIC +6jCCAdKgAwIBAgIUL5E46FxyhsT7C3G1NS27OtR7XAowDQYJKoZIhvcNAQELBQAw +FTETMBEGA1UEAwwKUG9DIFNpZ25lcjAeFw0yNjA1MDgxMDIwNDhaFw0yNzA1MDgx +MDIwNDhaMBUxEzARBgNVBAMMClBvQyBTaWduZXIwggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQDSSu/gupmIlclvmTMHiqOrCqmB8NRTjAMoI//MPJrnFXYp +FjDPMk7Y/kCcHztudaIvADkowaFtOm4oMinQFhjwCNCo5K5WrrlAitnpcd5QH2nA +iVZXjjohQUJEd7n33AGqTwo5EGaCK+alAZL7tA7bdhNi/aZ33L3bUNYqoHbXiNsE +u1tj8frLfIjduOt0TMPSOrrFjjEsrL3T3tg+HmxpalDHz7E6o9zJu0wlk8bcR2Xk +mpX8RdYCu7K9m39N1F2WKa9WJh24NQLpWRfwD213jaIFK2EXy/XHePDUeiMYtVOV +oovCSmY7OqowupA7J+4dcsnRjFqgZECctHhAfk+PAgMBAAGjMjAwMB0GA1UdDgQW +BBRZlupXNYq4fny0SE76sr/CdQ2DUTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3 +DQEBCwUAA4IBAQANOlttTWVz620JNTrPzhiR4x9+5UiF4GSqv8BRJQFj3Xh7fsUp ++3GDs9M27f4FVh3utJsjt7Sa9ZWLpBVdgjGBwGLAtPsoYMjhnUgZTUvwEk5+aXyv +zJxn4I7mMbDhlNCMHcVtGdtA+2UOEuvdGfuEilpzPsV8DzM1K3xU5bSWoo0BRFKK +srHkyEfxCFPAQOcX80ZbMO6zdcXeJjC6mQXGqy2aqeQob0vuSZJ7QHZBlRjY5YHR +wWlIqG8G3Eist16iTqdX2PQFZT1/QAEQ/LnXARTUUjUroccdci8YNASoeHDpcjRL +MBrN+QBNZVt5qLhDogwZb2ZwqKfZ8Aqg3oAkMYICPzCCAjsCAQEwLTAVMRMwEQYD +VQQDDApQb0MgU2lnbmVyAhQvkTjoXHKGxPsLcbU1Lbs61HtcCjANBglghkgBZQME +AgEFAKCB5DAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEP +Fw0yNjA1MDgxMDIwNDhaMC8GCSqGSIb3DQEJBDEiBCAvyoHfycLqb8UzVPizy1uA +o3h7tza3HebeiJaSnpIJHzB5BgkqhkiG9w0BCQ8xbDBqMAsGCWCGSAFlAwQBKjAL +BglghkgBZQMEARYwCwYJYIZIAWUDBAECMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMC +AgIAgDANBggqhkiG9w0DAgIBQDAHBgUrDgMCBzANBggqhkiG9w0DAgIBKDANBgkq +hkiG9w0BAQEFAASCAQBIpl7U2j4YiU1vdZHyx2dCK41ZahtTVOB4RVJcrmopgans +fICdkSTfb0dVqc13++bYn4i1b2R2os5YIkoGxdrM5aZB7KF9r1xwgrendTF4/BwP +gQq2khNtKebv9Yr0kOPynFIsgx5BHk99wrzfwidJUFuJJgQ9W0YOf7EGkbnZvPT+ +hV0aeLmJAb5jjWhbDciqUjR3O23JQhzVj4U3vo2TeN7VYmNJsX+fA4sZzIbYSei9 +ps7GZruiRcKgqgUj1l8HjIGMHqd9lccchk/BYyAGxAbgGisntvfJdPZO09wG8rHh +eS6FYkkXAKBO49WbhE9aVLJH0zgA6gTfyEvOOOS1 + +------E0314CC5D732C92AE2D7A3BACDCDCFCE-- + diff --git a/crypto/openssl/test/sslapitest.c b/crypto/openssl/test/sslapitest.c index 40922ce850e5..6d9d4eeb8fbd 100644 --- a/crypto/openssl/test/sslapitest.c +++ b/crypto/openssl/test/sslapitest.c @@ -8261,6 +8261,106 @@ end: } /* + * Callback that always returns ABORT for successfully decrypted tickets. + * Used by test_ticket_abort_session_leak to exercise the error path in + * tls_parse_ctos_psk() that previously leaked the SSL_SESSION. + */ +static SSL_TICKET_RETURN dec_tick_abort_cb(SSL *s, SSL_SESSION *ss, + const unsigned char *keyname, + size_t keyname_length, + SSL_TICKET_STATUS status, + void *arg) +{ + if (status == SSL_TICKET_SUCCESS || status == SSL_TICKET_SUCCESS_RENEW) + return SSL_TICKET_RETURN_ABORT; + + return SSL_TICKET_RETURN_IGNORE_RENEW; +} + +/* + * Test that returning SSL_TICKET_RETURN_ABORT from the decrypt ticket callback + * during TLS 1.3 resumption does not leak the SSL_SESSION allocated by + * tls_decrypt_ticket(). Before the fix, tls_parse_ctos_psk() would execute a + * bare "return 0" instead of "goto err", bypassing SSL_SESSION_free(sess). + * When run under LeakSanitizer the leaked session will be reported. + */ +static int test_ticket_abort_session_leak(void) +{ + SSL_CTX *cctx = NULL, *sctx = NULL; + SSL *clientssl = NULL, *serverssl = NULL; + SSL_SESSION *clntsess = NULL; + int testresult = 0; + +#ifdef OSSL_NO_USABLE_TLS1_3 + return 1; +#endif + + if (!TEST_true(create_ssl_ctx_pair(libctx, TLS_server_method(), + TLS_client_method(), + TLS1_3_VERSION, TLS1_3_VERSION, + &sctx, &cctx, cert, privkey))) + goto end; + + if (!TEST_true(SSL_CTX_set_session_cache_mode(sctx, SSL_SESS_CACHE_OFF))) + goto end; + + /* First handshake: use the normal gen/dec callbacks to get a ticket */ + if (!TEST_true(SSL_CTX_set_session_ticket_cb(sctx, gen_tick_cb, dec_tick_cb, + NULL))) + goto end; + + gen_tick_called = dec_tick_called = tick_key_cb_called = 0; + tick_dec_ret = SSL_TICKET_RETURN_USE_RENEW; + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, + NULL, NULL)) + || !TEST_true(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_NONE))) + goto end; + + clntsess = SSL_get1_session(clientssl); + if (!TEST_ptr(clntsess)) + goto end; + + SSL_shutdown(clientssl); + SSL_shutdown(serverssl); + SSL_free(serverssl); + SSL_free(clientssl); + serverssl = clientssl = NULL; + + /* + * Second handshake (resumption): switch to the abort callback. + * The server will decrypt the ticket, allocate an SSL_SESSION, then the + * callback returns ABORT. The handshake must fail, and the session + * allocated inside tls_decrypt_ticket() must be freed (not leaked). + */ + if (!TEST_true(SSL_CTX_set_session_ticket_cb(sctx, gen_tick_cb, + dec_tick_abort_cb, NULL))) + goto end; + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, + NULL, NULL)) + || !TEST_true(SSL_set_session(clientssl, clntsess))) + goto end; + + /* Resumption should fail because the callback aborts */ + if (!TEST_false(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_SSL))) + goto end; + + testresult = 1; + +end: + SSL_SESSION_free(clntsess); + SSL_free(serverssl); + SSL_free(clientssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + + return testresult; +} + +/* * Test incorrect shutdown. * Test 0: client does not shutdown properly, * server does not set SSL_OP_IGNORE_UNEXPECTED_EOF, @@ -11474,6 +11574,7 @@ int setup_tests(void) ADD_ALL_TESTS(test_ssl_pending, 2); ADD_ALL_TESTS(test_ssl_get_shared_ciphers, OSSL_NELEM(shared_ciphers_data)); ADD_ALL_TESTS(test_ticket_callbacks, 20); + ADD_TEST(test_ticket_abort_session_leak); ADD_ALL_TESTS(test_shutdown, 7); ADD_ALL_TESTS(test_incorrect_shutdown, 2); ADD_ALL_TESTS(test_cert_cb, 6); diff --git a/crypto/openssl/test/stack_test.c b/crypto/openssl/test/stack_test.c index 2175387c0844..7bea2a2b7f32 100644 --- a/crypto/openssl/test/stack_test.c +++ b/crypto/openssl/test/stack_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2017-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2026 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -29,17 +29,17 @@ typedef struct { int n; char c; -} SS; +} TST_SS; typedef union { int n; char c; -} SU; +} TST_SU; DEFINE_SPECIAL_STACK_OF(sint, int) DEFINE_SPECIAL_STACK_OF_CONST(uchar, unsigned char) -DEFINE_STACK_OF(SS) -DEFINE_STACK_OF_CONST(SU) +DEFINE_STACK_OF(TST_SS) +DEFINE_STACK_OF_CONST(TST_SU) static int int_compare(const int *const *a, const int *const *b) { @@ -255,25 +255,25 @@ end: return testresult; } -static SS *SS_copy(const SS *p) +static TST_SS *SS_copy(const TST_SS *p) { - SS *q = OPENSSL_malloc(sizeof(*q)); + TST_SS *q = OPENSSL_malloc(sizeof(*q)); if (q != NULL) memcpy(q, p, sizeof(*q)); return q; } -static void SS_free(SS *p) +static void SS_free(TST_SS *p) { OPENSSL_free(p); } static int test_SS_stack(void) { - STACK_OF(SS) *s = sk_SS_new_null(); - STACK_OF(SS) *r = NULL; - SS *v[10], *p; + STACK_OF(TST_SS) *s = sk_TST_SS_new_null(); + STACK_OF(TST_SS) *r = NULL; + TST_SS *v[10], *p; const int n = OSSL_NELEM(v); int i; int testresult = 0; @@ -286,25 +286,25 @@ static int test_SS_stack(void) goto end; v[i]->n = i; v[i]->c = 'A' + i; - if (!TEST_int_eq(sk_SS_num(s), i)) { + if (!TEST_int_eq(sk_TST_SS_num(s), i)) { TEST_info("SS stack size %d", i); goto end; } - sk_SS_push(s, v[i]); + sk_TST_SS_push(s, v[i]); } - if (!TEST_int_eq(sk_SS_num(s), n)) + if (!TEST_int_eq(sk_TST_SS_num(s), n)) goto end; /* deepcopy */ - r = sk_SS_deep_copy(NULL, &SS_copy, &SS_free); - if (sk_SS_num(r) != 0) + r = sk_TST_SS_deep_copy(NULL, &SS_copy, &SS_free); + if (sk_TST_SS_num(r) != 0) goto end; - sk_SS_free(r); - r = sk_SS_deep_copy(s, &SS_copy, &SS_free); + sk_TST_SS_free(r); + r = sk_TST_SS_deep_copy(s, &SS_copy, &SS_free); if (!TEST_ptr(r)) goto end; for (i = 0; i < n; i++) { - p = sk_SS_value(r, i); + p = sk_TST_SS_value(r, i); if (!TEST_ptr_ne(p, v[i])) { TEST_info("SS deepcopy non-copy %d", i); goto end; @@ -320,33 +320,33 @@ static int test_SS_stack(void) } /* pop_free - we rely on the malloc debug to catch the leak */ - sk_SS_pop_free(r, &SS_free); + sk_TST_SS_pop_free(r, &SS_free); r = NULL; /* delete_ptr */ - p = sk_SS_delete_ptr(s, v[3]); + p = sk_TST_SS_delete_ptr(s, v[3]); if (!TEST_ptr(p)) goto end; SS_free(p); - if (!TEST_int_eq(sk_SS_num(s), n - 1)) + if (!TEST_int_eq(sk_TST_SS_num(s), n - 1)) goto end; for (i = 0; i < n - 1; i++) - if (!TEST_ptr_eq(sk_SS_value(s, i), v[i < 3 ? i : 1 + i])) { + if (!TEST_ptr_eq(sk_TST_SS_value(s, i), v[i < 3 ? i : 1 + i])) { TEST_info("SS delete ptr item %d", i); goto end; } testresult = 1; end: - sk_SS_pop_free(r, &SS_free); - sk_SS_pop_free(s, &SS_free); + sk_TST_SS_pop_free(r, &SS_free); + sk_TST_SS_pop_free(s, &SS_free); return testresult; } static int test_SU_stack(void) { - STACK_OF(SU) *s = sk_SU_new_null(); - SU v[10]; + STACK_OF(TST_SU) *s = sk_TST_SU_new_null(); + TST_SU v[10]; const int n = OSSL_NELEM(v); int i; int testresult = 0; @@ -357,25 +357,25 @@ static int test_SU_stack(void) v[i].n = i; else v[i].c = 'A' + i; - if (!TEST_int_eq(sk_SU_num(s), i)) { + if (!TEST_int_eq(sk_TST_SU_num(s), i)) { TEST_info("SU stack size %d", i); goto end; } - sk_SU_push(s, v + i); + sk_TST_SU_push(s, v + i); } - if (!TEST_int_eq(sk_SU_num(s), n)) + if (!TEST_int_eq(sk_TST_SU_num(s), n)) goto end; /* check the pointers are correct */ for (i = 0; i < n; i++) - if (!TEST_ptr_eq(sk_SU_value(s, i), v + i)) { + if (!TEST_ptr_eq(sk_TST_SU_value(s, i), v + i)) { TEST_info("SU pointer check %d", i); goto end; } testresult = 1; end: - sk_SU_free(s); + sk_TST_SU_free(s); return testresult; } diff --git a/crypto/openssl/test/tls13tickettest.c b/crypto/openssl/test/tls13tickettest.c new file mode 100644 index 000000000000..9470f4169633 --- /dev/null +++ b/crypto/openssl/test/tls13tickettest.c @@ -0,0 +1,157 @@ +/* + * Copyright 2026 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include <openssl/ssl.h> +#include "helpers/ssltestlib.h" +#include "testutil.h" + +struct stats { + unsigned int tickets; +}; + +static char *cert = NULL; +static char *pkey = NULL; +static int stats_idx = -1; + +static int stats_init(struct stats *stats) +{ + memset(stats, 0, sizeof(*stats)); + return 1; +} + +static int sess_new_cb(SSL *ssl, SSL_SESSION *session) +{ + struct stats *stats = SSL_get_ex_data(ssl, stats_idx); + if (stats == NULL) + return 0; + if (SSL_is_init_finished(ssl) == 0) + stats->tickets++; + return 0; +} + +static void handshake_finished(const SSL *ssl) +{ + const char *endpoint = SSL_is_server(ssl) ? "server" : "client"; + if (SSL_session_reused(ssl)) + TEST_info("%s: Abbreviated handshake finished", endpoint); + else + TEST_info("%s: Full handshake finished", endpoint); +} + +static void info_cb(const SSL *ssl, int type, int val) +{ + const char *endpoint = SSL_is_server(ssl) ? "server" : "client"; + + if (type & SSL_CB_ALERT) { + const char *dir = (type & SSL_CB_READ) ? "read" : "write"; + + TEST_info("%s: alert %s: %s : %s", endpoint, dir, + SSL_alert_type_string_long(val), + SSL_alert_desc_string_long(val)); + } + if (type & SSL_CB_HANDSHAKE_DONE) + handshake_finished(ssl); +} + +static int set_callbacks(SSL *ssl) +{ + SSL_set_info_callback(ssl, info_cb); + return 1; +} + +static int set_shutdown(SSL *c, SSL *s) +{ + SSL_set_shutdown(c, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); + SSL_set_shutdown(s, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); + return 1; +} + +static int enable_tickets(SSL_CTX *s, SSL_CTX *c) +{ + unsigned int cf = SSL_SESS_CACHE_CLIENT | SSL_SESS_CACHE_NO_INTERNAL_STORE; + unsigned int sf = SSL_SESS_CACHE_SERVER | SSL_SESS_CACHE_NO_INTERNAL_STORE; + + SSL_CTX_set_session_cache_mode(s, sf); + SSL_CTX_set_session_cache_mode(c, cf); + SSL_CTX_set_verify(c, SSL_VERIFY_NONE, NULL); + + SSL_CTX_sess_set_new_cb(s, sess_new_cb); + SSL_CTX_sess_set_new_cb(c, sess_new_cb); + + return 1; +} + +/* + * Verify ticket regeneration after fallback to a full handshake. If session + * resumption fails due to a ciphersuite mismatch, it falls back to a full + * handshake. In that case, ensure a new session ticket is issued reflecting the + * negotiated ciphersuite. + */ +static int test_tls13_ticket_ciphersuite_mismatch(void) +{ + struct stats stats1, stats2; + SSL_CTX *s_ctx = NULL, *c_ctx = NULL; + SSL *s_ssl = NULL, *c_ssl = NULL, *s = NULL, *c = NULL; + SSL_SESSION *sess = NULL; + int test; + + test = create_ssl_ctx_pair(NULL, TLS_server_method(), TLS_client_method(), + TLS1_3_VERSION, TLS1_3_VERSION, &s_ctx, &c_ctx, cert, pkey) + && TEST_true(SSL_CTX_set_ciphersuites(s_ctx, "TLS_AES_128_GCM_SHA256")) + && TEST_true(SSL_CTX_set_ciphersuites(c_ctx, "TLS_AES_128_GCM_SHA256")) + && TEST_true(enable_tickets(s_ctx, c_ctx)) + && TEST_true(create_ssl_objects(s_ctx, c_ctx, &s, &c, NULL, NULL)) + && TEST_true(set_callbacks(c)) + && TEST_true(set_callbacks(s)) + && TEST_true(stats_init(&stats1)) + && TEST_true(SSL_set_ex_data(c, stats_idx, &stats1)) + && TEST_true(create_ssl_connection(s, c, SSL_ERROR_NONE)) + && TEST_uint_eq(stats1.tickets, 2) + && TEST_true(set_shutdown(c, s)) + && TEST_ptr(sess = SSL_get1_session(c)) + && TEST_true(SSL_CTX_set_ciphersuites(s_ctx, "TLS_AES_256_GCM_SHA384")) + && TEST_true(SSL_CTX_set_ciphersuites(c_ctx, "TLS_AES_256_GCM_SHA384")) + && TEST_true(create_ssl_objects(s_ctx, c_ctx, &s_ssl, &c_ssl, NULL, NULL)) + && TEST_true(SSL_set_session(c_ssl, sess)) + && TEST_true(set_callbacks(c_ssl)) + && TEST_true(set_callbacks(s_ssl)) + && TEST_true(stats_init(&stats2)) + && TEST_true(SSL_set_ex_data(c_ssl, stats_idx, &stats2)) + && TEST_true(create_ssl_connection(s_ssl, c_ssl, SSL_ERROR_NONE)) + && TEST_false(SSL_session_reused(c_ssl)) + && TEST_uint_eq(stats2.tickets, 2); + + SSL_SESSION_free(sess); + SSL_free(s_ssl); + SSL_free(c_ssl); + SSL_free(s); + SSL_free(c); + SSL_CTX_free(s_ctx); + SSL_CTX_free(c_ctx); + return test; +} + +OPT_TEST_DECLARE_USAGE("\n") + +int setup_tests(void) +{ + if (!test_skip_common_options()) { + TEST_error("Error parsing test options\n"); + return 0; + } + + if (!TEST_ptr(cert = test_get_argument(0)) + || !TEST_ptr(pkey = test_get_argument(1))) + return 0; + + stats_idx = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); + ADD_TEST(test_tls13_ticket_ciphersuite_mismatch); + + return 1; +} diff --git a/crypto/openssl/util/missingcrypto.txt b/crypto/openssl/util/missingcrypto.txt index 9da5083b6fcf..a1eb4f64db7c 100644 --- a/crypto/openssl/util/missingcrypto.txt +++ b/crypto/openssl/util/missingcrypto.txt @@ -202,12 +202,8 @@ BIO_method_name(3) BIO_new_NDEF(3) BIO_new_PKCS7(3) BIO_new_dgram_sctp(3) -BIO_nread(3) -BIO_nread0(3) BIO_number_read(3) BIO_number_written(3) -BIO_nwrite(3) -BIO_nwrite0(3) BIO_s_datagram_sctp(3) BIO_s_log(3) BIO_set_tcp_ndelay(3) diff --git a/crypto/openssl/util/missingcrypto111.txt b/crypto/openssl/util/missingcrypto111.txt index 0386701ad1e3..832828ee2db9 100644 --- a/crypto/openssl/util/missingcrypto111.txt +++ b/crypto/openssl/util/missingcrypto111.txt @@ -226,12 +226,8 @@ BIO_new_NDEF(3) BIO_new_PKCS7(3) BIO_new_dgram(3) BIO_new_dgram_sctp(3) -BIO_nread(3) -BIO_nread0(3) BIO_number_read(3) BIO_number_written(3) -BIO_nwrite(3) -BIO_nwrite0(3) BIO_s_datagram(3) BIO_s_datagram_sctp(3) BIO_s_log(3) |
