libcli/auth: add netsec_outgoing_sig_size()
authorStefan Metzmacher <metze@samba.org>
Tue, 29 Sep 2009 07:00:57 +0000 (09:00 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 3 Jan 2011 16:35:44 +0000 (17:35 +0100)
The size of the signature blob depends on the used
algorithm.

metze
(cherry picked from commit e22c4c5632e4172c2056cec07c842a69f24e068a)

libcli/auth/schannel_proto.h
libcli/auth/schannel_sign.c

index a85a6dbb728715fd3aae55ced30560448eceb981..e454c3da530bdb5d5f4ca3f51ba0e9f62356a995 100644 (file)
@@ -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,
index 0672f671970588f5a176ff4735d1b340b726c364..eb605f4b07afaeee338aeeb4c445daaca7dd3e51 100644 (file)
@@ -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,