-/* $OpenBSD: callback.c,v 1.2 2021/09/30 18:28:38 jsing Exp $ */
+/* $OpenBSD: callback.c,v 1.3 2021/10/31 08:27:15 tb Exp $ */
/*
* Copyright (c) 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
X509_STORE_CTX *xsc = NULL;
X509_STORE *store = NULL;
int verify_err, use_dir;
- unsigned long flags;
X509 *leaf = NULL;
*chains = 0;
if (!X509_STORE_load_locations(store, NULL, roots_dir))
errx(1, "failed to set by_dir directory of %s", roots_dir);
}
- if (mode == MODE_LEGACY_VFY) {
- flags = X509_VERIFY_PARAM_get_flags(xsc->param);
- flags |= X509_V_FLAG_LEGACY_VERIFY;
- X509_VERIFY_PARAM_set_flags(xsc->param, flags);
- } else {
- flags = X509_VERIFY_PARAM_get_flags(xsc->param);
- flags &= ~X509_V_FLAG_LEGACY_VERIFY;
- X509_VERIFY_PARAM_set_flags(xsc->param, flags);
- }
+ if (mode == MODE_LEGACY_VFY)
+ X509_STORE_CTX_set_flags(xsc, X509_V_FLAG_LEGACY_VERIFY);
+ else
+ X509_VERIFY_PARAM_clear_flags(X509_STORE_CTX_get0_param(xsc),
+ X509_V_FLAG_LEGACY_VERIFY);
if (verbose)
X509_STORE_CTX_set_verify_cb(xsc, verify_cert_cb);
-/* $OpenBSD: verify.c,v 1.8 2021/09/30 18:28:38 jsing Exp $ */
+/* $OpenBSD: verify.c,v 1.9 2021/10/31 08:27:15 tb Exp $ */
/*
* Copyright (c) 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
X509_STORE_CTX *xsc = NULL;
X509_STORE *store = NULL;
int verify_err, use_dir;
- unsigned long flags;
X509 *leaf = NULL;
*chains = 0;
if (!X509_STORE_load_locations(store, NULL, roots_dir))
errx(1, "failed to set by_dir directory of %s", roots_dir);
}
- if (mode == MODE_LEGACY_VFY) {
- flags = X509_VERIFY_PARAM_get_flags(xsc->param);
- flags |= X509_V_FLAG_LEGACY_VERIFY;
- X509_VERIFY_PARAM_set_flags(xsc->param, flags);
- } else {
- flags = X509_VERIFY_PARAM_get_flags(xsc->param);
- flags &= ~X509_V_FLAG_LEGACY_VERIFY;
- X509_VERIFY_PARAM_set_flags(xsc->param, flags);
- }
+ if (mode == MODE_LEGACY_VFY)
+ X509_STORE_CTX_set_flags(xsc, X509_V_FLAG_LEGACY_VERIFY);
+ else
+ X509_VERIFY_PARAM_clear_flags(X509_STORE_CTX_get0_param(xsc),
+ X509_V_FLAG_LEGACY_VERIFY);
if (verbose)
X509_STORE_CTX_set_verify_cb(xsc, verify_cert_cb);
-/* $OpenBSD: x509attribute.c,v 1.1 2020/06/04 21:21:03 schwarze Exp $ */
+/* $OpenBSD: x509attribute.c,v 1.2 2021/10/31 08:27:15 tb Exp $ */
/*
* Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define LIBRESSL_CRYPTO_INTERNAL
+
#include <errno.h>
#include <stdio.h>
#include <string.h>
-/* $OpenBSD: x509name.c,v 1.2 2018/11/10 01:43:03 tb Exp $ */
+/* $OpenBSD: x509name.c,v 1.3 2021/10/31 08:27:15 tb Exp $ */
/*
* Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
*
int loc;
for (loc = 0; loc < X509_NAME_entry_count(name); loc++)
- printf("%d:", X509_NAME_get_entry(name, loc)->set);
+ printf("%d:",
+ X509_NAME_ENTRY_set(X509_NAME_get_entry(name, loc)));
putchar(' ');
X509_NAME_print_ex_fp(stdout, name, 0, XN_FLAG_SEP_CPLUS_SPC);
putchar('\n');