projects
/
platform
/
upstream
/
dbus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Actually use DBusAuthorization in DBusAuth EXTERNAL mech"
[platform/upstream/dbus.git]
/
dbus
/
dbus-sha.c
diff --git
a/dbus/dbus-sha.c
b/dbus/dbus-sha.c
index
54f851a
..
febfba2
100644
(file)
--- a/
dbus/dbus-sha.c
+++ b/
dbus/dbus-sha.c
@@
-1,10
+1,10
@@
-/* -*- mode: C; c-file-style: "gnu" -*- */
+/* -*- mode: C; c-file-style: "gnu"
; indent-tabs-mode: nil;
-*- */
/* dbus-sha.c SHA-1 implementation
*
* Copyright (C) 2003 Red Hat Inc.
* Copyright (C) 1995 A. M. Kuchling
*
/* dbus-sha.c SHA-1 implementation
*
* Copyright (C) 2003 Red Hat Inc.
* Copyright (C) 1995 A. M. Kuchling
*
- * Licensed under the Academic Free License version 2.
0
+ * Licensed under the Academic Free License version 2.
1
*
* 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
*
* 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
@@
-18,13
+18,14
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 5
9 Temple Place, Suite 330, Boston, MA 02111-1307
USA
+ * Foundation, Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
*
*/
*
*/
+#include <config.h>
#include "dbus-internals.h"
#include "dbus-internals.h"
-#include "dbus-marshal.h"
#include "dbus-sha.h"
#include "dbus-sha.h"
+#include "dbus-marshal-basic.h" /* for byteswap routines */
#include <string.h>
/* The following comments have the history of where this code
#include <string.h>
/* The following comments have the history of where this code
@@
-157,7
+158,7
@@
effort (for example the reengineering of a great many Capstone chips).
#define subRound(a, b, c, d, e, f, k, data) \
( e += ROTL( 5, a ) + f( b, c, d ) + k + data, b = ROTL( 30, b ) )
#define subRound(a, b, c, d, e, f, k, data) \
( e += ROTL( 5, a ) + f( b, c, d ) + k + data, b = ROTL( 30, b ) )
-#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+#endif /*
!
DOXYGEN_SHOULD_SKIP_THIS */
/* Perform the SHA transformation. Note that this code, like MD5, seems to
break some optimizing compilers due to the complexity of the expressions
/* Perform the SHA transformation. Note that this code, like MD5, seems to
break some optimizing compilers due to the complexity of the expressions
@@
-465,7
+466,7
@@
_dbus_sha_final (DBusSHAContext *context,
/* some kind of security paranoia, though it seems pointless
* to me given the nonzeroed stuff flying around
*/
/* some kind of security paranoia, though it seems pointless
* to me given the nonzeroed stuff flying around
*/
-
memset ((void*)context, '\0', sizeof (DBusSHAContext)
);
+
_DBUS_ZERO(*context
);
return TRUE;
}
return TRUE;
}
@@
-510,7
+511,7
@@
_dbus_sha_compute (const DBusString *data,
/** @} */ /* end of exported functions */
/** @} */ /* end of exported functions */
-#ifdef DBUS_
BUIL
D_TESTS
+#ifdef DBUS_
ENABLE_EMBEDDE
D_TESTS
#include "dbus-test.h"
#include <stdio.h>
#include "dbus-test.h"
#include <stdio.h>
@@
-745,8
+746,8
@@
process_test_data (const char *test_data_dir)
int line_no;
dbus_bool_t retval;
int success_count;
int line_no;
dbus_bool_t retval;
int success_count;
- DBusError error;
-
+ DBusError error
= DBUS_ERROR_INIT
;
+
retval = FALSE;
if (!_dbus_string_init (&tests_file))
retval = FALSE;
if (!_dbus_string_init (&tests_file))
@@
-778,7
+779,6
@@
process_test_data (const char *test_data_dir)
if (!_dbus_concat_dir_and_file (&results_file, &tmp))
_dbus_assert_not_reached ("no memory");
if (!_dbus_concat_dir_and_file (&results_file, &tmp))
_dbus_assert_not_reached ("no memory");
- dbus_error_init (&error);
if (!_dbus_file_get_contents (&tests, &tests_file, &error))
{
fprintf (stderr, "could not load test data file %s: %s\n",
if (!_dbus_file_get_contents (&tests, &tests_file, &error))
{
fprintf (stderr, "could not load test data file %s: %s\n",
@@
-966,4
+966,4
@@
_dbus_sha_test (const char *test_data_dir)
return TRUE;
}
return TRUE;
}
-#endif /* DBUS_
BUIL
D_TESTS */
+#endif /* DBUS_
ENABLE_EMBEDDE
D_TESTS */