diff options
Diffstat (limited to 'src/regress')
-rw-r--r-- | src/regress/lib/libtls/verify/verifytest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/regress/lib/libtls/verify/verifytest.c b/src/regress/lib/libtls/verify/verifytest.c index b41b62fcfb..57aa992149 100644 --- a/src/regress/lib/libtls/verify/verifytest.c +++ b/src/regress/lib/libtls/verify/verifytest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: verifytest.c,v 1.7 2017/04/30 03:53:31 jsing Exp $ */ | 1 | /* $OpenBSD: verifytest.c,v 1.8 2023/05/28 09:02:01 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -40,6 +40,7 @@ struct verify_test { | |||
40 | const char name[128]; | 40 | const char name[128]; |
41 | int want_return; | 41 | int want_return; |
42 | int want_match; | 42 | int want_match; |
43 | int name_type; | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | struct verify_test verify_tests[] = { | 46 | struct verify_test verify_tests[] = { |
@@ -474,7 +475,8 @@ do_verify_test(int test_no, struct verify_test *vt) | |||
474 | if ((name = X509_NAME_new()) == NULL) | 475 | if ((name = X509_NAME_new()) == NULL) |
475 | errx(1, "failed to malloc X509_NAME"); | 476 | errx(1, "failed to malloc X509_NAME"); |
476 | if (X509_NAME_add_entry_by_NID(name, NID_commonName, | 477 | if (X509_NAME_add_entry_by_NID(name, NID_commonName, |
477 | MBSTRING_ASC, (unsigned char *)vt->common_name, | 478 | vt->name_type ? vt->name_type : MBSTRING_ASC, |
479 | (unsigned char *)vt->common_name, | ||
478 | vt->common_name_len, -1, 0) == 0) | 480 | vt->common_name_len, -1, 0) == 0) |
479 | errx(1, "failed to add name entry"); | 481 | errx(1, "failed to add name entry"); |
480 | if (X509_set_subject_name(cert, name) == 0) | 482 | if (X509_set_subject_name(cert, name) == 0) |