Fix rsa_pkcs1_*_clear.der to actually be PKCS#1 files
With OpenSSL 3.0.2 (which I used to generate the previous set of "pkcs1" DER
files), the output of `openssl rsa -outform DER` is actually a
PKCS#8-encoded key, despite what the documentation says. This is a change
from OpenSSL 1.x, where the output is a PKCS#1-encoded key. OpenSSL 3.0.8
documents the output as PKCS#8.
Change to `openssl pkey`, which seems more reliable. The documentation
states that the output is PKCS#8, but the output is actually consistently
PKCS#1 at least from 1.0.2g to 3.3.0.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/tests/data_files/Makefile b/tests/data_files/Makefile
index 0fbdfe5..fa30cf5 100644
--- a/tests/data_files/Makefile
+++ b/tests/data_files/Makefile
@@ -739,7 +739,7 @@
### PKCS1-encoded, plaintext RSA keys in derived forms
rsa_pkcs1_%.der: rsa_pkcs1_%.pem
- $(OPENSSL) rsa -inform PEM -in $< -outform DER -out $@
+ $(OPENSSL) pkey -inform PEM -in $< -outform DER -out $@
all_final += $(keys_rsa_base:.pem=.der)
###