aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/bad_ssl/servers
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-12-14 15:23:46 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-12-14 15:23:46 -0800
commit172895c2a9444ce356d408a2fc5091a965a921c2 (patch)
treed76826b146b8bc4ce7c622cc78d6052428d4ce43 /test/core/bad_ssl/servers
parent7d408487fa1127dd868bdedd0baebc671ebed1cc (diff)
Add documentation
Diffstat (limited to 'test/core/bad_ssl/servers')
-rw-r--r--test/core/bad_ssl/servers/alpn.c5
-rw-r--r--test/core/bad_ssl/servers/cert.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/test/core/bad_ssl/servers/alpn.c b/test/core/bad_ssl/servers/alpn.c
index a4e117db73..7d70690e52 100644
--- a/test/core/bad_ssl/servers/alpn.c
+++ b/test/core/bad_ssl/servers/alpn.c
@@ -38,9 +38,14 @@
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
+#include "src/core/transport/chttp2/alpn.h"
#include "test/core/bad_ssl/server.h"
#include "test/core/end2end/data/ssl_test_data.h"
+/* This test starts a server that is configured to advertise (via alpn and npn)
+ * a protocol that the connecting client does not support. It does this by
+ * overriding the functions declared in alpn.c from the core library. */
+
static const char *const fake_versions[] = {"not-h2"};
int grpc_chttp2_is_alpn_version_supported(const char *version, size_t size) {
diff --git a/test/core/bad_ssl/servers/cert.c b/test/core/bad_ssl/servers/cert.c
index 8a294c8fe3..d67a6ca1d4 100644
--- a/test/core/bad_ssl/servers/cert.c
+++ b/test/core/bad_ssl/servers/cert.c
@@ -43,6 +43,9 @@
#include "test/core/bad_ssl/server.h"
#include "test/core/end2end/data/ssl_test_data.h"
+/* This server will present an untrusted cert to the connecting client,
+ * causing the SSL handshake to fail */
+
int main(int argc, char **argv) {
const char *addr = bad_ssl_addr(argc, argv);
grpc_ssl_pem_key_cert_pair pem_key_cert_pair;