Corrected small bug that could add ',L' when it shouldn't
authorRichard Levitte <levitte@openssl.org>
Sat, 8 Jul 2000 07:56:12 +0000 (07:56 +0000)
committerRichard Levitte <levitte@openssl.org>
Sat, 8 Jul 2000 07:56:12 +0000 (07:56 +0000)
crypto/objects/obj_mac.h
crypto/objects/objects.pl

index 439d188d911c920b47b1b0ca37a78a6a17d20bb0..1da4949bc971d566c4803c195cc1cfd5e766d34c 100644 (file)
 #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"
index 04fcdec2070a2e97502dcf2016c55fc423c4ebc5..c956bbb841e0fe5f6c765a4d8e5df75d54e8acf7 100644 (file)
@@ -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);
        }