#include "encode_values.h"
#include "parse_values.h"
#include <openssl/posix_time.h>
BSSL_NAMESPACE_BEGIN
namespace der {
namespace {
bool WriteFourDigit(uint16_t value, uint8_t out[4]) { … }
bool WriteTwoDigit(uint8_t value, uint8_t out[2]) { … }
}
bool EncodePosixTimeAsGeneralizedTime(int64_t posix_time,
GeneralizedTime *generalized_time) { … }
bool GeneralizedTimeToPosixTime(const der::GeneralizedTime &generalized,
int64_t *result) { … }
bool EncodeGeneralizedTime(const GeneralizedTime &time,
uint8_t out[kGeneralizedTimeLength]) { … }
bool EncodeUTCTime(const GeneralizedTime &time, uint8_t out[kUTCTimeLength]) { … }
}
BSSL_NAMESPACE_END