From: Richard Levitte Date: Sat, 8 Jul 2000 07:56:12 +0000 (+0000) Subject: Corrected small bug that could add ',L' when it shouldn't X-Git-Tag: OpenSSL-engine-0_9_6-beta1~21^2 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=27d7260075ba525c69e5b8e8ccb1b98010b56dd3;hp=a338e21bd1f1654b9fc90352a45e054be1f947eb Corrected small bug that could add ',L' when it shouldn't --- 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); }