aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/ext
diff options
context:
space:
mode:
authorGravatar Deepak Lukose <deepaklukose@google.com>2016-03-25 12:54:25 -0700
committerGravatar Deepak Lukose <deepaklukose@google.com>2016-04-19 15:02:06 -0700
commitdba4c5fd0144b68916b4dc2bbbd02d12c2e12041 (patch)
treef7284c54983f7bd9859453dc4e2111a80442441f /src/csharp/ext
parent17735908ed4eb1c54bd1b3652062b49f58a985e3 (diff)
Add various options to verify ssl/tls client cert including letting the
application handle the authentication.
Diffstat (limited to 'src/csharp/ext')
-rw-r--r--src/csharp/ext/grpc_csharp_ext.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c
index 8d769e5f6a..aeef8a79e9 100644
--- a/src/csharp/ext/grpc_csharp_ext.c
+++ b/src/csharp/ext/grpc_csharp_ext.c
@@ -911,9 +911,12 @@ grpcsharp_ssl_server_credentials_create(
key_cert_pairs[i].private_key = key_cert_pair_private_key_array[i];
}
}
- creds = grpc_ssl_server_credentials_create(pem_root_certs, key_cert_pairs,
- num_key_cert_pairs,
- force_client_auth, NULL);
+ creds = grpc_ssl_server_credentials_create_ex(
+ pem_root_certs, key_cert_pairs, num_key_cert_pairs,
+ force_client_auth
+ ? GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY
+ : GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE,
+ NULL);
gpr_free(key_cert_pairs);
return creds;
}