Bug #5604 ยป openssl.remove_colon_in_ossl_raise.patch
ext/openssl/ossl_pkey_dsa.c (working copy) | ||
---|---|---|
BIO_free(in);
|
||
if (!dsa) {
|
||
ERR_clear_error();
|
||
ossl_raise(eDSAError, "Neither PUB key nor PRIV key:");
|
||
ossl_raise(eDSAError, "Neither PUB key nor PRIV key");
|
||
}
|
||
}
|
||
if (!EVP_PKEY_assign_DSA(pkey, dsa)) {
|
ext/openssl/ossl_ssl.c (working copy) | ||
---|---|---|
ctx = SSL_CTX_new(SSLv23_method());
|
||
if (!ctx) {
|
||
ossl_raise(eSSLError, "SSL_CTX_new:");
|
||
ossl_raise(eSSLError, "SSL_CTX_new");
|
||
}
|
||
SSL_CTX_set_mode(ctx, mode);
|
||
SSL_CTX_set_options(ctx, SSL_OP_ALL);
|
||
... | ... | |
}
|
||
Data_Get_Struct(self, SSL_CTX, ctx);
|
||
if (SSL_CTX_set_ssl_version(ctx, method) != 1) {
|
||
ossl_raise(eSSLError, "SSL_CTX_set_ssl_version:");
|
||
ossl_raise(eSSLError, "SSL_CTX_set_ssl_version");
|
||
}
|
||
return ssl_method;
|
||
... | ... | |
if (cert && key) {
|
||
if (!SSL_CTX_use_certificate(ctx, cert)) {
|
||
/* Adds a ref => Safe to FREE */
|
||
ossl_raise(eSSLError, "SSL_CTX_use_certificate:");
|
||
ossl_raise(eSSLError, "SSL_CTX_use_certificate");
|
||
}
|
||
if (!SSL_CTX_use_PrivateKey(ctx, key)) {
|
||
/* Adds a ref => Safe to FREE */
|
||
ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey:");
|
||
ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey");
|
||
}
|
||
if (!SSL_CTX_check_private_key(ctx)) {
|
||
ossl_raise(eSSLError, "SSL_CTX_check_private_key:");
|
||
ossl_raise(eSSLError, "SSL_CTX_check_private_key");
|
||
}
|
||
}
|
||
... | ... | |
StringValue(val);
|
||
if (!SSL_CTX_set_session_id_context(ctx, (unsigned char *)RSTRING_PTR(val),
|
||
RSTRING_LENINT(val))){
|
||
ossl_raise(eSSLError, "SSL_CTX_set_session_id_context:");
|
||
ossl_raise(eSSLError, "SSL_CTX_set_session_id_context");
|
||
}
|
||
}
|
||
... | ... | |
return Qnil;
|
||
}
|
||
if (!SSL_CTX_set_cipher_list(ctx, RSTRING_PTR(str))) {
|
||
ossl_raise(eSSLError, "SSL_CTX_set_cipher_list:");
|
||
ossl_raise(eSSLError, "SSL_CTX_set_cipher_list");
|
||
}
|
||
return v;
|
||
... | ... | |
ssl = SSL_new(ctx);
|
||
if (!ssl) {
|
||
ossl_raise(eSSLError, "SSL_new:");
|
||
ossl_raise(eSSLError, "SSL_new");
|
||
}
|
||
DATA_PTR(self) = ssl;
|
||
#ifdef HAVE_SSL_SET_TLSEXT_HOST_NAME
|
||
if (!NIL_P(hostname)) {
|
||
if (SSL_set_tlsext_host_name(ssl, StringValuePtr(hostname)) != 1)
|
||
ossl_raise(eSSLError, "SSL_set_tlsext_host_name:");
|
||
ossl_raise(eSSLError, "SSL_set_tlsext_host_name");
|
||
}
|
||
#endif
|
||
io = ossl_ssl_get_io(self);
|
||
... | ... | |
if(ERR_peek_error() == 0 && nread == 0) rb_eof_error();
|
||
rb_sys_fail(0);
|
||
default:
|
||
ossl_raise(eSSLError, "SSL_read:");
|
||
ossl_raise(eSSLError, "SSL_read");
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
case SSL_ERROR_SYSCALL:
|
||
if (errno) rb_sys_fail(0);
|
||
default:
|
||
ossl_raise(eSSLError, "SSL_write:");
|
||
ossl_raise(eSSLError, "SSL_write");
|
||
}
|
||
}
|
||
}
|
ext/openssl/ossl_pkey_rsa.c (working copy) | ||
---|---|---|
}
|
||
BIO_free(in);
|
||
if (!rsa) {
|
||
ossl_raise(eRSAError, "Neither PUB key nor PRIV key:");
|
||
ossl_raise(eRSAError, "Neither PUB key nor PRIV key");
|
||
}
|
||
}
|
||
if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
|