../../lib/libgnutls.la \
../../libextra/libgnutls-extra.la
-if ENABLE_SRP
-SRP_PROGRAM_FILES = ex-client-srp ex-serv-srp
-endif
noinst_PROGRAMS = ex-cert-select ex-client1 ex-client2 \
ex-client-resume ex-client-tlsia ex-crq ex-serv1 ex-serv-anon \
- ex-serv-export ex-serv-pgp $(SRP_PROGRAM_FILES) \
- ex-client-authz ex-serv-authz
+ ex-serv-export ex-serv-pgp
+
+if ENABLE_SRP
+noinst_PROGRAMS += ex-client-srp ex-serv-srp
+endif
+
+if ENABLE_AUTHZ
+noinst_PROGRAMS += ex-serv-authz ex-client-authz
+endif
noinst_LTLIBRARIES = libexamples.la
gnutls_x509.c ext_cert_type.c gnutls_rsa_export.c \
auth_rsa_export.c ext_server_name.c auth_dh_common.c \
gnutls_helper.c ext_inner_application.c gnutls_extra_hooks.c \
- gnutls_supplemental.c ext_authz.c
+ gnutls_supplemental.c
+
+if ENABLE_AUTHZ
+COBJECTS += ext_authz.c
+endif
HFILES = debug.h gnutls_compress.h defines.h gnutls_cipher.h \
gnutls_buffers.h gnutls_errors.h gnutls_int.h \
static int mac_priority[PRI_MAX];
static int cert_type_priority[PRI_MAX];
+#ifdef ENABLE_AUTHZ
+
static int authz_client_formats[PRI_MAX];
static int authz_server_formats[PRI_MAX] = {
GNUTLS_AUTHZ_X509_ATTR_CERT,
0
};
+#endif
+
/* end of global stuff */
/* prototypes */
}
+#ifdef ENABLE_AUTHZ
int
authz_send_callback (gnutls_session_t session,
return 0;
}
+#endif
+
/* initializes a gnutls_session with some defaults.
*/
static gnutls_session
}
}
+#ifdef ENABLE_AUTHZ
gnutls_authz_enable (session, authz_client_formats, authz_server_formats,
authz_recv_callback, authz_send_callback);
+#endif
return session;
}
return 0;
}
+LIST_DECLARE_INIT (listener_list, listener_item, listener_free);
+
static int protocol_priority[PRI_MAX];
static int kx_priority[PRI_MAX];
static int cipher_priority[PRI_MAX];
static int mac_priority[PRI_MAX];
static int cert_type_priority[PRI_MAX];
+#ifdef ENABLE_AUTHZ
static int authz_server_formats[PRI_MAX] = {
0
};
0
};
-LIST_DECLARE_INIT (listener_list, listener_item, listener_free);
-
int
authz_send_callback (gnutls_session_t session,
const int *client_formats,
return 0;
}
+#endif
gnutls_session
initialize_session (void)
else
gnutls_certificate_server_set_request (session, GNUTLS_CERT_REQUEST);
+#ifdef ENABLE_AUTHZ
gnutls_authz_enable (session, authz_client_formats, authz_server_formats,
authz_recv_callback, authz_send_callback);
+#endif
return session;
}
parse_kx (info.kx, info.nkx, kx_priority);
parse_comp (info.comp, info.ncomp, comp_priority);
+#ifdef ENABLE_AUTHZ
{
size_t authz_idx = 0;
if (info.authz_x509_attr_cert)
if (info.authz_saml_assertion)
authz_server_formats[authz_idx++] = GNUTLS_AUTHZ_SAML_ASSERTION;
}
+#endif
}
void