diff options
author | Martin Willi <martin@revosec.ch> | 2015-03-23 10:54:24 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2015-03-23 17:54:02 +0100 |
commit | bace1d647971e8300c5abdb1e950adf3756ec328 (patch) | |
tree | a0ccd1429564ad37130c64bb377c1f5de6bb92d0 /src/libstrongswan/crypto/diffie_hellman.h | |
parent | 4909612c3bcfb951a3f8ecccf433756b450f4e8e (diff) | |
download | strongswan-bace1d647971e8300c5abdb1e950adf3756ec328.tar.bz2 strongswan-bace1d647971e8300c5abdb1e950adf3756ec328.tar.xz |
diffie-hellman: Use bool instead of status_t as get_shared_secret() return value
While such a change is not unproblematic, keeping status_t makes the API
inconsistent once we introduce return values for the public value operations.
Diffstat (limited to 'src/libstrongswan/crypto/diffie_hellman.h')
-rw-r--r-- | src/libstrongswan/crypto/diffie_hellman.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstrongswan/crypto/diffie_hellman.h b/src/libstrongswan/crypto/diffie_hellman.h index d5161d077..79977d7da 100644 --- a/src/libstrongswan/crypto/diffie_hellman.h +++ b/src/libstrongswan/crypto/diffie_hellman.h @@ -89,9 +89,10 @@ struct diffie_hellman_t { * Space for returned secret is allocated and must be freed by the caller. * * @param secret shared secret will be written into this chunk - * @return SUCCESS, FAILED if not both DH values are set + * @return TRUE if shared secret computed successfully */ - status_t (*get_shared_secret) (diffie_hellman_t *this, chunk_t *secret); + bool (*get_shared_secret)(diffie_hellman_t *this, chunk_t *secret) + __attribute__((warn_unused_result)); /** * Sets the public value of partner. |