summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/k5-gmt_mktime.h51
-rw-r--r--src/include/k5-int.h11
-rw-r--r--src/include/k5-thread.h12
3 files changed, 66 insertions, 8 deletions
diff --git a/src/include/k5-gmt_mktime.h b/src/include/k5-gmt_mktime.h
new file mode 100644
index 000000000..d9d1d1e5a
--- /dev/null
+++ b/src/include/k5-gmt_mktime.h
@@ -0,0 +1,51 @@
+/*
+ * include/k5-gmt_mktime.h
+ *
+ * Copyright 2008 Massachusetts Institute of Technology.
+ * All Rights Reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ *
+ * GMT struct tm conversion
+ *
+ * Because of ordering of things in the UNIX build, we can't just keep
+ * the declaration in k5-int.h and include it in
+ * util/support/gmt_mktime.c, since k5-int.h includes krb5.h which
+ * hasn't been built when gmt_mktime.c gets compiled. Hence this
+ * silly little helper header.
+ */
+
+#ifndef K5_GMT_MKTIME_H
+#define K5_GMT_MKTIME_H
+
+#include "autoconf.h"
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#endif
+#else
+#include <time.h>
+#endif
+
+time_t krb5int_gmt_mktime (struct tm *);
+
+#endif /* K5_GMT_MKTIME_H */
diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 8f9791bb9..545bd983a 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -469,6 +469,8 @@ extern char *strdup (const char *);
#include <stdio.h>
+#include "k5-gmt_mktime.h"
+
struct addrlist;
struct sendto_callback_info;
@@ -733,8 +735,6 @@ krb5_error_code krb5_crypto_us_timeofday
(krb5_int32 *,
krb5_int32 *);
-time_t krb5int_gmt_mktime (struct tm *);
-
#endif /* KRB5_OLD_CRYPTO */
/* this helper fct is in libkrb5, but it makes sense declared here. */
@@ -2195,6 +2195,13 @@ krb5_error_code krb5_decrypt_data
krb5_pointer ivec, krb5_enc_data *data,
krb5_data *enc_data);
+krb5_error_code
+krb5int_aes_encrypt(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output);
+krb5_error_code
+krb5int_aes_decrypt(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output);
+
struct _krb5_kt_ops;
struct _krb5_kt { /* should move into k5-int.h */
krb5_magic magic;
diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h
index c70f634d4..0450eb277 100644
--- a/src/include/k5-thread.h
+++ b/src/include/k5-thread.h
@@ -245,6 +245,12 @@ typedef k5_os_nothread_mutex k5_os_mutex;
If we find a platform with non-functional stubs and no weak
references, we may have to resort to some hack like dlsym on the
symbol tables of the current process. */
+extern int krb5int_pthread_loaded(void)
+#ifdef __GNUC__
+ /* We should always get the same answer for the life of the process. */
+ __attribute__((const))
+#endif
+ ;
#if defined(HAVE_PRAGMA_WEAK_REF) && !defined(NO_WEAK_PTHREADS)
# pragma weak pthread_once
# pragma weak pthread_mutex_lock
@@ -253,12 +259,6 @@ typedef k5_os_nothread_mutex k5_os_mutex;
# pragma weak pthread_mutex_init
# pragma weak pthread_self
# pragma weak pthread_equal
-extern int krb5int_pthread_loaded(void)
-#ifdef __GNUC__
- /* We should always get the same answer for the life of the process. */
- __attribute__((const))
-#endif
- ;
# define K5_PTHREADS_LOADED (krb5int_pthread_loaded())
# define USE_PTHREAD_LOCK_ONLY_IF_LOADED