Commit Graph

54 Commits

Author SHA1 Message Date
Tomas Mraz a3af1c036c test: Silence warnings on Win64 builds
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27806)
2025-07-02 17:26:26 +02:00
Viktor Dukhovni 8d2e4d6d8c Implement i2d_PKCS8PrivateKey
Run-checker daily / run-checker (-DOPENSSL_TLS_SECURITY_LEVEL=0) (push) Has been cancelled Details
Run-checker daily / run-checker (-DSSL3_ALIGN_PAYLOAD=4) (push) Has been cancelled Details
Run-checker daily / run-checker (386) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-crypto-mdebug) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-crypto-mdebug-backtrace) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-demos) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-ec_nistp_64_gcc_128) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-egd) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-fips enable-acvp-tests) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-fips no-des no-dsa no-ec2m) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-fips no-tls1_3) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-fips) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-h3demo) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-heartbeats) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-hqinterop) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-md2) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-rc5) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-ssl3) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-ssl3-method) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-sslkeylog) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-tfo) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-trace) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-unit-test) (push) Has been cancelled Details
Run-checker daily / run-checker (enable-zlib-dynamic) (push) Has been cancelled Details
Run-checker daily / run-checker (no-afalgeng) (push) Has been cancelled Details
Run-checker daily / run-checker (no-apps) (push) Has been cancelled Details
Run-checker daily / run-checker (no-aria) (push) Has been cancelled Details
Run-checker daily / run-checker (no-asan) (push) Has been cancelled Details
Run-checker daily / run-checker (no-asm) (push) Has been cancelled Details
Run-checker daily / run-checker (no-async) (push) Has been cancelled Details
Run-checker daily / run-checker (no-atexit) (push) Has been cancelled Details
Run-checker daily / run-checker (no-autoalginit) (push) Has been cancelled Details
Run-checker daily / run-checker (no-autoerrinit) (push) Has been cancelled Details
Run-checker daily / run-checker (no-autoload-config) (push) Has been cancelled Details
Run-checker daily / run-checker (no-bf) (push) Has been cancelled Details
Run-checker daily / run-checker (no-blake2) (push) Has been cancelled Details
Run-checker daily / run-checker (no-buildtest-c++) (push) Has been cancelled Details
Run-checker daily / run-checker (no-bulk) (push) Has been cancelled Details
Run-checker daily / run-checker (no-cached-fetch) (push) Has been cancelled Details
Run-checker daily / run-checker (no-camellia) (push) Has been cancelled Details
Run-checker daily / run-checker (no-capieng) (push) Has been cancelled Details
Run-checker daily / run-checker (no-cast) (push) Has been cancelled Details
Run-checker daily / run-checker (no-chacha) (push) Has been cancelled Details
Run-checker daily / run-checker (no-cmac) (push) Has been cancelled Details
Run-checker daily / run-checker (no-comp) (push) Has been cancelled Details
Run-checker daily / run-checker (no-ct) (push) Has been cancelled Details
Run-checker daily / run-checker (no-deprecated) (push) Has been cancelled Details
Run-checker daily / run-checker (no-des) (push) Has been cancelled Details
Run-checker daily / run-checker (no-docs) (push) Has been cancelled Details
Run-checker daily / run-checker (no-dsa) (push) Has been cancelled Details
Run-checker daily / run-checker (no-dtls1) (push) Has been cancelled Details
Run-checker daily / run-checker (no-dtls1-method) (push) Has been cancelled Details
Run-checker daily / run-checker (no-dtls1_2) (push) Has been cancelled Details
Run-checker daily / run-checker (no-dtls1_2-method) (push) Has been cancelled Details
Run-checker daily / run-checker (no-ecdh) (push) Has been cancelled Details
Run-checker daily / run-checker (no-ecdsa) (push) Has been cancelled Details
Run-checker daily / run-checker (no-engine) (push) Has been cancelled Details
Run-checker daily / run-checker (no-gost) (push) Has been cancelled Details
Run-checker daily / run-checker (no-hw) (push) Has been cancelled Details
Run-checker daily / run-checker (no-hw-padlock) (push) Has been cancelled Details
Run-checker daily / run-checker (no-idea) (push) Has been cancelled Details
Run-checker daily / run-checker (no-makedepend) (push) Has been cancelled Details
Run-checker daily / run-checker (no-md4) (push) Has been cancelled Details
Run-checker daily / run-checker (no-mdc2) (push) Has been cancelled Details
Run-checker daily / run-checker (no-msan) (push) Has been cancelled Details
Run-checker daily / run-checker (no-multiblock) (push) Has been cancelled Details
Run-checker daily / run-checker (no-nextprotoneg) (push) Has been cancelled Details
Run-checker daily / run-checker (no-ocb) (push) Has been cancelled Details
Run-checker daily / run-checker (no-padlockeng) (push) Has been cancelled Details
Run-checker daily / run-checker (no-pic) (push) Has been cancelled Details
Run-checker daily / run-checker (no-poly1305) (push) Has been cancelled Details
Run-checker daily / run-checker (no-posix-io) (push) Has been cancelled Details
Run-checker daily / run-checker (no-psk) (push) Has been cancelled Details
Run-checker daily / run-checker (no-rc2) (push) Has been cancelled Details
Run-checker daily / run-checker (no-rdrand) (push) Has been cancelled Details
Run-checker daily / run-checker (no-rfc3779) (push) Has been cancelled Details
Run-checker daily / run-checker (no-ripemd) (push) Has been cancelled Details
Run-checker daily / run-checker (no-rmd160) (push) Has been cancelled Details
Run-checker daily / run-checker (no-scrypt) (push) Has been cancelled Details
Run-checker daily / run-checker (no-secure-memory) (push) Has been cancelled Details
Run-checker daily / run-checker (no-seed) (push) Has been cancelled Details
Run-checker daily / run-checker (no-shared) (push) Has been cancelled Details
Run-checker daily / run-checker (no-siphash) (push) Has been cancelled Details
Run-checker daily / run-checker (no-siv) (push) Has been cancelled Details
Run-checker daily / run-checker (no-sm2) (push) Has been cancelled Details
Run-checker daily / run-checker (no-sm2-precomp) (push) Has been cancelled Details
Run-checker daily / run-checker (no-sm3) (push) Has been cancelled Details
Run-checker daily / run-checker (no-sm4) (push) Has been cancelled Details
Run-checker daily / run-checker (no-sock) (push) Has been cancelled Details
Run-checker daily / run-checker (no-sse2) (push) Has been cancelled Details
Run-checker daily / run-checker (no-ssl) (push) Has been cancelled Details
Run-checker daily / run-checker (no-static-engine no-shared) (push) Has been cancelled Details
Run-checker daily / run-checker (no-tests) (push) Has been cancelled Details
Run-checker daily / run-checker (no-tls1) (push) Has been cancelled Details
Run-checker daily / run-checker (no-tls1-method) (push) Has been cancelled Details
Run-checker daily / run-checker (no-tls1_1) (push) Has been cancelled Details
Run-checker daily / run-checker (no-tls1_1-method) (push) Has been cancelled Details
Run-checker daily / run-checker (no-tls1_2-method) (push) Has been cancelled Details
Run-checker daily / run-checker (no-ubsan) (push) Has been cancelled Details
Run-checker daily / run-checker (no-ui-console) (push) Has been cancelled Details
Run-checker daily / run-checker (no-uplink) (push) Has been cancelled Details
Run-checker daily / run-checker (no-weak-ssl-ciphers) (push) Has been cancelled Details
Run-checker daily / run-checker (no-whirlpool) (push) Has been cancelled Details
Run-checker daily / run-checker-sctp (push) Has been cancelled Details
Run-checker daily / enable_brotli_dynamic (push) Has been cancelled Details
Run-checker daily / enable_zstd_dynamic (push) Has been cancelled Details
Run-checker daily / enable_brotli_and_zstd_dynamic (push) Has been cancelled Details
Run-checker daily / enable_brotli_and_asan_ubsan (push) Has been cancelled Details
Run-checker daily / enable_zstd_and_asan_ubsan (push) Has been cancelled Details
Run-checker daily / enable_tfo (macos-13) (push) Has been cancelled Details
Run-checker daily / enable_tfo (macos-14) (push) Has been cancelled Details
Run-checker daily / enable_tfo (ubuntu-latest) (push) Has been cancelled Details
Run-checker daily / enable_buildtest (push) Has been cancelled Details
Run-checker daily / memory_sanitizer_slh_dsa (push) Has been cancelled Details
Build openssl interop container from master / update_quay_container (push) Has been cancelled Details
OS Zoo CI / alpine (clang, edge) (push) Has been cancelled Details
OS Zoo CI / alpine (clang, latest) (push) Has been cancelled Details
OS Zoo CI / alpine (gcc, edge) (push) Has been cancelled Details
OS Zoo CI / alpine (gcc, latest) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/centos:8 install:sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \ sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \ dnf install -y gcc make… (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/debian:10 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/debian:11 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/debian:12 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/fedora:38 install:dnf install -y gcc make perl-core]) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/fedora:39 install:dnf install -y gcc make perl-core]) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/rockylinux:8 install:dnf install -y gcc make perl-core]) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/rockylinux:9 install:dnf install -y gcc make perl-core]) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/ubuntu:20.04 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled Details
OS Zoo CI / linux (map[image:docker.io/library/ubuntu:22.04 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled Details
OS Zoo CI / macos (macos-13) (push) Has been cancelled Details
OS Zoo CI / macos (macos-14) (push) Has been cancelled Details
OS Zoo CI / macos (macos-15) (push) Has been cancelled Details
OS Zoo CI / windows (windows-2019) (push) Has been cancelled Details
OS Zoo CI / windows (windows-2022) (push) Has been cancelled Details
OS Zoo CI / linux-arm64 (push) Has been cancelled Details
OS Zoo CI / linux-ppc64le (push) Has been cancelled Details
OS Zoo CI / linux-s390x (push) Has been cancelled Details
OS Zoo CI / freebsd-x86_64 (push) Has been cancelled Details
Interoperability tests with GnuTLS and NSS / test (gnutls) (push) Has been cancelled Details
Interoperability tests with GnuTLS and NSS / test (nss) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.0, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.2, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.3, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.4, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-3.5, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-master, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-master, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-master, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-master, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-master, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (branch-master, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-master) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.0) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.2) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.3) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.4) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.5) (push) Has been cancelled Details
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-master) (push) Has been cancelled Details
Added `i2d_PKCS8PrivateKey(3)` API to complement `i2d_PrivateKey(3)`,
the former always outputs PKCS#8.

