CFLAGS_PRX=-Wall -g -I${top_srcdir}/src -I.
LFLAGS_PRX=-L. -lcanl_c
-HEAD_CANL=canl.h canl_locl.h canl_err.h canl_cred.h canl_ssl.h
+HEAD_CANL=canl.h canl_locl.h canl_err.h canl_cred.h canl_ssl.h canl_mech_ssl.h
SRC_CLI=canl_sample_client.c
HEAD_CLI=canl.h
#include <ares.h>
#include <ares_version.h>
#include <netdb.h>
-#include <openssl/ssl.h>
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
-#include <openssl/evp.h>
-#include <openssl/err.h>
-#include <openssl/safestack.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
} canl_mech;
-/* Openssl specific**************************/
-typedef struct _cert_key_store {
- X509 *cert;
- EVP_PKEY *key;
- STACK_OF(X509) *chain;
-} cert_key_store;
-
-typedef struct _mech_glb_ctx
-{
- void *mech_ctx; //like SSL_CTX *
- unsigned int flags;
- char *ca_dir;
- char *crl_dir;
- cert_key_store *cert_key;
-} mech_glb_ctx;
-
-int do_set_ctx_own_cert_file(glb_ctx *cc, mech_glb_ctx *m_ctx,
- char *cert, char *key);
-int set_key_file(glb_ctx *cc, EVP_PKEY **to, const char *key);
-int set_cert_file(glb_ctx *cc, X509 **to, const char *cert);
-int set_cert_chain_file(glb_ctx *cc, STACK_OF(X509) **to, const char *cert);
+/* Mechanism specific */
extern canl_mech canl_mech_ssl;
-/* *****************************************/
struct canl_mech *
find_mech(gss_OID oid);
#ifndef _CANL_MECH_SSL_H
#define _CANL_MECH_SSL_H
+#include <openssl/ssl.h>
#include <openssl/x509.h>
+#include <openssl/x509v3.h>
#include <openssl/evp.h>
+#include <openssl/err.h>
+#include <openssl/safestack.h>
typedef struct _cert_key_store {
X509 *cert;