Adjust after change to cert_parse() and ta_parse().
authorclaudio <claudio@openbsd.org>
Tue, 18 Jan 2022 16:41:00 +0000 (16:41 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 18 Jan 2022 16:41:00 +0000 (16:41 +0000)
regress/usr.sbin/rpki-client/test-cert.c

index 50cba22..6251552 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: test-cert.c,v 1.15 2021/10/26 16:59:54 claudio Exp $ */
+/*     $Id: test-cert.c,v 1.16 2022/01/18 16:41:00 claudio Exp $ */
 /*
  * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -38,7 +38,6 @@ int
 main(int argc, char *argv[])
 {
        int              c, i, verb = 0, ta = 0;
-       X509            *xp = NULL;
        struct cert     *p;
 
        ERR_load_crypto_strings();
@@ -81,7 +80,7 @@ main(int argc, char *argv[])
                                break;
 
                        buf = load_file(cert_path, &len);
-                       p = ta_parse(&xp, cert_path, buf, len,
+                       p = ta_parse(cert_path, buf, len,
                            tal->pkey, tal->pkeysz);
                        free(buf);
                        tal_free(tal);
@@ -91,7 +90,6 @@ main(int argc, char *argv[])
                        if (verb)
                                cert_print(p);
                        cert_free(p);
-                       X509_free(xp);
                }
        } else {
                for (i = 0; i < argc; i++) {
@@ -99,14 +97,13 @@ main(int argc, char *argv[])
                        size_t           len;
 
                        buf = load_file(argv[i], &len);
-                       p = cert_parse(&xp, argv[i], buf, len);
+                       p = cert_parse(argv[i], buf, len);
                        if (p == NULL)
                                break;
                        if (verb)
                                cert_print(p);
                        free(buf);
                        cert_free(p);
-                       X509_free(xp);
                }
        }