Skip to content

Commit 3effe62

Browse files
committed
asn1: use ossl_asn1_tag()
Use ossl_asn1_tag() instead of the combination of ossl_asn1_get_tag() and NUM2INT().
1 parent 22a944f commit 3effe62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/openssl/ossl_asn1.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ int_ossl_asn1_decode0_cons(unsigned char **pp, long max_len, long length,
825825
rb_ary_push(ary, value);
826826

827827
if (indefinite &&
828-
NUM2INT(ossl_asn1_get_tag(value)) == V_ASN1_EOC &&
828+
ossl_asn1_tag(value) == V_ASN1_EOC &&
829829
ossl_asn1_get_tag_class(value) == sym_UNIVERSAL) {
830830
break;
831831
}
@@ -1130,7 +1130,7 @@ ossl_asn1prim_to_der(VALUE self)
11301130
unsigned char *buf, *p;
11311131
VALUE str;
11321132

1133-
tn = NUM2INT(ossl_asn1_get_tag(self));
1133+
tn = ossl_asn1_tag(self);
11341134
tc = ossl_asn1_tag_class(self);
11351135
explicit = ossl_asn1_is_explicit(self);
11361136
asn1 = ossl_asn1_get_asn1type(self);
@@ -1173,7 +1173,7 @@ ossl_asn1cons_to_der(VALUE self)
11731173
unsigned char *p;
11741174
VALUE value, str, inf_length;
11751175

1176-
tn = NUM2INT(ossl_asn1_get_tag(self));
1176+
tn = ossl_asn1_tag(self);
11771177
tc = ossl_asn1_tag_class(self);
11781178
inf_length = ossl_asn1_get_indefinite_length(self);
11791179
if (inf_length == Qtrue) {

0 commit comments

Comments
 (0)