Extended endecoder_test.c to check that `i2d_PKCS8PrivateKey()`
produces the expected PKCS#8 output.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27309)
2025-04-11 11:00:27 +01:00
openssl-machine 0c679f5566 Copyright year updates
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes
2025-03-12 13:35:59 +00:00
Viktor Dukhovni 31b5f3f382 Further decoder tuning possibly better perf
- The decoder should consider fewer options based on
  more precise tracking of the desired input type
  (DER, PVK, MSBLOB), algorithm (RSA, EC, ...),
  input structure (SPKI, P8, ...).

How much this affects actual use-cases is harder to estimate, we'll just
have to run before/after perf tests.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26927)
2025-03-02 02:04:09 +11:00
slontis c2f4d7aae1 Encoder : Fix floating pointer when OSSL_ENCODER_to_data() is called
twice.

Fixes #26862

This only happens when using the FIPS provider, since it needs to export
the key.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26891)
2025-02-27 12:04:14 +11:00
slontis eba0e11c39 Add SLH_DSA key validation.
The pairwise test requires that the computed PK_ROOT key matches the
keys PK_ROOT value. The public and private key tests just require the
key elements to exist.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25882)
2025-02-18 10:17:29 +01:00
slontis a25bcde26a Add SLH-DSA encoder/decoder support.
This required adding additional EVP_PKEY_ASN1_METHOD methods.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25882)
2025-02-18 10:17:29 +01:00
Viktor Dukhovni 6ab87724e6 Left over doc TODOs
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26715)
2025-02-14 10:50:59 +01:00
Viktor Dukhovni 0fb5a78acd More polish and renamed codec tests
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26569)
2025-02-14 10:50:58 +01:00
Viktor Dukhovni b818a99839 Encoders and Decoders for ML-KEM
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26341)
2025-02-14 10:50:58 +01:00
slontis dd1d010130 MLDSA: Fix no-ml-dsa configure option.
Added to 'bulk' group and CI

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26654)
2025-02-14 10:46:04 +01:00
Pauli f207938711 endecoders: make ML-KEM endecoders have fips=yes property
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26548)
2025-02-14 10:46:04 +01:00
Pauli f56dc1f968 test: update endecode test in light of ML-DSA being in the FIPS provider
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26548)
2025-02-14 10:46:04 +01:00
slontis df231a88ab Add ML_DSA encoders
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26451)
2025-02-14 10:46:03 +01:00
Tomas Mraz 7ed6de997f Copyright year updates
Reviewed-by: Neil Horman <nhorman@openssl.org>
Release: yes
2024-09-05 09:35:49 +02:00
Pauli c6c6af18ea endecode_test.c: Fix !fips v3.0.0 check
The fips_provider_version_* functions return true if the FIPS provider isn't
loaded.  This is somewhat counterintuitive and the fix in #25327 neglected
this nuance resulting in not running the SM2 tests when the FIPS provider
wasn't being loaded.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25331)
2024-08-30 11:42:40 +02:00
Tomas Mraz 0b97a5505e endecode_test.c: Avoid running the SM2 tests with 3.0.0 FIPS provider
Fixes #25326

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25327)
2024-08-29 19:45:47 +02:00
Jamie Cui 25bd0c77bf Fix decoder error on SM2 private key
Added sm2 testcases to endecode_test.c.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25266)
2024-08-29 15:28:27 +02:00
Matt Caswell da1c088f59 Copyright year updates
Reviewed-by: Richard Levitte <levitte@openssl.org>
Release: yes
2023-09-07 09:59:15 +01:00
Tomas Mraz 4c50610bda endecode_test.c: Add tests for decoding with 0 selection
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21519)
2023-08-04 10:09:44 -04:00
Tomas Mraz e1289d90d0 With fips provider 3.0.0 skip tests related to explicit curves handling
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19201)
2022-09-16 08:34:53 +10:00
Matt Caswell fecb3aae22 Update copyright year
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Release: yes
2022-05-03 13:34:51 +01:00
Tomas Mraz e8a4145968 endecode_test: Handle expected failures for non-fips ec keys
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17998)
2022-04-14 08:51:18 +02:00
Matt Caswell 7ee992a5d9 Statically link the legacy provider to endecode_test
We already statically link libcrypto to endecode_test even in a "shared"
build. This can cause problems on some platforms with tests that load the
legacy provider which is dynamically linked to libcrypto. Two versions of
libcrypto are then linked to the same executable which can lead to crashes.

