new(p1, p2 = v2) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
static VALUE
ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self)
    VALUE oid, value;
    X509_ATTRIBUTE *attr, *x;
    const unsigned char *p;

    GetX509Attr(self, attr);
    if(rb_scan_args(argc, argv, "11", &oid, &value) == 1){
        oid = ossl_to_der_if_possible(oid);
        p = (unsigned char *)RSTRING_PTR(oid);
        x = d2i_X509_ATTRIBUTE(&attr, &p, RSTRING_LEN(oid));
        DATA_PTR(self) = attr;
            ossl_raise(eX509AttrError, NULL);
        return self;
    rb_funcall(self, rb_intern("oid="), 1, oid);
    rb_funcall(self, rb_intern("value="), 1, value);

    return self;
Register or log in to add new notes.