/* On success, the client takes ownership of the credentials block and caller must not free it. On failure, caller is responsible for freeing the credential block.  */
int tlsv1_client_set_cred(struct tlsv1_client *conn, struct tlsv1_credentials *cred)
/* On success, the client takes ownership of the credentials block and caller must not free it. On failure, caller is responsible for freeing the credential block.  */
int tlsv1_client_set_cred(struct tlsv1_client *conn, struct tlsv1_credentials *cred)
{
	tlsv1_cred_free(conn->cred);
	conn->cred = cred;
	return 0;
}