method

oid=

ruby latest stable - Class: OpenSSL::X509::Attribute
oid=(p1)
public

No documentation available.

static VALUE
ossl_x509attr_set_oid(VALUE self, VALUE oid)
{
    X509_ATTRIBUTE *attr;
    ASN1_OBJECT *obj;
    char *s;

    GetX509Attr(self, attr);
    s = StringValueCStr(oid);
    obj = OBJ_txt2obj(s, 0);
    if(!obj) ossl_raise(eX509AttrError, NULL);
    if (!X509_ATTRIBUTE_set1_object(attr, obj)) {
        ASN1_OBJECT_free(obj);
        ossl_raise(eX509AttrError, "X509_ATTRIBUTE_set1_object");
    }
    ASN1_OBJECT_free(obj);

    return oid;
}