diffie-hellman: Add a bool return value to get_my_public_value()

This commit is contained in:
Martin Willi
2015-03-23 17:54:03 +01:00
parent 8a7dbf3c2a
commit 42431690e0
23 changed files with 87 additions and 39 deletions
@@ -61,13 +61,14 @@ struct private_openssl_diffie_hellman_t {
bool computed;
};
METHOD(diffie_hellman_t, get_my_public_value, void,
METHOD(diffie_hellman_t, get_my_public_value, bool,
private_openssl_diffie_hellman_t *this, chunk_t *value)
{
*value = chunk_alloc(DH_size(this->dh));
memset(value->ptr, 0, value->len);
BN_bn2bin(this->dh->pub_key,
value->ptr + value->len - BN_num_bytes(this->dh->pub_key));
return TRUE;
}
METHOD(diffie_hellman_t, get_shared_secret, bool,