fixes SRP documentation.

This commit is contained in:
Moisés Guimarães
2015-09-03 12:21:22 -03:00
parent 12bf9b4430
commit 316302cec3

View File

@ -184,7 +184,7 @@ WOLFSSL_API int wc_SrpSetParams(Srp* srp, const byte* N, word32 nSz,
WOLFSSL_API int wc_SrpSetPassword(Srp* srp, const byte* password, word32 size); WOLFSSL_API int wc_SrpSetPassword(Srp* srp, const byte* password, word32 size);
/** /**
* Sets the password. * Sets the verifier.
* *
* This function MUST be called after wc_SrpSetParams and is SERVER SIDE ONLY. * This function MUST be called after wc_SrpSetParams and is SERVER SIDE ONLY.
* *
@ -200,7 +200,7 @@ WOLFSSL_API int wc_SrpSetVerifier(Srp* srp, const byte* verifier, word32 size);
* Gets the verifier. * Gets the verifier.
* *
* The client calculates the verifier with v = g ^ x % N. * The client calculates the verifier with v = g ^ x % N.
* This function MAY be called after wc_SrpSetPassword and is SERVER SIDE ONLY. * This function MAY be called after wc_SrpSetPassword and is CLIENT SIDE ONLY.
* *
* @param[in,out] srp the Srp structure. * @param[in,out] srp the Srp structure.
* @param[out] verifier the buffer to write the verifier. * @param[out] verifier the buffer to write the verifier.
@ -250,14 +250,13 @@ WOLFSSL_API int wc_SrpGetPublic(Srp* srp, byte* pub, word32* size);
/** /**
* Computes the session key. * Computes the session key.
* *
* This function is handy for unit test cases or if the developer wants to use * The key can be accessed at srp->key after success.
* an external random source to set the ephemeral value.
* This function MUST be called after wc_SrpSetPassword or wc_SrpSetVerifier.
* *
* @param[in,out] srp the Srp structure. * @param[in,out] srp the Srp structure.
* @param[out] public the buffer to write the public ephemeral value. * @param[in] clientPubKey the client's public ephemeral value.
* @param[in,out] size the the buffer size in bytes. Will be updated with * @param[in] clientPubKeySz the client's public ephemeral value size.
the ephemeral value size. * @param[in] serverPubKey the server's public ephemeral value.
* @param[in] serverPubKeySz the server's public ephemeral value size.
* *
* @return 0 on success, {@literal <} 0 on error. @see error-crypt.h * @return 0 on success, {@literal <} 0 on error. @see error-crypt.h
*/ */