Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ jobs:
- { uses: './.github/actions/compilers', name: 'clang 21', with: { tag: 'clang-21' }, timeout-minutes: 5 }
- { uses: './.github/actions/compilers', name: 'clang 20', with: { tag: 'clang-20' }, timeout-minutes: 5 }
- { uses: './.github/actions/compilers', name: 'clang 19', with: { tag: 'clang-19' }, timeout-minutes: 5 }
# clang-18 has a bug causing ruby_current_ec to sometimes be null
# - { uses: './.github/actions/compilers', name: 'clang 18', with: { tag: 'clang-18' }, timeout-minutes: 5 }
- { uses: './.github/actions/compilers', name: 'clang 18', with: { tag: 'clang-18' }, timeout-minutes: 5 }
- { uses: './.github/actions/compilers', name: 'clang 17', with: { tag: 'clang-17' }, timeout-minutes: 5 }
- { uses: './.github/actions/compilers', name: 'clang 16', with: { tag: 'clang-16' }, timeout-minutes: 5 }
- { uses: './.github/actions/compilers', name: 'clang 15', with: { tag: 'clang-15' }, timeout-minutes: 5 }
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,11 +1288,6 @@ Init_ossl_asn1(void)
VALUE ary;
int i;

#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

sym_UNIVERSAL = ID2SYM(rb_intern_const("UNIVERSAL"));
sym_CONTEXT_SPECIFIC = ID2SYM(rb_intern_const("CONTEXT_SPECIFIC"));
sym_APPLICATION = ID2SYM(rb_intern_const("APPLICATION"));
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_bn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,11 +1202,6 @@ ossl_bn_set_flags(VALUE self, VALUE arg)
void
Init_ossl_bn(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

#ifdef HAVE_RB_EXT_RACTOR_SAFE
ossl_bn_ctx_key = rb_ractor_local_storage_ptr_newkey(&ossl_bn_ctx_key_type);
#else
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,6 @@ ossl_cipher_set_ccm_data_len(VALUE self, VALUE data_len)
void
Init_ossl_cipher(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

/* Document-class: OpenSSL::Cipher
*
* Provides symmetric algorithms for encryption and decryption. The
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,6 @@ Init_ossl_config(void)
char *path;
VALUE path_str;

#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

/* Document-class: OpenSSL::Config
*
* Configuration for the openssl library.
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,6 @@ ossl_digest_block_length(VALUE self)
void
Init_ossl_digest(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

/* Document-class: OpenSSL::Digest
*
* OpenSSL::Digest allows you to compute message digests (sometimes
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,6 @@ ossl_engine_inspect(VALUE self)
void
Init_ossl_engine(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

cEngine = rb_define_class_under(mOSSL, "Engine", rb_cObject);
eEngineError = rb_define_class_under(cEngine, "EngineError", eOSSLError);

Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,6 @@ ossl_hmac_reset(VALUE self)
void
Init_ossl_hmac(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

/*
* Document-class: OpenSSL::HMAC
*
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_kdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,6 @@ kdf_hkdf(int argc, VALUE *argv, VALUE self)
void
Init_ossl_kdf(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

/*
* Document-module: OpenSSL::KDF
*
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_ns_spki.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,6 @@ ossl_spki_verify(VALUE self, VALUE key)
void
Init_ossl_ns_spki(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

mNetscape = rb_define_module_under(mOSSL, "Netscape");

eSPKIError = rb_define_class_under(mNetscape, "SPKIError", eOSSLError);
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_ocsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,11 +1626,6 @@ ossl_ocspcid_to_der(VALUE self)
void
Init_ossl_ocsp(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

/*
* OpenSSL::OCSP implements Online Certificate Status Protocol requests
* and responses.
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_pkcs12.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,6 @@ void
Init_ossl_pkcs12(void)
{
#undef rb_intern
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

/*
* Defines a file format commonly used to store private keys with
* accompanying public key certificates, protected with a password-based
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_pkcs7.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,11 +1099,6 @@ void
Init_ossl_pkcs7(void)
{
#undef rb_intern
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

cPKCS7 = rb_define_class_under(mOSSL, "PKCS7", rb_cObject);
ePKCS7Error = rb_define_class_under(cPKCS7, "PKCS7Error", eOSSLError);
rb_define_singleton_method(cPKCS7, "read_smime", ossl_pkcs7_s_read_smime, 1);
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,11 +1658,6 @@ void
Init_ossl_pkey(void)
{
#undef rb_intern
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

/* Document-module: OpenSSL::PKey
*
* == Asymmetric Public Key Algorithms
Expand Down
6 changes: 0 additions & 6 deletions ext/openssl/ossl_pkey_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,6 @@ OSSL_PKEY_BN_DEF2(dh, DH, key, pub_key, priv_key)
void
Init_ossl_dh(void)
{
#if 0
mPKey = rb_define_module_under(mOSSL, "PKey");
cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject);
ePKeyError = rb_define_class_under(mPKey, "PKeyError", eOSSLError);
#endif

/* Document-class: OpenSSL::PKey::DH
*
* An implementation of the Diffie-Hellman key exchange protocol based on
Expand Down
6 changes: 0 additions & 6 deletions ext/openssl/ossl_pkey_dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,6 @@ OSSL_PKEY_BN_DEF2(dsa, DSA, key, pub_key, priv_key)
void
Init_ossl_dsa(void)
{
#if 0
mPKey = rb_define_module_under(mOSSL, "PKey");
cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject);
ePKeyError = rb_define_class_under(mPKey, "PKeyError", eOSSLError);
#endif

/* Document-class: OpenSSL::PKey::DSA
*
* DSA, the Digital Signature Algorithm, is specified in NIST's
Expand Down
7 changes: 0 additions & 7 deletions ext/openssl/ossl_pkey_ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1526,13 +1526,6 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
void Init_ossl_ec(void)
{
#undef rb_intern
#if 0
mPKey = rb_define_module_under(mOSSL, "PKey");
cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject);
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
ePKeyError = rb_define_class_under(mPKey, "PKeyError", eOSSLError);
#endif

/*
* Document-class: OpenSSL::PKey::EC
*
Expand Down
6 changes: 0 additions & 6 deletions ext/openssl/ossl_pkey_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,6 @@ OSSL_PKEY_BN_DEF3(rsa, RSA, crt_params, dmp1, dmq1, iqmp)
void
Init_ossl_rsa(void)
{
#if 0
mPKey = rb_define_module_under(mOSSL, "PKey");
cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject);
ePKeyError = rb_define_class_under(mPKey, "PKeyError", eOSSLError);
#endif

/* Document-class: OpenSSL::PKey::RSA
*
* RSA is an asymmetric public key algorithm that has been formalized in
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@ ossl_provider_inspect(VALUE self)
void
Init_ossl_provider(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

cProvider = rb_define_class_under(mOSSL, "Provider", rb_cObject);
eProviderError = rb_define_class_under(cProvider, "ProviderError", eOSSLError);

Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,6 @@ ossl_rand_status(VALUE self)
void
Init_ossl_rand(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif

mRandom = rb_define_module_under(mOSSL, "Random");

eRandomError = rb_define_class_under(mRandom, "RandomError", eOSSLError);
Expand Down
2 changes: 0 additions & 2 deletions ext/openssl/ossl_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2704,8 +2704,6 @@ void
Init_ossl_ssl(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
rb_mWaitReadable = rb_define_module_under(rb_cIO, "WaitReadable");
rb_mWaitWritable = rb_define_module_under(rb_cIO, "WaitWritable");
#endif
Expand Down
5 changes: 0 additions & 5 deletions ext/openssl/ossl_ssl_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,6 @@ static VALUE ossl_ssl_session_to_text(VALUE self)

void Init_ossl_ssl_session(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
mSSL = rb_define_module_under(mOSSL, "SSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif
#ifndef OPENSSL_NO_SOCK
cSSLSession = rb_define_class_under(mSSL, "Session", rb_cObject);
eSSLSession = rb_define_class_under(cSSLSession, "SessionError", eOSSLError);
Expand Down
80 changes: 25 additions & 55 deletions ext/openssl/ossl_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,10 +1298,6 @@ ossl_tsfac_create_ts(VALUE self, VALUE key, VALUE certificate, VALUE request)
void
Init_ossl_ts(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */
#endif

/*
* Possible return value for +Response#failure_info+. Indicates that the
* timestamp server rejects the message imprint algorithm used in the
Expand Down Expand Up @@ -1511,65 +1507,39 @@ Init_ossl_ts(void)
* fac.default_policy_id = '1.2.3.4.5'
* fac.additional_certificates = [ inter1, inter2 ]
* timestamp = fac.create_timestamp(p12.key, p12.certificate, req)
*
* ==Attributes
*
* ===default_policy_id
*/
cTimestampFactory = rb_define_class_under(mTimestamp, "Factory", rb_cObject);
/*
* The list of digest algorithms that the factory is allowed
* create timestamps for. Known vulnerable or weak algorithms should not be
* allowed where possible. Must be an Array of String or OpenSSL::Digest
* subclass instances.
*/
rb_attr(cTimestampFactory, rb_intern_const("allowed_digests"), 1, 1, 0);
/*
* A String representing the default policy object identifier, or +nil+.
*
* Request#policy_id will always be preferred over this if present in the
* Request, only if Request#policy_id is nil default_policy will be used.
* Request, only if Request#policy_id is +nil+ default_policy will be used.
* If none of both is present, a TimestampError will be raised when trying
* to create a Response.
*
* call-seq:
* factory.default_policy_id = "string" -> string
* factory.default_policy_id -> string or nil
*
* ===serial_number
*
* Sets or retrieves the serial number to be used for timestamp creation.
* Must be present for timestamp creation.
*
* call-seq:
* factory.serial_number = number -> number
* factory.serial_number -> number or nil
*
* ===gen_time
*
* Sets or retrieves the Time value to be used in the Response. Must be
* present for timestamp creation.
*
* call-seq:
* factory.gen_time = Time -> Time
* factory.gen_time -> Time or nil
*
* ===additional_certs
*
* Sets or retrieves additional certificates apart from the timestamp
* certificate (e.g. intermediate certificates) to be added to the Response.
* Must be an Array of OpenSSL::X509::Certificate.
*
* call-seq:
* factory.additional_certs = [cert1, cert2] -> [ cert1, cert2 ]
* factory.additional_certs -> array or nil
*
* ===allowed_digests
*
* Sets or retrieves the digest algorithms that the factory is allowed
* create timestamps for. Known vulnerable or weak algorithms should not be
* allowed where possible.
* Must be an Array of String or OpenSSL::Digest subclass instances.
*
* call-seq:
* factory.allowed_digests = ["sha1", OpenSSL::Digest.new('SHA256').new] -> [ "sha1", OpenSSL::Digest) ]
* factory.allowed_digests -> array or nil
*
*/
cTimestampFactory = rb_define_class_under(mTimestamp, "Factory", rb_cObject);
rb_attr(cTimestampFactory, rb_intern_const("allowed_digests"), 1, 1, 0);
rb_attr(cTimestampFactory, rb_intern_const("default_policy_id"), 1, 1, 0);
/*
* The serial number to be used for timestamp creation. Must be present for
* timestamp creation. Must be an instance of OpenSSL::BN or Integer.
*/
rb_attr(cTimestampFactory, rb_intern_const("serial_number"), 1, 1, 0);
/*
* The Time value to be used in the Response. Must be present for timestamp
* creation.
*/
rb_attr(cTimestampFactory, rb_intern_const("gen_time"), 1, 1, 0);
/*
* Additional certificates apart from the timestamp certificate (e.g.
* intermediate certificates) to be added to the Response.
* Must be an Array of OpenSSL::X509::Certificate, or +nil+.
*/
rb_attr(cTimestampFactory, rb_intern_const("additional_certs"), 1, 1, 0);
rb_define_method(cTimestampFactory, "create_timestamp", ossl_tsfac_create_ts, 3);
}
Expand Down
4 changes: 0 additions & 4 deletions ext/openssl/ossl_x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ ossl_x509_time_adjust(ASN1_TIME *s, VALUE time)
void
Init_ossl_x509(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
#endif

mX509 = rb_define_module_under(mOSSL, "X509");

Init_ossl_x509attr();
Expand Down
6 changes: 0 additions & 6 deletions ext/openssl/ossl_x509attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,6 @@ ossl_x509attr_to_der(VALUE self)
void
Init_ossl_x509attr(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
mX509 = rb_define_module_under(mOSSL, "X509");
#endif

eX509AttrError = rb_define_class_under(mX509, "AttributeError", eOSSLError);

cX509Attr = rb_define_class_under(mX509, "Attribute", rb_cObject);
Expand Down
Loading