Fixes #17059

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17345)
2022-01-11 11:00:21 +00:00
Richard Levitte 602bfb8b98 Adjust test/endecoder_test.c
The protected tests need to specify the structure EncryptedPrivateKeyInfo
rather than PrivateKeyInfo, since that's the outermost structure.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16466)
2021-09-05 21:34:51 +02:00
Richard Levitte 6a2b8ff392 Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8
This has us switch from the 'structure' "pkcs8" to "PrivateKeyInfo",
which is sensible considering we already have "SubjectPublicKeyInfo".
We also add "EncryptedPrivateKeyInfo", and use it for a special decoder
that detects and decrypts an EncryptedPrivateKeyInfo structured DER
blob into a PrivateKeyInfo structured DER blob and passes that on to
the next decoder implementation.

The result of this change is that PKCS#8 decryption should only happen
once per decoding instead of once for every expected key type.
Furthermore, this new decoder implementation sets the data type to the
OID of the algorithmIdentifier field, thus reducing how many decoder
implementations are tentativaly run further down the call chain.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15498)
2021-06-09 17:00:10 +02:00
Jon Spillett 169eca602c Enhance the encoder/decoder tests to allow testing with a non-default library context and configurable providers
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14587)
2021-06-01 12:16:27 +02:00
Dr. David von Oheimb 91f2b15f2e TEST: Prefer using precomputed RSA and DH keys for more efficient tests
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13715)
2021-05-27 11:06:01 +02:00
Dr. David von Oheimb f925315203 Add convenience functions and macros for asymmetric key generation
Add EVP_PKEY_gen(), EVP_PKEY_Q_gen(), EVP_RSA_gen(), and EVP_EC_gen().
Also export auxiliary function OSSL_EC_curve_nid2name()
and improve deprecation info on RSA and EC key generation/management functions.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14695)
2021-05-11 12:46:42 +02:00
Tomas Mraz ddf0d149e2 Rename EVP_PKEY_get0_first_alg_name to EVP_PKEY_get0_type_name
We use type elsewhere and documenting the 'first' in the
name of the call is a little bit superfluous making the
name too mouthful.

Also rename EVP_PKEY_typenames_do_all to
EVP_PKEY_type_names_do_all to keep the words separated by
underscore.

Fixes #14701

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14868)
2021-04-15 17:38:19 +02:00
Shane Lontis 3f883c7c83 Replace OSSL_PARAM_BLD_free_params() with OSSL_PARAM_free().
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14785)
2021-04-12 16:55:30 +10:00
Tomas Mraz 4f0831b837 EVP_PKCS82PKEY: Create provided keys if possible
Use OSSL_DECODER to decode the PKCS8 data to create provided keys.

If that fails fallback to the legacy implementation.

Fixes #14302

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14659)
2021-03-25 15:24:00 +01:00
Jon Spillett 6511f686c2 endecode_test: Add file and line arguments to test callbacks
To improve debug information in case of test failures source
file and line arguments are added to test callbacks.

Fixes #14331

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14567)
2021-03-23 08:46:04 +01:00
Richard Levitte ff1c10d920 TEST: Modify test/endecode_test.c to give the decoder callback the structure
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14314)
2021-03-19 16:46:39 +01:00
Matt Caswell a28d06f3e9 Update copyright year
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14235)
2021-02-18 15:05:17 +00:00
Tomas Mraz fe75766c9c Rename OSSL_ENCODER_CTX_new_by_EVP_PKEY and OSSL_DECODER_CTX_new_by_EVP_PKEY
Additional renames done in encoder and decoder implementation
to follow the style.

