Exemplo n.º 1
0
int
tls_keypair_set_key_mem(struct tls_keypair *keypair, struct tls_error *error,
    const uint8_t *key, size_t len)
{
	tls_keypair_clear_key(keypair);
	return tls_set_mem(&keypair->key_mem, &keypair->key_len, key, len);
}
Exemplo n.º 2
0
int
tls_keypair_set_ocsp_staple_mem(struct tls_keypair *keypair,
    struct tls_error *error, const uint8_t *staple, size_t len)
{
	return tls_set_mem(&keypair->ocsp_staple, &keypair->ocsp_staple_len,
	    staple, len);
}
Exemplo n.º 3
0
int
tls_keypair_set_cert_mem(struct tls_keypair *keypair, struct tls_error *error,
    const uint8_t *cert, size_t len)
{
	if (tls_set_mem(&keypair->cert_mem, &keypair->cert_len, cert, len) == -1)
		return -1;
	return tls_keypair_pubkey_hash(keypair, error);
}
Exemplo n.º 4
0
int
tls_config_set_crl_mem(struct tls_config *config, const uint8_t *crl,
    size_t len)
{
	return tls_set_mem(&config->crl_mem, &config->crl_len, crl, len);
}
Exemplo n.º 5
0
int
tls_config_set_ca_mem(struct tls_config *config, const uint8_t *ca, size_t len)
{
	return tls_set_mem(&config->ca_mem, &config->ca_len, ca, len);
}