summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-09-29 09:00:57 +0200
committerStefan Metzmacher <metze@samba.org>2011-01-03 16:44:28 +0100
commite22c4c5632e4172c2056cec07c842a69f24e068a (patch)
treebd5a0a836199e93da253654b8b0335de635aad21
parent3f9157acaeb3d02632f4e51a33744f3eb7054bf5 (diff)
downloadsamba-e22c4c5632e4172c2056cec07c842a69f24e068a.tar.gz
samba-e22c4c5632e4172c2056cec07c842a69f24e068a.tar.bz2
samba-e22c4c5632e4172c2056cec07c842a69f24e068a.zip
libcli/auth: add netsec_outgoing_sig_size()
The size of the signature blob depends on the used algorithm. metze
-rw-r--r--libcli/auth/schannel_proto.h1
-rw-r--r--libcli/auth/schannel_sign.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/libcli/auth/schannel_proto.h b/libcli/auth/schannel_proto.h
index a85a6dbb72..e454c3da53 100644
--- a/libcli/auth/schannel_proto.h
+++ b/libcli/auth/schannel_proto.h
@@ -33,6 +33,7 @@ NTSTATUS netsec_incoming_packet(struct schannel_state *state,
bool do_unseal,
uint8_t *data, size_t length,
const DATA_BLOB *sig);
+uint32_t netsec_outgoing_sig_size(struct schannel_state *state);
NTSTATUS netsec_outgoing_packet(struct schannel_state *state,
TALLOC_CTX *mem_ctx,
bool do_seal,
diff --git a/libcli/auth/schannel_sign.c b/libcli/auth/schannel_sign.c
index 0672f67197..eb605f4b07 100644
--- a/libcli/auth/schannel_sign.c
+++ b/libcli/auth/schannel_sign.c
@@ -204,6 +204,20 @@ NTSTATUS netsec_incoming_packet(struct schannel_state *state,
return NT_STATUS_OK;
}
+uint32_t netsec_outgoing_sig_size(struct schannel_state *state)
+{
+ uint32_t sig_size = 0;
+
+ netsec_offset_and_sizes(state,
+ true,
+ NULL,
+ &sig_size,
+ NULL,
+ NULL);
+
+ return sig_size;
+}
+
NTSTATUS netsec_outgoing_packet(struct schannel_state *state,
TALLOC_CTX *mem_ctx,
bool do_seal,