From 3b5d8147ac910c080a5f4d6fb96714689ac8cb3d Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 21 Dec 2025 09:34:28 +0000 Subject: X509_NAME_ENTRY_set_data: remove V_ASN1_APP_CHOOSE quirk This is the last remaining actual use of ASN1_PRINTABLE_type(), which will go away in the next major bump. ok kenjiro --- src/lib/libcrypto/x509/x509name.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/x509/x509name.c b/src/lib/libcrypto/x509/x509name.c index 9a582d34e4..e1a1432a04 100644 --- a/src/lib/libcrypto/x509/x509name.c +++ b/src/lib/libcrypto/x509/x509name.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509name.c,v 1.36 2025/05/10 05:54:39 tb Exp $ */ +/* $OpenBSD: x509name.c,v 1.37 2025/12/21 09:34:28 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -416,12 +416,9 @@ X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, i = ASN1_STRING_set(ne->value, bytes, len); if (!i) return (0); - if (type != V_ASN1_UNDEF) { - if (type == V_ASN1_APP_CHOOSE) - ne->value->type = ASN1_PRINTABLE_type(bytes, len); - else - ne->value->type = type; - } + if (type != V_ASN1_UNDEF) + ne->value->type = type; + return (1); } LCRYPTO_ALIAS(X509_NAME_ENTRY_set_data); -- cgit v1.2.3-55-g6feb