More Doxygen-compatible documentation (SSL API).

This commit is contained in:
Thomas Pornin 2016-11-23 16:59:44 +01:00
parent 2e2b17186b
commit 298ce6530e
4 changed files with 1593 additions and 521 deletions

View file

@ -771,7 +771,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = inc/bearssl.h inc/bearssl_block.h inc/bearssl_ec.h inc/bearssl_hash.h inc/bearssl_hmac.h inc/bearssl_pem.h inc/bearssl_prf.h inc/bearssl_rand.h inc/bearssl_rsa.h inc/bearssl_x509.h
INPUT = inc/bearssl.h inc/bearssl_block.h inc/bearssl_ec.h inc/bearssl_hash.h inc/bearssl_hmac.h inc/bearssl_pem.h inc/bearssl_prf.h inc/bearssl_rand.h inc/bearssl_rsa.h inc/bearssl_ssl.h inc/bearssl_x509.h
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

File diff suppressed because it is too large Load diff

View file

@ -149,6 +149,9 @@ br_sslio_read(br_sslio_context *ctx, void *dst, size_t len)
unsigned char *buf;
size_t alen;
if (len == 0) {
return 0;
}
if (run_until(ctx, BR_SSL_RECVAPP) < 0) {
return -1;
}
@ -188,6 +191,9 @@ br_sslio_write(br_sslio_context *ctx, const void *src, size_t len)
unsigned char *buf;
size_t alen;
if (len == 0) {
return 0;
}
if (run_until(ctx, BR_SSL_SENDAPP) < 0) {
return -1;
}

View file

@ -334,7 +334,9 @@ sp_choose(const br_ssl_server_policy_class **pctx,
case BR_SSLKEYX_ECDHE_RSA:
if (pc->sk->key_type == BR_KEYTYPE_RSA) {
choices->cipher_suite = st[u][0];
if (cc->eng.session.version < BR_TLS12) {
if (br_ssl_engine_get_version(&cc->eng)
< BR_TLS12)
{
hash_id = 0;
}
choices->hash_id = hash_id;
@ -344,7 +346,9 @@ sp_choose(const br_ssl_server_policy_class **pctx,
case BR_SSLKEYX_ECDHE_ECDSA:
if (pc->sk->key_type == BR_KEYTYPE_EC) {
choices->cipher_suite = st[u][0];
if (cc->eng.session.version < BR_TLS12) {
if (br_ssl_engine_get_version(&cc->eng)
< BR_TLS12)
{
hash_id = br_sha1_ID;
}
choices->hash_id = hash_id;
@ -507,7 +511,7 @@ sp_do_sign(const br_ssl_server_policy_class **pctx,
hc = get_hash_impl(hash_id);
if (hc == NULL) {
if (pc->verbose) {
fprintf(stderr, "ERROR: cannot RSA-sign with"
fprintf(stderr, "ERROR: cannot ECDSA-sign with"
" unknown hash function: %d\n",
hash_id);
}