diff options
author | gotoyuzo <gotoyuzo@ruby-lang.org> | 2003-09-08 10:31:38 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@ruby-lang.org> | 2003-09-08 10:31:38 +0000 |
commit | 491928eccfbad876ac9d57883c97a0de34ea3636 (patch) | |
tree | 584379ee131942d4bff2c449e4707f99d45f72be /ext/openssl/ossl_x509.c | |
parent | 3cb1106f2dce8ced7ee35d5949ae9a7fb28d2703 (diff) | |
download | ruby-openssl-history-491928eccfbad876ac9d57883c97a0de34ea3636.tar.gz |
* ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h.
* ext/openssl/ossl_config.c: refine all with backward compatibility.
* ext/openssl/ossl_config.h: export GetConfigPtr() and DupConfigPtr().
* ext/openssl/ossl_x509.c: added new constants under X509 module.
DEFAULT_CERT_AREA, DEFAULT_CERT_DIR, DEFAULT_CERT_FILE,
DEFAULT_CERT_DIR_ENV, DEFAULT_CERT_FILE_ENV and DEFAULT_PRIVATE_DIR.
* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_free): don't free
the members of the struct. it's left to GC.
* ext/openssl/ossl_x509ext.c (ossl_x509_set_config): add for config=.
* ext/openssl/ossl_x509ext.c (Xossl_x509extfactory_initialize):
add attr readers: issuer_certificate, subject_certificate,
subject_request, crl and config.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_x509.c')
-rw-r--r-- | ext/openssl/ossl_x509.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/openssl/ossl_x509.c b/ext/openssl/ossl_x509.c index 1fe50ab..fd1d9b6 100644 --- a/ext/openssl/ossl_x509.c +++ b/ext/openssl/ossl_x509.c @@ -13,6 +13,8 @@ VALUE mX509; #define DefX509Const(x) rb_define_const(mX509, #x,INT2FIX(X509_##x)) +#define DefX509Default(x,i) \ + rb_define_const(mX509, "DEFAULT_" #x, rb_str_new2(X509_get_default_##i())) void Init_ossl_x509() @@ -91,5 +93,12 @@ Init_ossl_x509() #if defined(X509_TRUST_OCSP_REQUEST) DefX509Const(TRUST_OCSP_REQUEST); #endif + + DefX509Default(CERT_AREA, cert_area); + DefX509Default(CERT_DIR, cert_dir); + DefX509Default(CERT_FILE, cert_file); + DefX509Default(CERT_DIR_ENV, cert_dir_env); + DefX509Default(CERT_FILE_ENV, cert_file_env); + DefX509Default(PRIVATE_DIR, private_dir); } |