summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-01-12 16:18:38 +0100
committerStefan Metzmacher <metze@samba.org>2012-01-13 04:58:40 +0100
commitedaa933b17b98223f0a951777ff507d96692229a (patch)
treee453407888642b05bef9f441ec1073f3467dc2b9
parentbb6e64802ee16bf694639546e131817459b26fca (diff)
downloadsamba-edaa933b17b98223f0a951777ff507d96692229a.tar.gz
samba-edaa933b17b98223f0a951777ff507d96692229a.tar.bz2
samba-edaa933b17b98223f0a951777ff507d96692229a.zip
auth/gensec: add some more functions from gensec_start.c to gensec.h
metze
-rw-r--r--auth/gensec/gensec.h17
-rw-r--r--auth/gensec/gensec_start.c36
2 files changed, 37 insertions, 16 deletions
diff --git a/auth/gensec/gensec.h b/auth/gensec/gensec.h
index ab6b8ebbf2..b03bcd82b1 100644
--- a/auth/gensec/gensec.h
+++ b/auth/gensec/gensec.h
@@ -252,6 +252,23 @@ NTSTATUS gensec_start_mech_by_oid(struct gensec_security *gensec_security,
const char *gensec_get_name_by_oid(struct gensec_security *gensec_security, const char *oid_string);
struct cli_credentials *gensec_get_credentials(struct gensec_security *gensec_security);
NTSTATUS gensec_init(void);
+NTSTATUS gensec_register(const struct gensec_security_ops *ops);
+const struct gensec_security_ops *gensec_security_by_oid(struct gensec_security *gensec_security,
+ const char *oid_string);
+const struct gensec_security_ops *gensec_security_by_sasl_name(struct gensec_security *gensec_security,
+ const char *sasl_name);
+struct gensec_security_ops **gensec_security_mechs(struct gensec_security *gensec_security,
+ TALLOC_CTX *mem_ctx);
+const struct gensec_security_ops_wrapper *gensec_security_by_oid_list(
+ struct gensec_security *gensec_security,
+ TALLOC_CTX *mem_ctx,
+ const char **oid_strings,
+ const char *skip);
+const char **gensec_security_oids(struct gensec_security *gensec_security,
+ TALLOC_CTX *mem_ctx,
+ const char *skip);
+const char **gensec_security_oids_from_ops_wrapped(TALLOC_CTX *mem_ctx,
+ const struct gensec_security_ops_wrapper *wops);
size_t gensec_max_input_size(struct gensec_security *gensec_security);
size_t gensec_max_wrapped_size(struct gensec_security *gensec_security);
NTSTATUS gensec_unseal_packet(struct gensec_security *gensec_security,
diff --git a/auth/gensec/gensec_start.c b/auth/gensec/gensec_start.c
index 016967a303..08b2fb68cb 100644
--- a/auth/gensec/gensec_start.c
+++ b/auth/gensec/gensec_start.c
@@ -114,8 +114,9 @@ _PUBLIC_ struct gensec_security_ops **gensec_use_kerberos_mechs(TALLOC_CTX *mem_
return new_gensec_list;
}
-struct gensec_security_ops **gensec_security_mechs(struct gensec_security *gensec_security,
- TALLOC_CTX *mem_ctx)
+_PUBLIC_ struct gensec_security_ops **gensec_security_mechs(
+ struct gensec_security *gensec_security,
+ TALLOC_CTX *mem_ctx)
{
struct gensec_security_ops **backends;
if (!gensec_security) {
@@ -166,8 +167,9 @@ static const struct gensec_security_ops *gensec_security_by_authtype(struct gens
return NULL;
}
-const struct gensec_security_ops *gensec_security_by_oid(struct gensec_security *gensec_security,
- const char *oid_string)
+_PUBLIC_ const struct gensec_security_ops *gensec_security_by_oid(
+ struct gensec_security *gensec_security,
+ const char *oid_string)
{
int i, j;
struct gensec_security_ops **backends;
@@ -198,8 +200,9 @@ const struct gensec_security_ops *gensec_security_by_oid(struct gensec_security
return NULL;
}
-const struct gensec_security_ops *gensec_security_by_sasl_name(struct gensec_security *gensec_security,
- const char *sasl_name)
+_PUBLIC_ const struct gensec_security_ops *gensec_security_by_sasl_name(
+ struct gensec_security *gensec_security,
+ const char *sasl_name)
{
int i;
struct gensec_security_ops **backends;
@@ -327,10 +330,11 @@ const struct gensec_security_ops **gensec_security_by_sasl_list(struct gensec_se
* attached to the gensec_security, and return in our preferred order.
*/
-const struct gensec_security_ops_wrapper *gensec_security_by_oid_list(struct gensec_security *gensec_security,
- TALLOC_CTX *mem_ctx,
- const char **oid_strings,
- const char *skip)
+_PUBLIC_ const struct gensec_security_ops_wrapper *gensec_security_by_oid_list(
+ struct gensec_security *gensec_security,
+ TALLOC_CTX *mem_ctx,
+ const char **oid_strings,
+ const char *skip)
{
struct gensec_security_ops_wrapper *backends_out;
struct gensec_security_ops **backends;
@@ -451,8 +455,8 @@ const char **gensec_security_oids_from_ops(struct gensec_security *gensec_securi
* Return OIDS from the security subsystems listed
*/
-const char **gensec_security_oids_from_ops_wrapped(TALLOC_CTX *mem_ctx,
- const struct gensec_security_ops_wrapper *wops)
+_PUBLIC_ const char **gensec_security_oids_from_ops_wrapped(TALLOC_CTX *mem_ctx,
+ const struct gensec_security_ops_wrapper *wops)
{
int i;
int j = 0;
@@ -493,9 +497,9 @@ const char **gensec_security_oids_from_ops_wrapped(TALLOC_CTX *mem_ctx,
*
*/
-const char **gensec_security_oids(struct gensec_security *gensec_security,
- TALLOC_CTX *mem_ctx,
- const char *skip)
+_PUBLIC_ const char **gensec_security_oids(struct gensec_security *gensec_security,
+ TALLOC_CTX *mem_ctx,
+ const char *skip)
{
struct gensec_security_ops **ops
= gensec_security_mechs(gensec_security, mem_ctx);
@@ -820,7 +824,7 @@ _PUBLIC_ NTSTATUS gensec_set_credentials(struct gensec_security *gensec_security
The 'name' can be later used by other backends to find the operations
structure for this backend.
*/
-NTSTATUS gensec_register(const struct gensec_security_ops *ops)
+_PUBLIC_ NTSTATUS gensec_register(const struct gensec_security_ops *ops)
{
if (gensec_security_by_name(NULL, ops->name) != NULL) {
/* its already registered! */