aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-12-11 02:58:44 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-07-23 13:32:35 +0900
commit22a944fe650efbd9aa685505757d8362773d3d34 (patch)
tree8da54ef11257b18dd53fd4863afe8b3c2ac1b09a /ext/openssl
parenta2b32a48274b592911b91b28072e6f277fa5e116 (diff)
downloadruby-openssl-22a944fe650efbd9aa685505757d8362773d3d34.tar.gz
asn1: allow tag number to be >= 32 for universal tag class
There are actually high-tag universal types such as the time-of-day type.
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl_asn1.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index dfbffecf..95abc321 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -661,8 +661,6 @@ ossl_asn1data_initialize(VALUE self, VALUE value, VALUE tag, VALUE tag_class)
{
if(!SYMBOL_P(tag_class))
ossl_raise(eASN1Error, "invalid tag class");
- if (tag_class == sym_UNIVERSAL && NUM2INT(tag) > 31)
- ossl_raise(eASN1Error, "tag number for Universal too large");
ossl_asn1_set_tag(self, tag);
ossl_asn1_set_value(self, value);
ossl_asn1_set_tag_class(self, tag_class);
@@ -1085,8 +1083,6 @@ ossl_asn1_initialize(int argc, VALUE *argv, VALUE self)
}
if(!SYMBOL_P(tag_class))
ossl_raise(eASN1Error, "invalid tag class");
- if (tagging == sym_IMPLICIT && NUM2INT(tag) > 31)
- ossl_raise(eASN1Error, "tag number for Universal too large");
}
else{
tag = INT2NUM(default_tag);