* ext/openssl/ossl_asn1.c (ossl_asn1data_to_der): Remove redundant

flag tmp_cons.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
emboss 2011-05-22 18:48:31 +00:00
Родитель 00cfe4d26b
Коммит 9253bd7797
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -721,7 +721,7 @@ static VALUE
ossl_asn1data_to_der(VALUE self)
{
VALUE value, der, inf_length;
int tag, tag_class, is_cons = 0, tmp_cons = 1;
int tag, tag_class, is_cons = 0;
long length;
unsigned char *p;
@ -736,10 +736,9 @@ ossl_asn1data_to_der(VALUE self)
tag_class = ossl_asn1_tag_class(self);
inf_length = ossl_asn1_get_infinite_length(self);
if (inf_length == Qtrue) {
is_cons = 2;
tmp_cons = 2;
is_cons = 2;
}
if((length = ASN1_object_size(tmp_cons, RSTRING_LENINT(value), tag)) <= 0)
if((length = ASN1_object_size(is_cons, RSTRING_LENINT(value), tag)) <= 0)
ossl_raise(eASN1Error, NULL);
der = rb_str_new(0, length);
p = (unsigned char *)RSTRING_PTR(der);