new(p1 = v1) public

No documentation

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

Hide source
static VALUE
ossl_ocspres_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE arg;
    const unsigned char *p;

    rb_scan_args(argc, argv, "01", &arg);
    if(!NIL_P(arg)){
        OCSP_RESPONSE *res = DATA_PTR(self), *x;
        arg = ossl_to_der_if_possible(arg);
        StringValue(arg);
        p = (unsigned char *)RSTRING_PTR(arg);
        x = d2i_OCSP_RESPONSE(&res, &p, RSTRING_LEN(arg));
        DATA_PTR(self) = res;
        if(!x){
            ossl_raise(eOCSPError, "cannot load DER encoded response");
        }
    }

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