summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_asn1.c
diff options
context:
space:
mode:
authoremboss <emboss@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-22 18:48:31 +0000
committeremboss <emboss@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-22 18:48:31 +0000
commit9253bd7797461488245b466eabf6c018a9d0c24c (patch)
treeb896be6cd85c20395c131ab9a5950c8512a136d0 /ext/openssl/ossl_asn1.c
parent00cfe4d26b1de5db60d0edc0e9619813834c2004 (diff)
* 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
Diffstat (limited to 'ext/openssl/ossl_asn1.c')
-rw-r--r--ext/openssl/ossl_asn1.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index 920e974..0f53ab3 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);