libcrypto and test: rename asn1_string_to_time_t to ossl_asn1_string_to_time_t
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Tue, 28 Jun 2022 06:42:28 +0000 (08:42 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Tue, 19 Jul 2022 06:44:19 +0000 (08:44 +0200)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18668)

crypto/asn1/a_time.c
include/crypto/asn1.h
test/asn1_time_test.c
test/ca_internals_test.c

index a92cdaa89e432882989bbec533398570ed85edff..23828b1e3148f95ce9af5fabd9d26afe372aa6cb 100644 (file)
@@ -601,7 +601,7 @@ int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b)
 # define USE_TIMEGM
 #endif
 
-time_t asn1_string_to_time_t(const char *asn1_string)
+time_t ossl_asn1_string_to_time_t(const char *asn1_string)
 {
     ASN1_TIME *timestamp_asn1 = NULL;
     struct tm *timestamp_tm = NULL;
index 2308cc0c03ffd3b18372c065ba9312dea875a29b..7636510c12d85b8c8383e2c6e20131f48d320d04 100644 (file)
@@ -147,7 +147,7 @@ EVP_PKEY * ossl_d2i_PrivateKey_legacy(int keytype, EVP_PKEY **a,
                                       OSSL_LIB_CTX *libctx, const char *propq);
 X509_ALGOR *ossl_X509_ALGOR_from_nid(int nid, int ptype, void *pval);
 
-time_t asn1_string_to_time_t(const char *asn1_string);
+time_t ossl_asn1_string_to_time_t(const char *asn1_string);
 void ossl_asn1_string_set_bits_left(ASN1_STRING *str, unsigned int num);
 
 #endif /* ndef OSSL_CRYPTO_ASN1_H */
index 2383ec25c90e9a427c943767eb8d0fe76161feaf..b222b44091a073209734329040dd5e544588b79c 100644 (file)
@@ -431,10 +431,10 @@ static int convert_asn1_to_time_t(int idx)
 {
     time_t testdateutc;
 
-    testdateutc = asn1_string_to_time_t(asn1_to_utc[idx].input);
+    testdateutc = ossl_asn1_string_to_time_t(asn1_to_utc[idx].input);
 
     if (!TEST_time_t_eq(testdateutc, asn1_to_utc[idx].expected)) {
-        TEST_info("asn1_string_to_time_t (%s) failed: expected %li, got %li\n",
+        TEST_info("ossl_asn1_string_to_time_t (%s) failed: expected %li, got %li\n",
                 asn1_to_utc[idx].input, asn1_to_utc[idx].expected, (signed long) testdateutc);
         return 0;
     }
index 2928e5b0b32101b02d90cfffe378dcd1e45ed520..24f7ba3884384e7098542b922779580470d31a5b 100644 (file)
@@ -47,7 +47,7 @@ static int test_do_updatedb(void)
     }
 
     testdate = test_get_argument(2);
-    testdateutc = asn1_string_to_time_t(testdate);
+    testdateutc = ossl_asn1_string_to_time_t(testdate);
     if (TEST_time_t_lt(testdateutc, 0)) {
         return 0;
     }