#include "ext_headers.h"
#include "lc_asn1.h"
#include "lc_hash.h"
Go to the source code of this file.
|
| int | lc_x509_sig_type_to_name (enum lc_sig_types pkey_algo, const char **alg) |
| | Convert a leancrypto public key algorithm reference into human readable form.
|
| int | lc_x509_sig_type_to_hash (enum lc_sig_types pkey_algo, const struct lc_hash **hash_algo) |
| | Obtain the hash type to be used with a given public key algorithm.
|
| int | lc_gmtime (time64_t timeval, struct lc_tm *tm) |
◆ lc_tm
Definition at line 373 of file lc_x509_common.h.
| Data Fields |
|
unsigned char |
day |
|
|
unsigned char |
hour |
|
|
unsigned char |
min |
|
|
unsigned char |
month |
|
|
unsigned char |
sec |
|
|
unsigned short |
year |
|
◆ lc_gmtime()
| int lc_gmtime |
( |
time64_t | timeval, |
|
|
struct lc_tm * | tm ) |
Trivial conversion of time to human-readable time value
It only shows UTC considering that Epoch is UTC (i.e. it does not apply any time-zone conversions).
Furthermore, it does not apply leap seconds.
- Parameters
-
| [in] | timeval | Time in seconds since Epoch |
| [out] | tm | Decoded time |
- Returns
- 0 on success; < 0 on error
◆ lc_x509_sig_type_to_hash()
| int lc_x509_sig_type_to_hash |
( |
enum lc_sig_types | pkey_algo, |
|
|
const struct lc_hash ** | hash_algo ) |
Obtain the hash type to be used with a given public key algorithm.
- Parameters
-
| [in] | pkey_algo | public key algorithm type |
| [out] | hash_algo | Hash reference (or NULL if none is to be used) |
- Returns
- 0 on success, < 0 on error
◆ lc_x509_sig_type_to_name()
| int lc_x509_sig_type_to_name |
( |
enum lc_sig_types | pkey_algo, |
|
|
const char ** | alg ) |
Convert a leancrypto public key algorithm reference into human readable form.
- Parameters
-
| [in] | pkey_algo | public key algorithm type |
| [out] | alg | Algorithm string |
- Returns
- 0 on success, < 0 on error