2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2017 Kern Sibbald
6 The original author of Bacula is Kern Sibbald, with contributions
7 from many others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 This notice must be preserved when any source code is
15 conveyed and/or propagated.
17 Bacula(R) is a registered trademark of Kern Sibbald.
26 * Define a backup context
29 /* Global variables */
31 FF_PKT *ff_pkt; /* find file packet */
39 /* Crypto variables */
41 DIGEST *signing_digest;
44 CIPHER_CONTEXT *cipher_ctx;
45 const uint8_t *cipher_input;
46 uint32_t cipher_input_len;
47 uint32_t cipher_block_size;
48 uint32_t encrypted_len;
50 /* Compression variables */
51 /* These are the same as used by libz, but I find it very
52 * uncomfortable to define variables like this rather than
53 * specifying a number of bits. Defining them here allows us
54 * to have code that compiles with and without libz and lzo.
56 * uLong == unsigned long int
57 * Bytef == unsigned char
59 unsigned long int max_compress_len;
60 unsigned long int compress_len;
65 comp_stream_header ch;
70 bool crypto_setup_digests(bctx_t &bctx);
71 bool crypto_terminate_digests(bctx_t &bctx);
72 bool crypto_session_start(JCR *jcr);
73 void crypto_session_end(JCR *jcr);
74 bool crypto_session_send(JCR *jcr, BSOCK *sd);
75 bool crypto_allocate_ctx(bctx_t &bctx);
76 void crypto_free(bctx_t &bctx);
78 bool encode_and_send_attributes(bctx_t &bctx);
80 bool process_and_send_data(bctx_t &bctx);
83 DWORD WINAPI read_efs_data_cb(PBYTE pbData, PVOID pvCallbackContext, ULONG ulLength);