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 15:44:28 +0000 (16:44 +0100)
The size of the signature blob depends on the used
algorithm.

metze

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

index a85a6db..e454c3d 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 0672f67..eb605f4 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,