#include "lib/param/param.h"
#include "lib/util/tsort.h"
#include "lib/util/samba_modules.h"
+#include "lib/util/base64.h"
/* the list of currently registered GENSEC backends */
static const struct gensec_security_ops **generic_security_ops;
#include "auth/gensec/gensec_internal.h"
#include "param/param.h"
#include "lib/util/asn1.h"
+#include "lib/util/base64.h"
#undef strcasecmp
*/
#include "includes.h"
+#include "lib/util/base64.h"
static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
--- /dev/null
+/*
+ * Unix SMB/CIFS implementation.
+ * Samba utility functions
+ *
+ * Copyright (C) Andrew Tridgell 1992-2001
+ * Copyright (C) Simo Sorce 2001-2002
+ * Copyright (C) Martin Pool 2003
+ * Copyright (C) James Peach 2006
+ * Copyright (C) Jeremy Allison 1992-2007
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __LIB_UTIL_BASE64_H__
+#define __LIB_UTIL_BASE64_H__
+
+#include "replace.h"
+#include "lib/util/data_blob.h"
+
+/**
+ Base64 decode a string, place into a data blob. Caller to
+ data_blob_free() the result.
+**/
+DATA_BLOB base64_decode_data_blob_talloc(TALLOC_CTX *mem_ctx, const char *s);
+
+/**
+ Base64 decode a string, place into a data blob on NULL context.
+ Caller to data_blob_free() the result.
+**/
+DATA_BLOB base64_decode_data_blob(const char *s);
+
+/**
+ Base64 decode a string, inplace
+**/
+void base64_decode_inplace(char *s);
+/**
+ Base64 encode a binary data blob into a string
+**/
+char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data);
+
+#endif
#include "torture/torture.h"
#include "lib/util/charset/charset.h"
#include "param/param.h"
+#include "lib/util/base64.h"
struct torture_suite *torture_local_convert_string_handle(TALLOC_CTX *mem_ctx);
struct torture_suite *torture_local_string_case_handle(TALLOC_CTX *mem_ctx);
**/
_PUBLIC_ void string_replace(char *s, char oldc, char newc);
-/**
- Base64 decode a string, place into a data blob. Caller to data_blob_free() the result.
-**/
-_PUBLIC_ DATA_BLOB base64_decode_data_blob_talloc(TALLOC_CTX *mem_ctx, const char *s);
-
-/**
- Base64 decode a string, place into a data blob on NULL context.
- Caller to data_blob_free() the result.
-**/
-_PUBLIC_ DATA_BLOB base64_decode_data_blob(const char *s);
-
-
-/**
- Base64 decode a string, inplace
-**/
-_PUBLIC_ void base64_decode_inplace(char *s);
-/**
- Base64 encode a binary data blob into a string
-**/
-_PUBLIC_ char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data);
-
/**
* Compare 2 strings.
*
#include "../libcli/security/security.h"
#include "../lib/util/asn1.h"
#include "../librpc/ndr/libndr.h"
+#include "lib/util/base64.h"
bool tldap_entry_values(struct tldap_message *msg, const char *attribute,
DATA_BLOB **values, int *num_values)
#include "dbwrap/dbwrap_rbt.h"
#include "../libds/common/flag_mapping.h"
#include "passdb.h"
+#include "lib/util/base64.h"
/****************************************************************
****************************************************************/
#include "transfer_file.h"
#include "passdb.h"
#include "passdb/pdb_ldap_schema.h"
+#include "lib/util/base64.h"
#ifdef HAVE_LDAP
#include "libnet/libnet_samsync.h"
#include "../libcli/security/security.h"
#include "passdb.h"
+#include "lib/util/base64.h"
/* Convert a struct samu_DELTA to a struct samu. */
#define STRING_CHANGED (old_string && !new_string) ||\
#include "passdb/pdb_ldap.h"
#include "passdb/pdb_ipa.h"
#include "passdb/pdb_ldap_schema.h"
+#include "lib/util/base64.h"
#define IPA_KEYTAB_SET_OID "2.16.840.1.113730.3.8.3.1"
#define IPA_MAGIC_ID_STR "999"
#include "source3/include/secrets.h"
#include "source4/auth/auth_sam.h"
#include "auth/credentials/credentials.h"
+#include "lib/util/base64.h"
struct pdb_samba_dsdb_state {
struct tevent_context *ev;
#include "auth.h"
#include "rpc_server/srv_access_check.h"
#include "../lib/tsocket/tsocket.h"
+#include "lib/util/base64.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
#include "../librpc/gen_ndr/samr.h"
#include "rpc_server/samr/srv_samr_util.h"
#include "passdb.h"
+#include "lib/util/base64.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
#include "../libcli/smb/read_smb.h"
#include "../libcli/smb/smbXcli_base.h"
#include "lib/util/sys_rw_data.h"
+#include "lib/util/base64.h"
extern char *optarg;
extern int optind;
#include "source3/auth/proto.h"
#include "nsswitch/libwbclient/wbclient.h"
#include "lib/param/loadparm.h"
+#include "lib/util/base64.h"
#if HAVE_KRB5
#include "auth/kerberos/pac_utils.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_internal.h"
#include "auth/credentials/credentials.h"
+#include "lib/util/base64.h"
_PUBLIC_ NTSTATUS gensec_http_basic_init(void);
#include "auth/auth.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_internal.h"
+#include "lib/util/base64.h"
_PUBLIC_ NTSTATUS gensec_http_ntlm_init(void);
#include "includes.h"
#include "librpc/ndr/libndr.h"
#include "system/filesys.h"
+#include "lib/util/base64.h"
void initxattr_native(void);
#include "torture/ndr/ndr.h"
#include "librpc/gen_ndr/ndr_drsblobs.h"
#include "torture/ndr/proto.h"
+#include "lib/util/base64.h"
static const uint8_t forest_trust_info_data_out[] = {
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
#include "lib/messaging/irpc.h"
#include "auth/ntlmssp/ntlmssp.h"
#include "param/param.h"
+#include "lib/util/base64.h"
#define INITIAL_BUFFER_SIZE 300
#define MAX_BUFFER_SIZE 63000