Home
last modified time | relevance | path

Searched refs:tm (Results 1 – 25 of 36) sorted by relevance

12

/openssl/crypto/
H A Do_time.c14 struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) in OPENSSL_gmtime()
16 struct tm *ts = NULL; in OPENSSL_gmtime()
69 static int julian_adj(const struct tm *tm, int off_day, long offset_sec,
72 int OPENSSL_gmtime_adj(struct tm *tm, int off_day, long offset_sec) in OPENSSL_gmtime_adj() argument
91 tm->tm_mon = time_month - 1; in OPENSSL_gmtime_adj()
92 tm->tm_mday = time_day; in OPENSSL_gmtime_adj()
96 tm->tm_sec = time_sec % 60; in OPENSSL_gmtime_adj()
103 const struct tm *from, const struct tm *to) in OPENSSL_gmtime_diff()
133 static int julian_adj(const struct tm *tm, int off_day, long offset_sec, in julian_adj() argument
145 offset_hms += tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec; in julian_adj()
[all …]
/openssl/crypto/asn1/
H A Da_time.c50 static void determine_days(struct tm *tm) in determine_days() argument
76 int ossl_asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) in ossl_asn1_time_to_tm() argument
83 struct tm tmp; in ossl_asn1_time_to_tm()
331 struct tm *ts; in ASN1_TIME_adj()
332 struct tm data; in ASN1_TIME_adj()
360 struct tm tm; in ASN1_TIME_to_generalizedtime() local
387 struct tm tm; in ASN1_TIME_set_string_X509() local
443 int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm) in ASN1_TIME_to_tm() argument
449 memset(tm, 0, sizeof(*tm)); in ASN1_TIME_to_tm()
494 struct tm stm; in ossl_asn1_time_print_ex()
[all …]
H A Da_utctm.c20 int ossl_asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d) in IMPLEMENT_ASN1_DUP_FUNCTION()
25 return ossl_asn1_time_to_tm(tm, d); in IMPLEMENT_ASN1_DUP_FUNCTION()
60 struct tm *ts; in ASN1_UTCTIME_adj()
61 struct tm data; in ASN1_UTCTIME_adj()
77 struct tm stm, ttm; in ASN1_UTCTIME_cmp_time_t()
96 int ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm) in ASN1_UTCTIME_print() argument
98 if (tm->type != V_ASN1_UTCTIME) in ASN1_UTCTIME_print()
100 return ASN1_TIME_print(bp, tm); in ASN1_UTCTIME_print()
H A Da_gentm.c24 static int asn1_generalizedtime_to_tm(struct tm *tm, in IMPLEMENT_ASN1_DUP_FUNCTION()
30 return ossl_asn1_time_to_tm(tm, d); in IMPLEMENT_ASN1_DUP_FUNCTION()
66 struct tm *ts; in ASN1_GENERALIZEDTIME_adj()
67 struct tm data; in ASN1_GENERALIZEDTIME_adj()
81 int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm) in ASN1_GENERALIZEDTIME_print() argument
83 if (tm->type != V_ASN1_GENERALIZEDTIME) in ASN1_GENERALIZEDTIME_print()
85 return ASN1_TIME_print(bp, tm); in ASN1_GENERALIZEDTIME_print()
H A Dasn1_local.h17 int ossl_asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d);
18 int ossl_asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d);
93 ASN1_TIME *ossl_asn1_time_from_tm(ASN1_TIME *s, struct tm *ts, int type);
/openssl/doc/man3/
H A DOPENSSL_gmtime.pod13 struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result);
14 int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec);
16 const struct tm *from, const struct tm *to);
23 OPENSSL_gmtime_adj() adds the offsets in I<offset_day> and I<offset_sec> to I<tm>.
33 OPENSSL_gmtime_adj() converts I<tm> into a days and seconds value, adds the
34 offsets, then converts back into a I<struct tm> specified by I<tm>. Leap seconds
37 OPENSSL_gmtime_diff() calculates the difference between the two I<struct tm>
H A DX509_get0_notBefore.pod22 int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm);
23 int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm);
28 int X509_ACERT_set1_notBefore(X509_ACERT *x, const ASN1_GENERALIZEDTIME *tm);
29 int X509_ACERT_set1_notAfter(X509_ACERT *x, const ASN1_GENERALIZEDTIME *tm);
34 int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
35 int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
50 and B<notAfter> fields of I<x> to I<tm>. Ownership of the passed
51 parameter I<tm> is not transferred by these functions so it must
60 and B<notAfter> fields of B<x> to B<tm>. Ownership of the passed
61 parameter B<tm> is not transferred by these functions so it must
[all …]
H A DSSL_SESSION_get_time.pod15 long SSL_SESSION_set_timeout(SSL_SESSION *s, long tm);
18 long SSL_set_timeout(SSL_SESSION *s, long tm);
21 time_t SSL_SESSION_set_time_ex(SSL_SESSION *s, time_t tm);
28 long SSL_SESSION_set_time(SSL_SESSION *s, long tm);
30 long SSL_set_time(SSL_SESSION *s, long tm);
39 the chosen value B<tm>.
45 to B<tm>.
H A DSSL_CTX_flush_sessions.pod11 void SSL_CTX_flush_sessions_ex(SSL_CTX *ctx, time_t tm);
17 void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
22 B<ctx> to remove sessions expired at time B<tm>.
37 The parameter B<tm> specifies the time which should be used for the
H A DASN1_TIME_set.pod47 int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
51 int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm);
114 ASN1_TIME_to_tm() converts the time I<s> to the standard I<tm> structure.
117 I<tm_mon> and I<tm_year> fields of I<tm> structure are set to proper values,
118 whereas all other fields are set to 0. If I<tm> is NULL this function performs
121 converting I<s> to I<tm> structure.
240 ASN1_TIME *tm;
245 tm = ASN1_TIME_adj(NULL, t, 0, 60 * 60);
247 ASN1_TIME_print(b, tm);
248 ASN1_STRING_free(tm);
H A DX509_CRL_get0_by_serial.pod25 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
55 I<tm>. The supplied I<tm> pointer is not used internally so it should be
/openssl/crypto/x509/
H A Dx509cset.c43 int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm) in X509_CRL_set1_lastUpdate() argument
45 if (x == NULL || tm == NULL) in X509_CRL_set1_lastUpdate()
47 return ossl_x509_set1_time(&x->crl.enc.modified, &x->crl.lastUpdate, tm); in X509_CRL_set1_lastUpdate()
50 int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm) in X509_CRL_set1_nextUpdate() argument
54 return ossl_x509_set1_time(&x->crl.enc.modified, &x->crl.nextUpdate, tm); in X509_CRL_set1_nextUpdate()
147 int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) in X509_REVOKED_set_revocationDate() argument
149 if (x == NULL || tm == NULL) in X509_REVOKED_set_revocationDate()
151 return ossl_x509_set1_time(NULL, &x->revocationDate, tm); in X509_REVOKED_set_revocationDate()
H A Dx509_set.c73 int ossl_x509_set1_time(int *modified, ASN1_TIME **ptm, const ASN1_TIME *tm) in ossl_x509_set1_time() argument
77 if (*ptm == tm) in ossl_x509_set1_time()
79 new = ASN1_STRING_dup(tm); in ossl_x509_set1_time()
80 if (tm != NULL && new == NULL) in ossl_x509_set1_time()
89 int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm) in X509_set1_notBefore() argument
91 if (x == NULL || tm == NULL) in X509_set1_notBefore()
94 &x->cert_info.validity.notBefore, tm); in X509_set1_notBefore()
97 int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm) in X509_set1_notAfter() argument
99 if (x == NULL || tm == NULL) in X509_set1_notAfter()
102 &x->cert_info.validity.notAfter, tm); in X509_set1_notAfter()
/openssl/ssl/
H A Dbio_ssl.c122 unsigned long tm; in ssl_read() local
124 tm = (unsigned long)time(NULL); in ssl_read()
125 if (tm > sb->last_time + sb->renegotiate_timeout) { in ssl_read()
126 sb->last_time = tm; in ssl_read()
191 unsigned long tm; in ssl_write() local
193 tm = (unsigned long)time(NULL); in ssl_write()
194 if (tm > bs->last_time + bs->renegotiate_timeout) { in ssl_write()
195 bs->last_time = tm; in ssl_write()
H A Dt1_trce.c704 unsigned int tm; in ssl_print_random() local
709 tm = ((unsigned int)p[0] << 24) in ssl_print_random()
717 BIO_printf(bio, "gmt_unix_time=0x%08X\n", tm); in ssl_print_random()
/openssl/crypto/ts/
H A Dts_rsp_sign.c820 struct tm *tm = NULL, tm_result; in TS_RESP_set_genTime_with_precision() local
828 if ((tm = OPENSSL_gmtime(&time_sec, &tm_result)) == NULL) in TS_RESP_set_genTime_with_precision()
840 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, in TS_RESP_set_genTime_with_precision()
841 tm->tm_hour, tm->tm_min, tm->tm_sec); in TS_RESP_set_genTime_with_precision()
/openssl/crypto/cms/
H A Dcms_kari.c115 ASN1_GENERALIZEDTIME **tm, in CMS_RecipientEncryptedKey_get0_id() argument
128 if (tm) in CMS_RecipientEncryptedKey_get0_id()
129 *tm = NULL; in CMS_RecipientEncryptedKey_get0_id()
135 if (tm) in CMS_RecipientEncryptedKey_get0_id()
136 *tm = rid->d.rKeyId->date; in CMS_RecipientEncryptedKey_get0_id()
/openssl/test/testutil/
H A Dhelper.c29 struct tm *timestamp_tm = NULL; in test_asn1_string_to_time_t()
/openssl/test/
H A Dgmdifftest.c24 struct tm tm1, tm2, o1; in check_time()
H A Dx509_time_test.c462 struct tm t; in test_days()
/openssl/include/openssl/
H A Dcrypto.h.in425 struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result);
426 int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec);
428 const struct tm *from, const struct tm *to);
/openssl/apps/
H A Dca.c1460 const ASN1_TIME *tm; in do_body() local
1907 tm = X509_get0_notAfter(ret); in do_body()
1908 row[DB_exp_date] = app_malloc(tm->length + 1, "row expdate"); in do_body()
1909 memcpy(row[DB_exp_date], tm->data, tm->length); in do_body()
1910 row[DB_exp_date][tm->length] = '\0'; in do_body()
2098 const ASN1_TIME *tm = NULL; in do_revoke() local
2136 tm = X509_get0_notAfter(x509); in do_revoke()
2137 row[DB_exp_date] = app_malloc(tm->length + 1, "row exp_data"); in do_revoke()
2138 memcpy(row[DB_exp_date], tm->data, tm->length); in do_revoke()
2139 row[DB_exp_date][tm->length] = '\0'; in do_revoke()
/openssl/apps/lib/
H A Dapps.c3349 ASN1_TIME *tm = ASN1_TIME_new(); in set_crl_lastupdate() local
3351 if (tm == NULL) in set_crl_lastupdate()
3355 if (X509_gmtime_adj(tm, 0) == NULL) in set_crl_lastupdate()
3358 if (!ASN1_TIME_set_string_X509(tm, lastupdate)) in set_crl_lastupdate()
3362 if (!X509_CRL_set1_lastUpdate(crl, tm)) in set_crl_lastupdate()
3367 ASN1_TIME_free(tm); in set_crl_lastupdate()
3375 ASN1_TIME *tm = ASN1_TIME_new(); in set_crl_nextupdate() local
3377 if (tm == NULL) in set_crl_nextupdate()
3384 if (!ASN1_TIME_set_string_X509(tm, nextupdate)) in set_crl_nextupdate()
3388 if (!X509_CRL_set1_nextUpdate(crl, tm)) in set_crl_nextupdate()
[all …]
/openssl/include/crypto/
H A Dasn1.h143 int ossl_asn1_time_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
H A Dx509.h312 int ossl_x509_set1_time(int *modified, ASN1_TIME **ptm, const ASN1_TIME *tm);

Completed in 46 milliseconds

12