Flowdock
method

value=

Importance_0
value=(p1) public

No documentation

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

Hide source
static VALUE
ossl_x509ext_set_value(VALUE self, VALUE data)
{
    X509_EXTENSION *ext;
    ASN1_OCTET_STRING *asn1s;
    char *s;

    data = ossl_to_der_if_possible(data);
    StringValue(data);
    if(!(s = OPENSSL_malloc(RSTRING_LEN(data))))
        ossl_raise(eX509ExtError, "malloc error");
    memcpy(s, RSTRING_PTR(data), RSTRING_LEN(data));
    if(!(asn1s = ASN1_OCTET_STRING_new())){
        OPENSSL_free(s);
        ossl_raise(eX509ExtError, NULL);
    }
    if(!M_ASN1_OCTET_STRING_set(asn1s, s, RSTRING_LENINT(data))){
        OPENSSL_free(s);
        ASN1_OCTET_STRING_free(asn1s);
        ossl_raise(eX509ExtError, NULL);
    }
    OPENSSL_free(s);
    GetX509Ext(self, ext);
    X509_EXTENSION_set_data(ext, asn1s);

    return data;
}
Register or log in to add new notes.