summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_asn1.c
diff options
context:
space:
mode:
authoremboss <emboss@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-22 12:58:23 +0000
committeremboss <emboss@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-22 12:58:23 +0000
commit4fc3431ba167008de37d4301e055c04de88a86e0 (patch)
tree85a122033c51964de44945d1536342acd920217d /ext/openssl/ossl_asn1.c
parent27ddbc597231c70467f2ced4f6e60f44bae6468a (diff)
* ext/openssl/ossl_asn1.c: Use OpenSSL constants V_ASN1_xxx instead of
hardcoded numbers for initializing class_tag_map. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_asn1.c')
-rw-r--r--ext/openssl/ossl_asn1.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index 63e4dd8..55b924d 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -1771,28 +1771,28 @@ do{\
rb_define_method(cASN1EndOfContent, "initialize", ossl_asn1eoc_initialize, 0);
class_tag_map = rb_hash_new();
- rb_hash_aset(class_tag_map, cASN1EndOfContent, INT2NUM(0));
- rb_hash_aset(class_tag_map, cASN1Boolean, INT2NUM(1));
- rb_hash_aset(class_tag_map, cASN1Integer, INT2NUM(2));
- rb_hash_aset(class_tag_map, cASN1BitString, INT2NUM(3));
- rb_hash_aset(class_tag_map, cASN1OctetString, INT2NUM(4));
- rb_hash_aset(class_tag_map, cASN1Null, INT2NUM(5));
- rb_hash_aset(class_tag_map, cASN1ObjectId, INT2NUM(6));
- rb_hash_aset(class_tag_map, cASN1Enumerated, INT2NUM(10));
- rb_hash_aset(class_tag_map, cASN1UTF8String, INT2NUM(12));
- rb_hash_aset(class_tag_map, cASN1Sequence, INT2NUM(16));
- rb_hash_aset(class_tag_map, cASN1Set, INT2NUM(17));
- rb_hash_aset(class_tag_map, cASN1NumericString, INT2NUM(18));
- rb_hash_aset(class_tag_map, cASN1PrintableString, INT2NUM(19));
- rb_hash_aset(class_tag_map, cASN1T61String, INT2NUM(20));
- rb_hash_aset(class_tag_map, cASN1VideotexString, INT2NUM(21));
- rb_hash_aset(class_tag_map, cASN1IA5String, INT2NUM(22));
- rb_hash_aset(class_tag_map, cASN1UTCTime, INT2NUM(23));
- rb_hash_aset(class_tag_map, cASN1GeneralizedTime, INT2NUM(24));
- rb_hash_aset(class_tag_map, cASN1GraphicString, INT2NUM(25));
- rb_hash_aset(class_tag_map, cASN1ISO64String, INT2NUM(26));
- rb_hash_aset(class_tag_map, cASN1GeneralString, INT2NUM(27));
- rb_hash_aset(class_tag_map, cASN1UniversalString, INT2NUM(28));
- rb_hash_aset(class_tag_map, cASN1BMPString, INT2NUM(30));
+ rb_hash_aset(class_tag_map, cASN1EndOfContent, INT2NUM(V_ASN1_EOC));
+ rb_hash_aset(class_tag_map, cASN1Boolean, INT2NUM(V_ASN1_BOOLEAN));
+ rb_hash_aset(class_tag_map, cASN1Integer, INT2NUM(V_ASN1_INTEGER));
+ rb_hash_aset(class_tag_map, cASN1BitString, INT2NUM(V_ASN1_BIT_STRING));
+ rb_hash_aset(class_tag_map, cASN1OctetString, INT2NUM(V_ASN1_OCTET_STRING));
+ rb_hash_aset(class_tag_map, cASN1Null, INT2NUM(V_ASN1_NULL));
+ rb_hash_aset(class_tag_map, cASN1ObjectId, INT2NUM(V_ASN1_OBJECT));
+ rb_hash_aset(class_tag_map, cASN1Enumerated, INT2NUM(V_ASN1_ENUMERATED));
+ rb_hash_aset(class_tag_map, cASN1UTF8String, INT2NUM(V_ASN1_UTF8STRING));
+ rb_hash_aset(class_tag_map, cASN1Sequence, INT2NUM(V_ASN1_SEQUENCE));
+ rb_hash_aset(class_tag_map, cASN1Set, INT2NUM(V_ASN1_SET));
+ rb_hash_aset(class_tag_map, cASN1NumericString, INT2NUM(V_ASN1_NUMERICSTRING));
+ rb_hash_aset(class_tag_map, cASN1PrintableString, INT2NUM(V_ASN1_PRINTABLESTRING));
+ rb_hash_aset(class_tag_map, cASN1T61String, INT2NUM(V_ASN1_T61STRING));
+ rb_hash_aset(class_tag_map, cASN1VideotexString, INT2NUM(V_ASN1_VIDEOTEXSTRING));
+ rb_hash_aset(class_tag_map, cASN1IA5String, INT2NUM(V_ASN1_IA5STRING));
+ rb_hash_aset(class_tag_map, cASN1UTCTime, INT2NUM(V_ASN1_UTCTIME));
+ rb_hash_aset(class_tag_map, cASN1GeneralizedTime, INT2NUM(V_ASN1_GENERALIZEDTIME));
+ rb_hash_aset(class_tag_map, cASN1GraphicString, INT2NUM(V_ASN1_GRAPHICSTRING));
+ rb_hash_aset(class_tag_map, cASN1ISO64String, INT2NUM(V_ASN1_ISO64STRING));
+ rb_hash_aset(class_tag_map, cASN1GeneralString, INT2NUM(INT2NUM(V_ASN1_GENERALSTRING)));
+ rb_hash_aset(class_tag_map, cASN1UniversalString, INT2NUM(V_ASN1_UNIVERSALSTRING));
+ rb_hash_aset(class_tag_map, cASN1BMPString, INT2NUM(V_ASN1_BMPSTRING));
rb_global_variable(&class_tag_map);
}