method
new

v1_9_1_378 -
Show latest stable
-
0 notes -
Class: Constructive
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (38)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
new(p1, p2 = v2, p3 = v3, p4 = v4)
public
Hide source
static VALUE ossl_asn1_initialize(int argc, VALUE *argv, VALUE self) { VALUE value, tag, tagging, tag_class; rb_scan_args(argc, argv, "13", &value, &tag, &tagging, &tag_class); if(argc > 1){ if(NIL_P(tag)) ossl_raise(eASN1Error, "must specify tag number"); if(NIL_P(tagging)) tagging = ID2SYM(sEXPLICIT); if(!SYMBOL_P(tagging)) ossl_raise(eASN1Error, "invalid tag default"); if(NIL_P(tag_class)) tag_class = ID2SYM(sCONTEXT_SPECIFIC); if(!SYMBOL_P(tag_class)) ossl_raise(eASN1Error, "invalid tag class"); if(SYM2ID(tagging) == sIMPLICIT && NUM2INT(tag) > 31) ossl_raise(eASN1Error, "tag number for Universal too large"); } else{ tag = INT2NUM(ossl_asn1_default_tag(self)); tagging = Qnil; tag_class = ID2SYM(sUNIVERSAL); } ossl_asn1_set_tag(self, tag); ossl_asn1_set_value(self, value); ossl_asn1_set_tagging(self, tagging); ossl_asn1_set_tag_class(self, tag_class); return self; }