Fixes #13622

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14155)
2021-02-17 15:26:12 +01:00
Richard Levitte 5faec149c6 TEST: Fix test/endecode_test.c for 'no-legacy'
This adds an additional check that the legacy provider is available
when wanting to add tests for protected PVK, since that depends on the
availability of RC4.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13705)
2020-12-19 10:59:12 +01:00
Richard Levitte a2e145f8db Add necessary checks of OPENSSL_NO_DH, OPENSSL_NO_DSA and OPENSSL_NO_EC
When OpenSSL is configured with 'no-dh', 'no-dsa' and 'no-ec'
combined, some static functions have no use, which the compiler may
complain about.  We therefore add extra guards to silence it.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13589)
2020-12-16 11:56:38 +01:00
Richard Levitte 2e1bc08100 Remove unnecessary guards around MSBLOB and PVK readers and writers
The OPENSSL_NO_RC4 guard remain around protected PVK tests in
test/endecoder_test.c.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13648)
2020-12-13 10:27:31 +01:00
Dr. David von Oheimb 821d6f8c67 endecode_test.c: Fix build errors on OPENSSL_NO_{DH,DSA,EC,EC2M}
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13110)
2020-12-04 16:20:53 +01:00
Richard Levitte b03da688a2 Adapt everything else to the updated OSSL_ENCODER_CTX_new_by_EVP_PKEY()
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13545)
2020-12-02 13:37:20 +01:00
Dr. David von Oheimb 1234aa7e41 endecode_test.c: Add warning that 512-bit DH key size is for testing only
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13568)
2020-12-01 07:49:38 +01:00
Dr. David von Oheimb 20f8bc7255 test cleanup: move helper .c and .h files to test/helpers/
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13568)
2020-12-01 07:49:38 +01:00
Dr. David von Oheimb 5658470ce7 endecode_test.c: Significant speedup in generating DH and DHX keys
Fixes #13495

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13552)
2020-11-29 11:32:54 +01:00
Richard Levitte 973a52ce01 test/endecode_test.c: Update to specify output structures
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13167)
2020-11-11 12:43:27 +01:00
Richard Levitte a5cc661645 TEST: Adapt test/endecoder_test.c
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13248)
2020-11-11 11:42:06 +01:00
Richard Levitte 0934cf4834 Unexport internal MSBLOB and PVK functions
The following internal functions are affected:

    ossl_do_blob_header
    ossl_do_PVK_header
    ossl_b2i
    ossl_b2i_bio

This is reflected by moving include/internal/pem.h to include/crypto/pem.h
engines/e_loader_attic gets the source code added to it to have
continued access to those functions.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13195)
2020-10-21 21:10:48 +02:00
Matt Caswell b565a17d9f Add a test for encoding and decoding of parameters files
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13050)
2020-10-08 12:31:00 +01:00
Richard Levitte 70c06aafa6 DECODER: Allow precise result type for OSSL_DECODER_CTX_new_by_EVP_PKEY()
There is some data that is very difficult to guess.  For example, DSA
parameters and X9.42 DH parameters look exactly the same, a SEQUENCE
of 3 INTEGER.  Therefore, callers may need the possibility to select
the exact keytype that they expect to get.

This will also allow use to translate d2i_TYPEPrivateKey(),
d2i_TYPEPublicKey() and d2i_TYPEParams() into OSSL_DECODER terms much
more smoothly.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13061)
2020-10-04 13:01:47 +02:00
Richard Levitte ae12eac074 TEST: Adapt applicable tests to the changed OSSL_ENCODER_CTX_new_by_EVP_PKEY()
This adds the convenience function EVP_PKEY_typenames_do_all(), which
does the same as EVP_KEYMGMT_names_do_all(), but without having to
expose all the internal ways to find out if the internal EVP_PKEY key
is legacy or provider-native.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12873)
2020-09-20 17:31:54 +02:00