summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_asn1.c
AgeCommit message (Collapse)Author
2015-05-27openssl: use RB_GC_GUARD instead of volatilenormal
From doc/extension.rdoc: > > Using the RB_GC_GUARD macro is preferable to using the "volatile" > keyword in C. RB_GC_GUARD has the following advantages: > > 1) the intent of the macro use is clear > > 2) RB_GC_GUARD only affects its call site, "volatile" generates some > extra code every time the variable is used, hurting optimization. > > 3) "volatile" implementations may be buggy/inconsistent in some > compilers and architectures. RB_GC_GUARD is customizable for broken > systems/compilers without those without negatively affecting other > systems. * ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode, ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile [ruby-core:69371] [Bug #11185] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-27ossl_asn1.c: [DOC] Fix typo [skip ci]nobu
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): [DOC] Fix typo "recieved" to "received". [Fix GH-913] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20* ext/openssl/*: use license instead of licence.hsbt
[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
2015-02-21ossl_asn1.c: fix docnobu
* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_oid): [DOC] fix notation, an instance method but not a class method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21[DOC] Backport ruby/openssl@86eb721 [ci skip]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30protoize no-arguments functionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-03openssl: constifynobu
* ext/openssl/ossl_asn1.c (ossl_asn1_info): constify. * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_sym2typeid): constify and remove sentinel as the count is used. * ext/openssl/ossl_ssl.c (ossl_ssl_method_tab): constify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-24ossl_asn1.c: fix undefined behaviornobu
* ext/openssl/ossl_asn1.c (ossl_asn1_initialize): SYMID on a value other than Symbol is an undefined behavior. fix up r31699. [ruby-core:62142] [Bug #9771] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13ext: use PRIsVALUE for rb_raise and rb_warnnobu
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): use PRIsVALUE for rb_raise() and rb_warn(). * ext/openssl/ossl_cipher.c (ossl_cipher_init): ditto. * ext/racc/cparse/cparse.c (extract_user_token): ditto. * ext/syslog/syslog.c (mSyslog_log): ditto. * ext/openssl/ossl.h (OSSL_Check_Kind, OSSL_Check_Instance): now ossl_raise() also accepts PRIsVALUE. * ext/openssl/ossl_asn1.c (ossl_asn1_default_tag): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11* ext/win32ole/sample/olegen.rb: Fix typoa_matsuda
* ext/openssl/ossl_asn1.c: [DOC] Fix typo * lib/webrick/accesslog.rb: ditto * template/yarvarch.ja: ditto s/recieve/receive/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLISTnobu
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration argument list of rb_block_call_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13Squashed commit of the following:nagachika
commit 6895f38bfc3c0ad6bd212b8f9acc3c71384dfcb7 Author: Chikanaga Tomoyuki <nagachika00@gmail.com> Date: Thu Nov 14 00:14:00 2013 +0900 * ChangeLog: fix a typo at r43666 * ext/openssl/ossl_asn1.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13* ext/openssl/ossl_asn1.c: [DOC] Document parts ofzzak
OpenSSL::ASN1::ObjectId included a fix for the class overview, which previously showed the documentation for Constructive due to missing ObjectId overview. This patch also includes a note for Primative. Based on a patch by @vbatts via GH-436 https://github.com/ruby/ruby/pull/436 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22* ext/openssl/ossl_asn1.c (asn1time_to_time): Implement YYMMDDhhmmZdrbrain
format for ASN.1 UTCTime. [ruby-trunk - Bug #8664] * test/openssl/test_asn1.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-04remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-28* ext/openssl/ossl_asn1.c: raise TypeError when trying to encode nilemboss
values for Primitive instances. * test/openssl/test_asn1.rb: Assert consistent behavior when encoding nil values: Primitives raise TypeError, Constructives raise NoMethodError. Fixes [ruby-core:43009][Bug #6102] -This line, and those below, will be ignored-- M test/openssl/test_asn1.rb M ext/openssl/ossl_asn1.c M ChangeLog git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25avoid rdoc's warnings.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08* ext/openssl/ossl_asn1.c: Call INT2NUM only once for GeneralString.emboss
Thanks to Mantas Mikulenas for noticing and providing a patch! [ruby-core:42358] [Bug #5972] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15* ext/openssl/ossl_asn1.c: get rid of potential overflow.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-04* whitespace cleanup.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-25* ext/openssl/ossl_asn1.c: fix int_ossl_asn1_decode0_cons when beingemboss
fed arbitrary string values. Clearly distinguish between the cases "universal, infinite and not a SEQUENCE or SET" and "universal SEQUENCE or SET, possibly infinite". Raise error for universal tags that are not infinite. * test/openssl/test_asn1.rb: add a test for this. Thanks to Hiroshi Yoshida for reporting this bug. [Bug #5363] [ruby-dev:44542] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-23* ext/openssl/ossl_asn1.c: remove unused variable.emboss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-07* ext/openssl/ossl_asn1.c (decode_eoc): remove unused variables.kosaki
Patch by Eric Wong. [Feature #5157] [ruby-core:38798] * ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto. * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30* sytle fixes.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-26* ext/openssl/extconf.rbemboss
* ext/openssl/ossl_missing.h/.c: add ASN1_put_eoc if missing. * ext/openssl/ossl_asn1.c: introduce ossl_asn1_object_size and ossl_asn1_put_object to wrap functionality depending on OpenSSL version in use. Fixes [ Ruby 1.9 - Bug #4916 ] reported by Hiroshi Nakamura. [ruby-core:37286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-23* ext/openssl/ossl_asn1.c: Do not parse zero-tagged values as EOC. Doemboss
not let current length become negative for infinite length constructed values. Support constructed values of length zero. Added tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c: Forbid Constructives whose value is not anemboss
Array to prevent segfault. Added test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c: Forbid Constructive without infiniteemboss
length. This also prevents a segfault. Added test and improved documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c: Fix decoding of infinite length values.emboss
Simplified ossl_asn1_decode0 by splitting it into three separate functions. Add tests. [Ruby 1.9 - Bug #4374][ruby-core:35123] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c (ossl_asn1_initialize): Allow creation ofemboss
Constructives with an explicit tag_class parameter without automatically setting tagging to :EXPLICIT. Fixes a bug when encoding infinite length primitive values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c (ossl_asn1_cons_to_der): Add an additionalemboss
EOC for infinite length Constructives that are supposed to be encoded with explicit tagging. Also tabify method correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c (ossl_asn1data_to_der): Remove redundantemboss
flag tmp_cons. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c: Instead of rb_intern use static symbols toemboss
improve performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c: Use OpenSSL constants V_ASN1_xxx instead ofemboss
hardcoded numbers for initializing class_tag_map. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c(ossl_asn1_default_tag): avoid using RCLASS_SUPERnahi
to make it compilable. Plus, tabify and change variable definition style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext/openssl/ossl_asn1.c: Default tag lookup in constant time via hashemboss
instead of previous linear algorithm. [Ruby 1.9 - Feature #4309][ruby-core:34813] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19* lib: revert r31635-r31638 and untabify with expand(1).nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-16* ext/openssl/ossl_asn1.c: Fix more typos. Document attributesemboss
explicitly. Set indentation for verbose sections from 4 to 2 spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-16 * ext/openssl/ossl_asn1.c: fix typos and remove trailing spacesnagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15Mon May 16 05:13:20 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>emboss
* ext/openssl/ossl_asn1.c: Add documentation. Previous revision: 31583 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-24* ext/openssl/ossl.c: surpress warning: shorten-64-to-32.naruse
* 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
2011-01-26 * ext/openssl/ossl_asn1.c (ossl_asn1_decode0): OpenSSL::ASN1.decodenahi
should reject indefinite length primitive encodings as that is illegal. Patch by Martin Bosslet. See #4324. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-14* ext/openssl/ossl_asn1.c (ossl_asn1_decode0): how many gcc-c99ismsusa
must a man mend; before he can build with VC? r30178 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-11* ext/openssl/ossl_asn1.c: indefinite length BER to DER encoding istenderlove
properly supported. Thanks Martin Bosslet! [ruby-core:33082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06Add toplevel documentation for OpenSSLdrbrain
Add additional documentation for OpenSSL::SSL::SSLContext and OpenSSL::SSL::SSLSocket. Move "let rdoc know about mOSSL" comments so they don't show up in output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23 * backport r29071 from ruby_1_8;nahi
* ext/openssl/ossl_asn1.c (obj_to_asn1bool): fixed ASN1::Boolean encoding issue for OpenSSL 1.0.0 compatibility. ASN1::Boolean.new(false).to_der wrongly generated "\1\1\377" which means 'true'. ASN1_TYPE_set of OpenSSL <= 0.9.8 treats value 0x100 as 'false' but OpenSSL >= 1.0.0 treats it as 'true'. ruby-ossl was using 0x100 for 'false' for backward compatibility. Just use 0x0 for the case OpenSSL >= OpenSSL 0.9.7. * test/openssl/test_asn1.rb: test added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22* ext/**/*.[ch]: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22* ext/**/*.[ch]: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13* configure.in (AC_HEADER_DIRENT): added.nobu
* include/ruby/ruby.h (NUM2INT, rb_special_const_p): returns true and false instead of Qtrue and Qfalse for platforms where VALUE is bigger than int. * gc.c (gc_stress_set), ext/openssl/ossl_asn1.c (decode_bool): got rid of variables named `bool'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e