aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-21 12:46:40 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-14 12:45:01 +0900
commit9e4d4704e65bccd3cedeb9a07c9101f3c2eb02e9 (patch)
tree85a89371680ad2b2d466f8692cc5257c0d12055e /ext/openssl
parent03304838c931d9600617241909974df5ef58d06b (diff)
downloadruby-openssl-9e4d4704e65bccd3cedeb9a07c9101f3c2eb02e9.tar.gz
Use rb_intern_const instead of rb_intern in Init functions
``` find . -name \*.o -exec nm {} + |& sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' | uniq ``` should be empty.
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl_ts.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/openssl/ossl_ts.c b/ext/openssl/ossl_ts.c
index d59c9348..752c61cf 100644
--- a/ext/openssl/ossl_ts.c
+++ b/ext/openssl/ossl_ts.c
@@ -1247,24 +1247,24 @@ Init_ossl_ts(void)
* timestamp server rejects the message imprint algorithm used in the
* +Request+
*/
- sBAD_ALG = rb_intern("BAD_ALG");
+ sBAD_ALG = rb_intern_const("BAD_ALG");
/*
* Possible return value for +Response#failure_info+. Indicates that the
* timestamp server was not able to process the +Request+ properly.
*/
- sBAD_REQUEST = rb_intern("BAD_REQUEST");
+ sBAD_REQUEST = rb_intern_const("BAD_REQUEST");
/*
* Possible return value for +Response#failure_info+. Indicates that the
* timestamp server was not able to parse certain data in the +Request+.
*/
- sBAD_DATA_FORMAT = rb_intern("BAD_DATA_FORMAT");
+ sBAD_DATA_FORMAT = rb_intern_const("BAD_DATA_FORMAT");
- sTIME_NOT_AVAILABLE = rb_intern("TIME_NOT_AVAILABLE");
- sUNACCEPTED_POLICY = rb_intern("UNACCEPTED_POLICY");
- sUNACCEPTED_EXTENSION = rb_intern("UNACCEPTED_EXTENSION");
- sADD_INFO_NOT_AVAILABLE = rb_intern("ADD_INFO_NOT_AVAILABLE");
- sSYSTEM_FAILURE = rb_intern("SYSTEM_FAILURE");
+ sTIME_NOT_AVAILABLE = rb_intern_const("TIME_NOT_AVAILABLE");
+ sUNACCEPTED_POLICY = rb_intern_const("UNACCEPTED_POLICY");
+ sUNACCEPTED_EXTENSION = rb_intern_const("UNACCEPTED_EXTENSION");
+ sADD_INFO_NOT_AVAILABLE = rb_intern_const("ADD_INFO_NOT_AVAILABLE");
+ sSYSTEM_FAILURE = rb_intern_const("SYSTEM_FAILURE");
/* Document-class: OpenSSL::Timestamp
* Provides classes and methods to request, create and validate
@@ -1503,11 +1503,11 @@ Init_ossl_ts(void)
*
*/
cTimestampFactory = rb_define_class_under(mTimestamp, "Factory", rb_cObject);
- rb_attr(cTimestampFactory, rb_intern("allowed_digests"), 1, 1, 0);
- rb_attr(cTimestampFactory, rb_intern("default_policy_id"), 1, 1, 0);
- rb_attr(cTimestampFactory, rb_intern("serial_number"), 1, 1, 0);
- rb_attr(cTimestampFactory, rb_intern("gen_time"), 1, 1, 0);
- rb_attr(cTimestampFactory, rb_intern("additional_certs"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("allowed_digests"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("default_policy_id"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("serial_number"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("gen_time"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("additional_certs"), 1, 1, 0);
rb_define_method(cTimestampFactory, "create_timestamp", ossl_tsfac_create_ts, 3);
}