Project

General

Profile

Bug #5604 ยป openssl.remove_colon_in_ossl_raise.patch

drbrain (Eric Hodel), 11/10/2011 08:37 AM

View differences:

ext/openssl/ossl_pkey_dsa.c (working copy)
244 244
	BIO_free(in);
245 245
	if (!dsa) {
246 246
	    ERR_clear_error();
247
	    ossl_raise(eDSAError, "Neither PUB key nor PRIV key:");
247
	    ossl_raise(eDSAError, "Neither PUB key nor PRIV key");
248 248
	}
249 249
    }
250 250
    if (!EVP_PKEY_assign_DSA(pkey, dsa)) {
ext/openssl/ossl_ssl.c (working copy)
148 148

  
149 149
    ctx = SSL_CTX_new(SSLv23_method());
150 150
    if (!ctx) {
151
        ossl_raise(eSSLError, "SSL_CTX_new:");
151
        ossl_raise(eSSLError, "SSL_CTX_new");
152 152
    }
153 153
    SSL_CTX_set_mode(ctx, mode);
154 154
    SSL_CTX_set_options(ctx, SSL_OP_ALL);
......
185 185
    }
186 186
    Data_Get_Struct(self, SSL_CTX, ctx);
187 187
    if (SSL_CTX_set_ssl_version(ctx, method) != 1) {
188
        ossl_raise(eSSLError, "SSL_CTX_set_ssl_version:");
188
        ossl_raise(eSSLError, "SSL_CTX_set_ssl_version");
189 189
    }
190 190

  
191 191
    return ssl_method;
......
590 590
    if (cert && key) {
591 591
        if (!SSL_CTX_use_certificate(ctx, cert)) {
592 592
            /* Adds a ref => Safe to FREE */
593
            ossl_raise(eSSLError, "SSL_CTX_use_certificate:");
593
            ossl_raise(eSSLError, "SSL_CTX_use_certificate");
594 594
        }
595 595
        if (!SSL_CTX_use_PrivateKey(ctx, key)) {
596 596
            /* Adds a ref => Safe to FREE */
597
            ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey:");
597
            ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey");
598 598
        }
599 599
        if (!SSL_CTX_check_private_key(ctx)) {
600
            ossl_raise(eSSLError, "SSL_CTX_check_private_key:");
600
            ossl_raise(eSSLError, "SSL_CTX_check_private_key");
601 601
        }
602 602
    }
603 603

  
......
651 651
	StringValue(val);
652 652
	if (!SSL_CTX_set_session_id_context(ctx, (unsigned char *)RSTRING_PTR(val),
653 653
					    RSTRING_LENINT(val))){
654
	    ossl_raise(eSSLError, "SSL_CTX_set_session_id_context:");
654
	    ossl_raise(eSSLError, "SSL_CTX_set_session_id_context");
655 655
	}
656 656
    }
657 657

  
......
771 771
        return Qnil;
772 772
    }
773 773
    if (!SSL_CTX_set_cipher_list(ctx, RSTRING_PTR(str))) {
774
        ossl_raise(eSSLError, "SSL_CTX_set_cipher_list:");
774
        ossl_raise(eSSLError, "SSL_CTX_set_cipher_list");
775 775
    }
776 776

  
777 777
    return v;
......
1058 1058

  
1059 1059
        ssl = SSL_new(ctx);
1060 1060
        if (!ssl) {
1061
            ossl_raise(eSSLError, "SSL_new:");
1061
            ossl_raise(eSSLError, "SSL_new");
1062 1062
        }
1063 1063
        DATA_PTR(self) = ssl;
1064 1064

  
1065 1065
#ifdef HAVE_SSL_SET_TLSEXT_HOST_NAME
1066 1066
        if (!NIL_P(hostname)) {
1067 1067
           if (SSL_set_tlsext_host_name(ssl, StringValuePtr(hostname)) != 1)
1068
               ossl_raise(eSSLError, "SSL_set_tlsext_host_name:");
1068
               ossl_raise(eSSLError, "SSL_set_tlsext_host_name");
1069 1069
        }
1070 1070
#endif
1071 1071
        io = ossl_ssl_get_io(self);
......
1273 1273
		if(ERR_peek_error() == 0 && nread == 0) rb_eof_error();
1274 1274
		rb_sys_fail(0);
1275 1275
	    default:
1276
		ossl_raise(eSSLError, "SSL_read:");
1276
		ossl_raise(eSSLError, "SSL_read");
1277 1277
	    }
1278 1278
        }
1279 1279
    }
......
1350 1350
	    case SSL_ERROR_SYSCALL:
1351 1351
		if (errno) rb_sys_fail(0);
1352 1352
	    default:
1353
		ossl_raise(eSSLError, "SSL_write:");
1353
		ossl_raise(eSSLError, "SSL_write");
1354 1354
	    }
1355 1355
        }
1356 1356
    }
ext/openssl/ossl_pkey_rsa.c (working copy)
243 243
	}
244 244
	BIO_free(in);
245 245
	if (!rsa) {
246
	    ossl_raise(eRSAError, "Neither PUB key nor PRIV key:");
246
	    ossl_raise(eRSAError, "Neither PUB key nor PRIV key");
247 247
	}
248 248
    }
249 249
    if (!EVP_PKEY_assign_RSA(pkey, rsa)) {