Fix OID encoding for one component.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 27 Jun 2014 02:17:15 +0000 (03:17 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 27 Jun 2014 02:17:15 +0000 (03:17 +0100)
OIDs with one component don't have an encoding.

PR#2556 (Bug#1)

crypto/objects/obj_dat.pl

index c67f71c..86bcefb 100644 (file)
@@ -115,7 +115,7 @@ for ($i=0; $i<$n; $i++)
                $out.="\"$sn\"";
                $out.=","."\"$ln\"";
                $out.=",NID_$nid{$i},";
-               if (defined($obj{$nid{$i}}))
+               if (defined($obj{$nid{$i}}) && $objd{$obj{$nid{$i}}} =~ /,/)
                        {
                        $v=$objd{$obj{$nid{$i}}};
                        $v =~ s/L//g;