aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_x509ext.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'maint-2.0' into maintKazuki Yamaguchi2018-08-081-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix made in 6fcc6c0efc42 ("test/test_ssl: fix test failure with TLS 1.3", 2018-08-06) is applied to the new test cases. * maint-2.0: reduce LibreSSL warnings openssl_missing.h: constified openssl: search winsock search winsock libraries explicitly no ID cache in Init functions test/test_ssl: fix test failure with TLS 1.3 tool/ruby-openssl-docker: update to latest versions pkey: resume key generation after interrupt
| * no ID cache in Init functionsnobu2018-08-081-0/+1
| | | | | | | | | | | | | | Init functions are called only once, cache is useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Sync-with-trunk: r62429
* | Remove SafeGet*() macrosKazuki Yamaguchi2017-05-021-6/+2
| | | | | | | | | | | | They are no longer useful since we use the TypedData_Get_Struct() which also performs type checking (based on the rb_data_type_t) for the non-safe Get*() macros. Just use them instead.
* | Merge branch 'topic/expand-ruby-missing-h'Kazuki Yamaguchi2017-04-281-1/+1
|\ \ | | | | | | | | | | | | | | | * topic/expand-ruby-missing-h: Expand FPTR_TO_FD() macro Expand rb_define_copy_func() macro
| * | Expand rb_define_copy_func() macroKazuki Yamaguchi2017-04-281-1/+1
| |/ | | | | | | | | It's not really "missing". Let's expand that, as it does not improve the readability so much.
* / Fix RDoc markuptopic/fix-rdoc-markupKazuki Yamaguchi2017-02-241-6/+6
|/ | | | | Ruby core uses _str_ for emphasizing argument names and +str+ for codes. Match with the rule for better rendering.
* x509ext: fix X509::ExtensionFactory#create_ext with configKazuki Yamaguchi2016-08-281-0/+2
| | | | | | | The assumption in commit 1b1d520818e0 ("x509ext: fix memory leak in X509::ExtensionFactory#config=") was wrong. The uninitialized X509V3_CTX::db can be referred through "r2i" functions when creating certain types of extension that use them.
* x509ext: remove unnecessary DupX509ExtPtr()Kazuki Yamaguchi2016-08-161-13/+0
| | | | All usages can be replaced with GetX509ExtPtr().
* x509ext: fix memory leak in X509::Extension#value=Kazuki Yamaguchi2016-08-161-8/+6
| | | | | | | X509_EXTENSION_set_data() dups the ASN1_OCTET_STRING, so we must free the temporary ASN1_OCTET_STRING object. However we can retrieve the current ASN1_OCTET_STRING object by X509_EXTENSION_get_data() and modify it directly.
* x509ext: fix memory leak in X509::Extension#oid=Kazuki Yamaguchi2016-08-161-6/+8
| | | | | X509_EXTENSION_set_object() dups the ASN1_OBJECT passed via the argument so we need to free.
* x509ext: fix memory leak in X509::ExtensionFactory#config=Kazuki Yamaguchi2016-08-141-16/+1
| | | | | | X509V3_set_nconf() sets the CONF passed via the argument to X509V3_CTX, but it doesn't free CONF. However we don't actually need it so replace with a simple Ruby-level attribute.
* x509ext: fix a memory leak in X509::ExtensionFactory#create_extKazuki Yamaguchi2016-08-141-0/+1
| | | | The CONF returned by DupConfigPtr() must be free'd by the caller.
* config: rename GetConfigPtr() to DupConfigPtr()Kazuki Yamaguchi2016-08-141-2/+2
| | | | | | | Make it follow the convention. Other Get*Ptr() functions return a pointer to OpenSSL object that the caller doesn't need to free. Indeed DupConfigPtr() is not the best name (OpenSSL::Config does not actually wrap a CONF object), but should be better than GetConfigPtr().
* Implement missing initialize_copytopic/fix-initialize-copyKazuki Yamaguchi2016-08-041-0/+20
| | | | | | | | | | | | | | | | | | | | | Implement initialize_copy for: - OpenSSL::PKCS12 - OpenSSL::SSL::SSLSession - OpenSSL::X509::Attribute - OpenSSL::X509::Extension - OpenSSL::X509::Name - OpenSSL::X509::Revoked Remove initialize_copy from: - OpenSSL::SSL::SSLContext - OpenSSL::SSL::SSLSocket - OpenSSL::Engine - OpenSSL::X509::Store - OpenSSL::X509::StoreContext [Bug #12381]
* Fix RDoc styletopic/rdoc-fixesKazuki Yamaguchi2016-07-091-6/+11
|
* openssl: drop OpenSSL 0.9.6/0.9.7 supportrhe2016-05-311-13/+0
| | | | | | * ext/openssl, test/openssl: Drop OpenSSL < 0.9.8 support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: avoid deprecated M_ASN1_* macrosrhe2016-05-311-9/+2
| | | | | | | | | | | | | | | | * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): Use ASN1_OCTET_STRING_set() instead of M_ASN1_OCTET_STRING_set(). Macros prefixed by "M_" are discouraged to be used from outside OpenSSL library[1]. (ossl_x509ext_get_value): Likewise, use ASN1_STRING_print() instead of M_ASN1_OCTET_STRING_print(). [1] https://git.openssl.org/gitweb/?p=openssl.git;a=blob;f=CHANGES;h=bf61913d7b01212b4d8b2f3c13d71d645914f67c;hb=b6079a7835f61daa9fb2cbf9addfa86049523933#l878 * ext/openssl/ossl.h: Include openssl/asn1.h instead of openssl/asn1_mac.h. It just includes openssl/asn1.h and defines some additional "M_" macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: use StringValueCStr() where NUL-terminated string is expectedrhe2016-05-311-5/+7
| | | | | | | | | | | | | | * ext/openssl/ossl_asn1.c, ext/openssl/ossl_bn.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_digest.c ext/openssl/ossl_engine.c, ext/openssl/ossl_ns_spki.c ext/openssl/ossl_pkcs12.c, ext/openssl/ossl_pkcs7.c ext/openssl/ossl_pkey.c, ext/openssl/ossl_pkey_ec.c ext/openssl/ossl_rand.c, ext/openssl/ossl_ssl.c ext/openssl/ossl_x509attr.c, ext/openssl/ossl_x509cert.c ext/openssl/ossl_x509ext.c, ext/openssl/ossl_x509store.c: Use StringValueCStr() where NUL-terminated string is expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Sync with ruby trunkZachary Scott2015-09-231-1/+0
|
* Upstream ruby/ruby@451fe26 from r50673Zachary Scott2015-06-031-6/+12
|
* Apply ruby/ruby@325a50fc572516a171d640765d6ddf9b20be14dc to fix typosZachary Scott2015-05-041-1/+1
| | | | See also r50351 from ruby/ruby#876
* Sync with ruby trunkZachary Scott2015-01-051-5/+27
|
* import ruby trunkSHIBATA Hiroshi2014-10-271-0/+471