* 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:
parent
00cfe4d26b
commit
9253bd7797
@ -721,7 +721,7 @@ static VALUE
|
|||||||
ossl_asn1data_to_der(VALUE self)
|
ossl_asn1data_to_der(VALUE self)
|
||||||
{
|
{
|
||||||
VALUE value, der, inf_length;
|
VALUE value, der, inf_length;
|
||||||
int tag, tag_class, is_cons = 0, tmp_cons = 1;
|
int tag, tag_class, is_cons = 0;
|
||||||
long length;
|
long length;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
|
||||||
@ -737,9 +737,8 @@ ossl_asn1data_to_der(VALUE self)
|
|||||||
inf_length = ossl_asn1_get_infinite_length(self);
|
inf_length = ossl_asn1_get_infinite_length(self);
|
||||||
if (inf_length == Qtrue) {
|
if (inf_length == Qtrue) {
|
||||||
is_cons = 2;
|
is_cons = 2;
|
||||||
tmp_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);
|
ossl_raise(eASN1Error, NULL);
|
||||||
der = rb_str_new(0, length);
|
der = rb_str_new(0, length);
|
||||||
p = (unsigned char *)RSTRING_PTR(der);
|
p = (unsigned char *)RSTRING_PTR(der);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user