From e22c4c5632e4172c2056cec07c842a69f24e068a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 29 Sep 2009 09:00:57 +0200 Subject: libcli/auth: add netsec_outgoing_sig_size() The size of the signature blob depends on the used algorithm. metze --- libcli/auth/schannel_proto.h | 1 + libcli/auth/schannel_sign.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) 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, -- cgit