mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_pkey_{ec,dh,dsa,rsa}.c: Remove useless warnings.
* ext/openssl/ossl_asn1.c: Simplify code. * ext/openssl/ossl_ssl_session.c Fix compiler warnings. Undefine #id if SSL_SESSION_get_id is not supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a0ec9f61d1
commit
1401783153
6 changed files with 13 additions and 13 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
Tue Feb 26 16:06:00 2008 Technorama Ltd. <oss-ruby@technorama.net>
|
||||||
|
|
||||||
|
* ext/openssl/ossl_pkey_{ec,dh,dsa,rsa}.c: Remove useless warnings.
|
||||||
|
|
||||||
|
* ext/openssl/ossl_asn1.c: Simplify code.
|
||||||
|
|
||||||
|
* ext/openssl/ossl_ssl_session.c Fix compiler warnings.
|
||||||
|
Undefine #id if SSL_SESSION_get_id is not supported.
|
||||||
|
|
||||||
Tue Feb 26 15:43:42 2008 Tanaka Akira <akr@fsij.org>
|
Tue Feb 26 15:43:42 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* parse.y (tokadd_escape): refactored. [ruby-core:15657]
|
* parse.y (tokadd_escape): refactored. [ruby-core:15657]
|
||||||
|
|
|
@ -524,11 +524,9 @@ Init_ossl_dh()
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* defined NO_DH */
|
#else /* defined NO_DH */
|
||||||
# warning >>> OpenSSL is compiled without DH support <<<
|
|
||||||
void
|
void
|
||||||
Init_ossl_dh()
|
Init_ossl_dh()
|
||||||
{
|
{
|
||||||
rb_warning("OpenSSL is compiled without DH support");
|
|
||||||
}
|
}
|
||||||
#endif /* NO_DH */
|
#endif /* NO_DH */
|
||||||
|
|
||||||
|
|
|
@ -477,12 +477,8 @@ Init_ossl_dsa()
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* defined NO_DSA */
|
#else /* defined NO_DSA */
|
||||||
# warning >>> OpenSSL is compiled without DSA support <<<
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_ossl_dsa()
|
Init_ossl_dsa()
|
||||||
{
|
{
|
||||||
rb_warning("OpenSSL is compiled without DSA support");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* NO_DSA */
|
#endif /* NO_DSA */
|
||||||
|
|
|
@ -1576,10 +1576,7 @@ void Init_ossl_ec()
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* defined NO_EC */
|
#else /* defined NO_EC */
|
||||||
# warning >>> OpenSSL is compiled without EC support <<<
|
|
||||||
|
|
||||||
void Init_ossl_ec()
|
void Init_ossl_ec()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* NO_EC */
|
#endif /* NO_EC */
|
||||||
|
|
|
@ -585,11 +585,9 @@ Init_ossl_rsa()
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* defined NO_RSA */
|
#else /* defined NO_RSA */
|
||||||
# warning >>> OpenSSL is compiled without RSA support <<<
|
|
||||||
void
|
void
|
||||||
Init_ossl_rsa()
|
Init_ossl_rsa()
|
||||||
{
|
{
|
||||||
rb_warning("OpenSSL is compiled without RSA support");
|
|
||||||
}
|
}
|
||||||
#endif /* NO_RSA */
|
#endif /* NO_RSA */
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ static VALUE ossl_ssl_session_get_id(VALUE self)
|
||||||
|
|
||||||
p = SSL_SESSION_get_id(ctx, &i);
|
p = SSL_SESSION_get_id(ctx, &i);
|
||||||
|
|
||||||
return rb_str_new(p, i);
|
return rb_str_new((const char *) p, i);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ static VALUE ossl_ssl_session_to_der(VALUE self)
|
||||||
else if (len >= sizeof(buf))
|
else if (len >= sizeof(buf))
|
||||||
ossl_raise(eSSLSession, "i2d_SSL_SESSION too large");
|
ossl_raise(eSSLSession, "i2d_SSL_SESSION too large");
|
||||||
|
|
||||||
return rb_str_new(p, len);
|
return rb_str_new((const char *) p, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -289,6 +289,8 @@ void Init_ossl_ssl_session(void)
|
||||||
|
|
||||||
#ifdef HAVE_SSL_SESSION_GET_ID
|
#ifdef HAVE_SSL_SESSION_GET_ID
|
||||||
rb_define_method(cSSLSession, "id", ossl_ssl_session_get_id, 0);
|
rb_define_method(cSSLSession, "id", ossl_ssl_session_get_id, 0);
|
||||||
|
#else
|
||||||
|
rb_undef_method(cSSLSession, "id");
|
||||||
#endif
|
#endif
|
||||||
rb_define_method(cSSLSession, "to_der", ossl_ssl_session_to_der, 0);
|
rb_define_method(cSSLSession, "to_der", ossl_ssl_session_to_der, 0);
|
||||||
rb_define_method(cSSLSession, "to_pem", ossl_ssl_session_to_pem, 0);
|
rb_define_method(cSSLSession, "to_pem", ossl_ssl_session_to_pem, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue