diff options
Diffstat (limited to 'ext/openssl/ossl_asn1.c')
-rw-r--r-- | ext/openssl/ossl_asn1.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index 920e9744bf..0f53ab3d97 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -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); |