summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorBryan Ischo <bryan@ischo.com>2008-08-13 13:27:47 +0000
committerBryan Ischo <bryan@ischo.com>2008-08-13 13:27:47 +0000
commit7fd73adff17c0511cf2c09da16d46d1a8e608866 (patch)
treefe09fe3dcdc6c68d9a17d80e64424c0e241c5247 /inc
parent06fcf9839f35d1bbac18819886375b8232d73f35 (diff)
downloadceph-libs3-7fd73adff17c0511cf2c09da16d46d1a8e608866.tar.gz
* Replaced openssl library with GnuTLS, libgcrypt, and hand-written base 64
encoding routine
Diffstat (limited to 'inc')
-rw-r--r--inc/libs3.h14
-rw-r--r--inc/util.h20
2 files changed, 17 insertions, 17 deletions
diff --git a/inc/libs3.h b/inc/libs3.h
index 5d2054b..8c222c6 100644
--- a/inc/libs3.h
+++ b/inc/libs3.h
@@ -189,11 +189,21 @@
**/
#define S3_INIT_WINSOCK 1
+
+/**
+ * This constant is used by the S3_initialize() function, to specify that
+ * the gcrypt library should be initialized by libs3; should always be
+ * specified by the caller unless the caller specifically initializes the
+ * gcrypt library elsewhere.
+ **/
+#define S3_INIT_GCRYPT 2
+
+
/**
* This convenience constant is used by the S3_initialize() function to
- * indicate that alllibraries required by libs3 should be initialized.
+ * indicate that all libraries required by libs3 should be initialized.
**/
-#define S3_INIT_ALL (S3_INIT_WINSOCK)
+#define S3_INIT_ALL (S3_INIT_WINSOCK | S3_INIT_GCRYPT)
/** **************************************************************************
diff --git a/inc/util.h b/inc/util.h
index 6d24dcd..f400d4b 100644
--- a/inc/util.h
+++ b/inc/util.h
@@ -56,21 +56,6 @@
(1 + 255 + 1 + MAX_URLENCODED_KEY_SIZE + (sizeof("?torrent") - 1) + 1)
-// Mutex functions -----------------------------------------------------------
-
-// Create a mutex. Returns 0 if none could be created.
-struct S3Mutex *mutex_create();
-
-// Lock a mutex
-void mutex_lock(struct S3Mutex *mutex);
-
-// Unlock a mutex
-void mutex_unlock(struct S3Mutex *mutex);
-
-// Destroy a mutex
-void mutex_destroy(struct S3Mutex *mutex);
-
-
// Utilities -----------------------------------------------------------------
// URL-encodes a string from [src] into [dest]. [dest] must have at least
@@ -84,5 +69,10 @@ time_t parseIso8601Time(const char *str);
uint64_t parseUnsignedInt(const char *str);
+// base64 encode bytes. The output buffer must have at least
+// ((4 * (inLen + 1)) / 3) bytes in it. Returns the number of bytes written
+// to [out].
+int base64Encode(const unsigned char *in, int inLen, unsigned char *out);
+
#endif /* UTIL_H */