diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-05-29 15:37:52 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-07-23 13:32:35 +0900 |
commit | 3effe62a5ca8c4733f9161cea473f394eaffc97e (patch) | |
tree | 6466dd52d0713d5b9cc255f8462f9859bcfbe999 /ext/openssl/ossl_asn1.c | |
parent | 22a944fe650efbd9aa685505757d8362773d3d34 (diff) | |
download | ruby-openssl-3effe62a5ca8c4733f9161cea473f394eaffc97e.tar.gz |
asn1: use ossl_asn1_tag()
Use ossl_asn1_tag() instead of the combination of ossl_asn1_get_tag()
and NUM2INT().
Diffstat (limited to 'ext/openssl/ossl_asn1.c')
-rw-r--r-- | ext/openssl/ossl_asn1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index 95abc321..d2c20773 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -825,7 +825,7 @@ int_ossl_asn1_decode0_cons(unsigned char **pp, long max_len, long length, rb_ary_push(ary, value); if (indefinite && - NUM2INT(ossl_asn1_get_tag(value)) == V_ASN1_EOC && + ossl_asn1_tag(value) == V_ASN1_EOC && ossl_asn1_get_tag_class(value) == sym_UNIVERSAL) { break; } @@ -1130,7 +1130,7 @@ ossl_asn1prim_to_der(VALUE self) unsigned char *buf, *p; VALUE str; - tn = NUM2INT(ossl_asn1_get_tag(self)); + tn = ossl_asn1_tag(self); tc = ossl_asn1_tag_class(self); explicit = ossl_asn1_is_explicit(self); asn1 = ossl_asn1_get_asn1type(self); @@ -1173,7 +1173,7 @@ ossl_asn1cons_to_der(VALUE self) unsigned char *p; VALUE value, str, inf_length; - tn = NUM2INT(ossl_asn1_get_tag(self)); + tn = ossl_asn1_tag(self); tc = ossl_asn1_tag_class(self); inf_length = ossl_asn1_get_indefinite_length(self); if (inf_length == Qtrue) { |