aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_x509ext.c
Commit message (Collapse)AuthorAgeFilesLines
* ext/openssl: drop support for OpenSSL 0.9.6/0.9.7Kazuki Yamaguchi2016-04-271-13/+0
| | | | | | | | | The last release of OpenSSL 0.9.7 series was over 9 years ago (!) and even 0.9.8/1.0.0 are no longer supported (EOL was 2015-12-31). It actually doesn't compile since r40461 (ext/openssl/ossl_bn.c (ossl_bn_initialize): allow Fixnum and Bignum. [ruby-core:53986] [Feature #8217], 2013-04-25, 2.1.0) and it looks like nobody noticed it.
* * ext/openssl/*: Remove svn commit id macros to make sync easierzzak2015-09-221-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: wrapper object before allocnobu2015-05-291-6/+12
| | | | | | | * ext/openssl: make wrapper objects before allocating structs to get rid of potential memory leaks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/*: use license instead of licence.hsbt2015-04-201-1/+1
| | | | | | | [fix GH-876][ci skip] Patch by @davydovanton * lib/net/https.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ossl_x509ext.c: typed datanobu2014-12-121-3/+11
| | | | | | | * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_type): use typed data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ossl_x509ext.c: typed datanobu2014-12-121-2/+16
| | | | | | * ext/openssl/ossl_x509ext.c (ossl_x509ext_type): use typed data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* protoize no-arguments functionsnobu2014-09-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl.c: surpress warning: shorten-64-to-32.naruse2011-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/openssl/ossl.h: ditto. * ext/openssl/ossl_asn1.c: ditto. * ext/openssl/ossl_bio.c: ditto. * ext/openssl/ossl_bn.c: ditto. * ext/openssl/ossl_cipher.c: ditto. * ext/openssl/ossl_hmac.c: ditto. * ext/openssl/ossl_ns_spki.c: ditto. * ext/openssl/ossl_ocsp.c: ditto. * ext/openssl/ossl_pkcs5.c: ditto. * ext/openssl/ossl_pkey.c: ditto. * ext/openssl/ossl_pkey_dh.c: ditto. * ext/openssl/ossl_pkey_dsa.c: ditto. * ext/openssl/ossl_pkey_ec.c: ditto. * ext/openssl/ossl_pkey_rsa.c: ditto. * ext/openssl/ossl_rand.c: ditto. * ext/openssl/ossl_ssl.c: ditto. * ext/openssl/ossl_x509ext.c: ditto. * ext/openssl/ossl_x509name.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_x509ext.c: parenthesize macro arguments.akr2011-03-151-11/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_config):kosaki2010-12-141-1/+1
| | | | | | | | | fix compile error when !HAVE_X509V3_SET_NCONF. Thanks Chikanaga-san. [ruby-dev:42761] [Ruby 1.9-Bug#4158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add documentation for OpenSSL::X509::Extension.newdrbrain2010-12-041-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/**/*.[ch]: removed trailing spaces.nobu2010-04-221-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/**/*.[ch]: removed trailing spaces.nobu2010-04-221-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/readline/readline.c: use rb_f_notimplement for methods notakr2009-04-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | implemented. * ext/openssl/ossl_engine.c: ditto. * ext/openssl/ossl_config.c: ditto. * ext/openssl/ossl_cipher.c: ditto. * ext/openssl/ossl_pkcs5.c: ditto. * ext/openssl/ossl_x509ext.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/basicsocket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. * ext/iconv/iconv.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): should usenobu2009-03-131-3/+3
| | | | | | | | OPENSSL_free instead of free. a patch from Charlie Savage at [ruby-core:22858]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_config.c (Init_ossl_config): memory leak fixed.matz2008-08-301-0/+1
| | | | | | | | | a patch <shinichiro.hamaji at gmail.com> in [ruby-dev:35880]. * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto. * ext/strscan/strscan.c (strscan_do_scan): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): fix fornobu2008-08-301-2/+4
| | | | | | | initialization of r18168. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl: suppress warnings.nobu2008-07-221-6/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ssl.c: Switch stats hash key from string to symbol.technorama2008-04-201-0/+1
| | | | | | | | | | | | New method SSLContext#setup to aid C extension writers. * test/openssl/test_ssl.rb: Add tests for new method and sessions. Use threads for ssl server instead of forking. * ext/openssl/ossl_version.h: Bump version. * ext/openssl/ossl_x509ext.c: Fix warnings. * test/openssl/utils.rb: Fix warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (search_required): use RSTRING_PTR and RSTRING_STR.usa2006-08-311-1/+1
| | | | | | | | | | | * object.c (nil_plus): ditto. * ext/dl/cptr.c (rb_dlptr_s_to_ptr): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RString): embed small strings.matz2006-08-311-11/+11
| | | | | | | | | | (RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/extconf.rb: check for X509V3_EXT_nconf_nid.gotoyuzo2005-11-221-4/+20
| | | | | | | | | | | | | | * ext/openssl/ossl_x509ext.c (MakeX509ExtFactory): should use OPENSSL_malloc to allocate X509V3_CTX. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): use X509V3_EXT_nconf_nid to avoid SEGV (and to build extensions which values are placed in separate section). * test/openssl/test_x509ext.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb (Set#==): [ruby-dev:25206]matz2004-12-151-3/+4
| | | | | | | | | | | * ext/openssl/ossl_digest.c (ossl_digest_initialize): [ruby-dev:25198] * utf8.c (utf8_is_mbc_ambiguous): [ruby-talk:123561] * utf8.c (utf8_mbc_to_normalize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): d2igotoyuzo2004-08-231-3/+3
| | | | | | | | | | | functions may replace the pointer indicated by the first argument. * ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): ditto. * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * /ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext):gotoyuzo2003-11-151-2/+5
| | | | | | | refine error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ssl.c (ossl_ssl_peer_cert_chain): add new methodgotoyuzo2003-11-011-5/+5
| | | | | | | | | | | | | | | SSLSocket#peer_cert_chain. * ext/openssl/ossl_x509req.c (GetX509ReqPtr): new function which returns underlying X509_REQ. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_issuer_cert, ossl_x509extfactory_set_subject_cert, ossl_x509extfactory_set_crl, ossl_x509extfactory_set_subject_req, ossl_x509extfactory_set_config): use underlying C struct without duplication not to leak momory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/extconf.rb: add check for X509V3_set_nconf.gotoyuzo2003-10-031-0/+4
| | | | | | | | * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_config): cannot implement if X509V3_set_nconf doesn't exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): the argumentgotoyuzo2003-09-201-0/+2
| | | | | | | | | | | | | | | should be a String. * ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): ditt. * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl: all files are reviewed to simplify and avoid memory leak.gotoyuzo2003-09-171-64/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/openssl/extconf.rb: add check for assert.h. * ext/openssl/ossl.c (ossl_buf2str): new function to convert C buffer to String and free buffer. * ext/openssl/ossl.c (ossl_x509_ary2sk): new function to convert Array of OpenSSL::X509 to STACK_OF(X509) with exception safe. * ext/openssl/ossl.c (ossl_to_der, ossl_to_der_if_possible): new functions to convert object to DER string. * ext/openssl/ossl.h: ditto. * ext/openssl/ossl_bio.c (ossl_membio2str): new function to convert BIO to String object and free BIO. * ext/openssl/ossl_bio.h: ditto. * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_to_der): add for "to_der". * ext/openssl/ossl_x509name.c (ossl_x509name_to_der): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509ext_to_der): ditto. * ext/openssl/ossl_x509ext.c (create_ext_from_array): removed and reimplement in openssl/x509.rb. * ext/openssl/ossl_x509attr.c: reimplemented and disable some method temporarily. this class doesn't work fine without ASN.1 data support;-) I'll rewrite in near future. * ext/openssl/lib/openssl/x509.c (X509::Attribute): get rid off unused code. * ext/openssl/lib/openssl/x509.c (X509::ExtensionFactory): refine all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h.gotoyuzo2003-09-081-7/+26
| | | | | | | | | | | | | | | | | | | | | | * 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
* * ext/openssl/ruby_missing.c: rid of unnecessary backwardgotoyuzo2003-09-061-4/+86
| | | | | | | | | | | | | | | | compatibility stuff. and remove DEFINE_ALLOC_WRAPPER from all sources. * ext/openssl/ossl_x509ext.c (X509::Extension.new): new method. * ext/openssl/ossl_x509ext.c (X509::Extension#oid=): new method. * ext/openssl/ossl_x509ext.c (X509::Extension#value=): new method. * ext/openssl/ossl_x509ext.c (X509::Extension#critical=): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl: imported.gotoyuzo2003-07-231-0/+345
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e