mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
openssl: import v2.0.0
Import Ruby/OpenSSL 2.0.0. The full commit history since 2.0.0 beta.2 (imported at r56098) can be found at: https://github.com/ruby/openssl/compare/v2.0.0.beta.2...v2.0.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a5abaf745
commit
aab0d67a1f
49 changed files with 1230 additions and 1286 deletions
|
@ -160,8 +160,6 @@ ossl_x509req_to_pem(VALUE self)
|
|||
{
|
||||
X509_REQ *req;
|
||||
BIO *out;
|
||||
BUF_MEM *buf;
|
||||
VALUE str;
|
||||
|
||||
GetX509Req(self, req);
|
||||
if (!(out = BIO_new(BIO_s_mem()))) {
|
||||
|
@ -171,11 +169,8 @@ ossl_x509req_to_pem(VALUE self)
|
|||
BIO_free(out);
|
||||
ossl_raise(eX509ReqError, NULL);
|
||||
}
|
||||
BIO_get_mem_ptr(out, &buf);
|
||||
str = rb_str_new(buf->data, buf->length);
|
||||
BIO_free(out);
|
||||
|
||||
return str;
|
||||
return ossl_membio2str(out);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
@ -203,8 +198,6 @@ ossl_x509req_to_text(VALUE self)
|
|||
{
|
||||
X509_REQ *req;
|
||||
BIO *out;
|
||||
BUF_MEM *buf;
|
||||
VALUE str;
|
||||
|
||||
GetX509Req(self, req);
|
||||
if (!(out = BIO_new(BIO_s_mem()))) {
|
||||
|
@ -214,11 +207,8 @@ ossl_x509req_to_text(VALUE self)
|
|||
BIO_free(out);
|
||||
ossl_raise(eX509ReqError, NULL);
|
||||
}
|
||||
BIO_get_mem_ptr(out, &buf);
|
||||
str = rb_str_new(buf->data, buf->length);
|
||||
BIO_free(out);
|
||||
|
||||
return str;
|
||||
return ossl_membio2str(out);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -304,8 +294,6 @@ ossl_x509req_get_signature_algorithm(VALUE self)
|
|||
X509_REQ *req;
|
||||
const X509_ALGOR *alg;
|
||||
BIO *out;
|
||||
BUF_MEM *buf;
|
||||
VALUE str;
|
||||
|
||||
GetX509Req(self, req);
|
||||
|
||||
|
@ -317,10 +305,8 @@ ossl_x509req_get_signature_algorithm(VALUE self)
|
|||
BIO_free(out);
|
||||
ossl_raise(eX509ReqError, NULL);
|
||||
}
|
||||
BIO_get_mem_ptr(out, &buf);
|
||||
str = rb_str_new(buf->data, buf->length);
|
||||
BIO_free(out);
|
||||
return str;
|
||||
|
||||
return ossl_membio2str(out);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue