summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-08-06 13:21:50 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-08-06 13:21:50 +0000
commitb0a104f77f325659aa2a918dc9bdeaaf2071e6a6 (patch)
tree49eeba85deaf7672a2f4fbbe908de699959b14f1 /src
parenta312f0d008595c86b793f810e7d283f1108dcca8 (diff)
downloadgnutls-b0a104f77f325659aa2a918dc9bdeaaf2071e6a6.tar.gz
several additions for x509 client authentication
Diffstat (limited to 'src')
-rw-r--r--src/cli.c5
-rw-r--r--src/x509/Makefile.am3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/cli.c b/src/cli.c
index be62a3310f..c1e567d161 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -39,6 +39,8 @@
#define MAX(X,Y) (X >= Y ? X : Y);
#define CAFILE "x509/ca.pem"
#define CRLFILE NULL
+#define CLIKEYFILE "x509/clikey.pem"
+#define CLICERTFILE "x509/clicert.pem"
#define PRINTX(x,y) if (y[0]!=0) printf(" - %s %s\n", x, y)
#define PRINT_DN(X) PRINTX( "CN:", X->common_name); \
@@ -144,11 +146,12 @@ int main(int argc, char** argv)
/* X509 stuff */
- if (gnutls_allocate_x509_client_sc( &xcred, 0) < 0) { /* no priv key */
+ if (gnutls_allocate_x509_client_sc( &xcred, 1) < 0) {
fprintf(stderr, "memory error\n");
exit(1);
}
gnutls_set_x509_client_trust( xcred, CAFILE, CRLFILE);
+ gnutls_set_x509_client_key( xcred, CLICERTFILE, CLIKEYFILE);
/* SRP stuff */
if (gnutls_allocate_srp_client_sc( &cred)<0) {
diff --git a/src/x509/Makefile.am b/src/x509/Makefile.am
index 2dec0d7d63..f6168077cf 100644
--- a/src/x509/Makefile.am
+++ b/src/x509/Makefile.am
@@ -1 +1,2 @@
-EXTRA_DIST = ca.pem cert.pem key.pem
+EXTRA_DIST = ca.pem cert.pem key.pem clikey.pem clicert.pem
+