aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-21 12:46:40 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-10-16 16:59:23 +0900
commit5443723a64b42cc42576c5120faccd21abf1e7e3 (patch)
treefeaad5bc8bd573bd9eb1250fed50e505823626b8 /ext/openssl
parenta26e600074efaf80d835c6b6e024585853f6b79d (diff)
downloadruby-openssl-5443723a64b42cc42576c5120faccd21abf1e7e3.tar.gz
Use rb_intern_const instead of rb_intern in Init functions
[ This is a backport to the 2.2 branch. ] ``` find . -name \*.o -exec nm {} + |& sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' | uniq ``` should be empty. (cherry picked from commit 9e4d4704e65bccd3cedeb9a07c9101f3c2eb02e9)
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 76116374..17f7d613 100644
--- a/ext/openssl/ossl_ts.c
+++ b/ext/openssl/ossl_ts.c
@@ -1257,24 +1257,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
@@ -1513,11 +1513,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);
}