More Doxygen-compatible documentation (SSL API).
[BearSSL] / tools / server.c
index ea247ab..b81ce07 100644 (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];
                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;
                                        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];
                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;
                                        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) {
                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);
                        }
                                        " unknown hash function: %d\n",
                                        hash_id);
                        }