From 7203a60b13b7f2736ae7be6441cef851aba065ce Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Fri, 11 Feb 2005 08:42:57 +0000 Subject: * ext/openss/ossl_x509store.c (ossl_x509store_set_default_paths): new method OpenSSL::X509::Store#set_default_paths. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_x509store.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ext') diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c index cf1a2cdac..b08f90cde 100644 --- a/ext/openssl/ossl_x509store.c +++ b/ext/openssl/ossl_x509store.c @@ -238,6 +238,17 @@ ossl_x509store_add_path(VALUE self, VALUE dir) return self; } +static VALUE +ossl_x509store_set_default_paths(VALUE self) +{ + X509_STORE *store; + + GetX509Store(self, store); + X509_STORE_set_default_paths(store); + + return Qnil; +} + static VALUE ossl_x509store_add_cert(VALUE self, VALUE arg) { @@ -574,6 +585,7 @@ Init_ossl_x509store() rb_define_method(cX509Store, "time=", ossl_x509store_set_time, 1); rb_define_method(cX509Store, "add_path", ossl_x509store_add_path, 1); rb_define_method(cX509Store, "add_file", ossl_x509store_add_file, 1); + rb_define_method(cX509Store, "set_default_paths", ossl_x509store_set_default_paths, 0); rb_define_method(cX509Store, "add_cert", ossl_x509store_add_cert, 1); rb_define_method(cX509Store, "add_crl", ossl_x509store_add_crl, 1); rb_define_method(cX509Store, "verify", ossl_x509store_verify, -1); -- cgit