]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Just look for "Unable to load Public Key" if no SM2
authorMatt Caswell <matt@openssl.org>
Thu, 27 May 2021 17:00:07 +0000 (18:00 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 8 Jun 2021 17:53:28 +0000 (18:53 +0100)
The X509 test was looking for some specific errors when printing an SM2
X509 certificate when SM2 is disabled. In fact these errors appear in the
middle of the certificate printing which is quite odd. There is also a
separate error "Unable to load Public Key" which is more cleanly printed.

With the recent change to using provided keys in certs the old errors are
no longer output. However printing them in the middle of the cert is
probably not right anyway. So we just rely on the "Unable to load Public
Key" message.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15504)

test/recipes/25-test_x509.t

index 1324f754e9be1297a8f3ca78f072309f1079421f..5b6f8279e7029b2abfd2ce88636ee81f776467bf 100644 (file)
@@ -127,6 +127,6 @@ ok(test_errors("RC2-40-CBC", "v3-certs-RC2.p12", '-passin', 'pass:v3-certs'),
 SKIP: {
     skip "sm2 not disabled", 1 if !disabled("sm2");
 
-    ok(test_errors("unknown group|unsupported algorithm", "sm2.pem", '-text'),
+    ok(test_errors("Unable to load Public Key", "sm2.pem", '-text'),
        "error loading unsupported sm2 cert");
 }