Method: OpenSSL::X509::Request#public_key

Defined in:
ossl_x509req.c

#public_keyObject



275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'ossl_x509req.c', line 275

static VALUE
ossl_x509req_get_public_key(VALUE self)
{
    X509_REQ *req;
    EVP_PKEY *pkey;

    GetX509Req(self, req);
    if (!(pkey = X509_REQ_get_pubkey(req))) { /* adds reference */
	ossl_raise(eX509ReqError, NULL);
    }

    return ossl_pkey_new(pkey); /* NO DUP - OK */
}