From 27d7260075ba525c69e5b8e8ccb1b98010b56dd3 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 8 Jul 2000 07:56:12 +0000 Subject: [PATCH] Corrected small bug that could add ',L' when it shouldn't --- crypto/objects/obj_mac.h | 2 +- crypto/objects/objects.pl | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h index 439d188d91..1da4949bc9 100644 --- a/crypto/objects/obj_mac.h +++ b/crypto/objects/obj_mac.h @@ -1300,7 +1300,7 @@ #define NID_ad_dvcs 364 #define OBJ_ad_dvcs OBJ_id_ad,4L -#define OBJ_id_pkix_OCSP OBJ_ad_OCSP,L +#define OBJ_id_pkix_OCSP OBJ_ad_OCSP #define SN_id_pkix_OCSP_basic "basicOCSPResponse" #define LN_id_pkix_OCSP_basic "Basic OCSP Response" diff --git a/crypto/objects/objects.pl b/crypto/objects/objects.pl index 04fcdec207..c956bbb841 100644 --- a/crypto/objects/objects.pl +++ b/crypto/objects/objects.pl @@ -203,11 +203,22 @@ sub process_oid @a = split(/\s+/,$myoid); $pref_oid = ""; + $pref_sep = ""; if (!($a[0] =~ /^[0-9]+$/)) { $a[0] =~ s/-/_/g; - $pref_oid = "OBJ_" . $a[0] . ','; + $pref_oid = "OBJ_" . $a[0]; + $pref_sep = ","; shift @a; } - return($pref_oid . join('L,',@a) . 'L'); + $oids = join('L,',@a) . "L"; + if ($oids ne "L") + { + $oids = $pref_oid . $pref_sep . $oids; + } + else + { + $oids = $pref_oid; + } + return($oids); } -- 2.25.1