More Doxygen-compatible documentation (SSL API).
This commit is contained in:
parent
2e2b17186b
commit
298ce6530e
4 changed files with 1593 additions and 521 deletions
2
Doxyfile
2
Doxyfile
|
|
@ -771,7 +771,7 @@ WARN_LOGFILE =
|
||||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||||
# Note: If this tag is empty the current directory is searched.
|
# 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
|
# 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
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||||
|
|
|
||||||
2094
inc/bearssl_ssl.h
2094
inc/bearssl_ssl.h
File diff suppressed because it is too large
Load diff
|
|
@ -149,6 +149,9 @@ br_sslio_read(br_sslio_context *ctx, void *dst, size_t len)
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
size_t alen;
|
size_t alen;
|
||||||
|
|
||||||
|
if (len == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (run_until(ctx, BR_SSL_RECVAPP) < 0) {
|
if (run_until(ctx, BR_SSL_RECVAPP) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -188,6 +191,9 @@ br_sslio_write(br_sslio_context *ctx, const void *src, size_t len)
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
size_t alen;
|
size_t alen;
|
||||||
|
|
||||||
|
if (len == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (run_until(ctx, BR_SSL_SENDAPP) < 0) {
|
if (run_until(ctx, BR_SSL_SENDAPP) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,9 @@ sp_choose(const br_ssl_server_policy_class **pctx,
|
||||||
case BR_SSLKEYX_ECDHE_RSA:
|
case BR_SSLKEYX_ECDHE_RSA:
|
||||||
if (pc->sk->key_type == BR_KEYTYPE_RSA) {
|
if (pc->sk->key_type == BR_KEYTYPE_RSA) {
|
||||||
choices->cipher_suite = st[u][0];
|
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;
|
hash_id = 0;
|
||||||
}
|
}
|
||||||
choices->hash_id = hash_id;
|
choices->hash_id = hash_id;
|
||||||
|
|
@ -344,7 +346,9 @@ sp_choose(const br_ssl_server_policy_class **pctx,
|
||||||
case BR_SSLKEYX_ECDHE_ECDSA:
|
case BR_SSLKEYX_ECDHE_ECDSA:
|
||||||
if (pc->sk->key_type == BR_KEYTYPE_EC) {
|
if (pc->sk->key_type == BR_KEYTYPE_EC) {
|
||||||
choices->cipher_suite = st[u][0];
|
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;
|
hash_id = br_sha1_ID;
|
||||||
}
|
}
|
||||||
choices->hash_id = hash_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);
|
hc = get_hash_impl(hash_id);
|
||||||
if (hc == NULL) {
|
if (hc == NULL) {
|
||||||
if (pc->verbose) {
|
if (pc->verbose) {
|
||||||
fprintf(stderr, "ERROR: cannot RSA-sign with"
|
fprintf(stderr, "ERROR: cannot ECDSA-sign with"
|
||||||
" unknown hash function: %d\n",
|
" unknown hash function: %d\n",
|
||||||
hash_id);
|
hash_id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue