dbus/test/data/auth invalid-hex-encoding.auth-script, NONE,
1.1 cancel.auth-script, 1.1, 1.2 external-failed.auth-script,
1.2, 1.3 external-root.auth-script, 1.2,
1.3 external-silly.auth-script, 1.2,
1.3 external-successful.auth-script, 1.2,
1.3 extra-bytes.auth-script, 1.2,
1.3 fail-after-n-attempts.auth-script, 1.2, 1.3
Kristian Hogsberg
krh at pdx.freedesktop.org
Mon May 17 15:19:06 PDT 2004
Update of /cvs/dbus/dbus/test/data/auth
In directory pdx:/tmp/cvs-serv12926/test/data/auth
Modified Files:
cancel.auth-script external-failed.auth-script
external-root.auth-script external-silly.auth-script
external-successful.auth-script extra-bytes.auth-script
fail-after-n-attempts.auth-script
Added Files:
invalid-hex-encoding.auth-script
Log Message:
2004-05-17 Kristian Høgsberg <krh at redhat.com>
Remove base64 encoding, replace with hex encoding. Original patch
from trow at ximian.com, added error handling.
* dbus/dbus-string.c (_dbus_string_base64_encode)
(_dbus_string_base64_decode): Remove.
(_dbus_string_hex_decode): Add end_return argument so we can
distinguish between OOM and invalid hex encoding.
(_dbus_string_test): Remove base64 tests and add test case for
invalid hex.
* dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
Replace base64 with hex.
* test/data/auth/invalid-hex-encoding.auth-script: New test case
for invalid hex encoded data in auth protocol.
--- NEW FILE: invalid-hex-encoding.auth-script ---
## this tests an invalid hex encoding followed by successful authentication
SERVER
SEND 'AUTH EXTERNAL willy'
EXPECT_COMMAND ERROR
EXPECT_STATE WAITING_FOR_INPUT
Index: cancel.auth-script
===================================================================
RCS file: /cvs/dbus/dbus/test/data/auth/cancel.auth-script,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- a/cancel.auth-script 9 May 2003 04:15:56 -0000 1.1
+++ b/cancel.auth-script 17 May 2004 22:19:04 -0000 1.2
@@ -1,7 +1,7 @@
## this tests canceling EXTERNAL
SERVER
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND OK
EXPECT_STATE WAITING_FOR_INPUT
SEND 'CANCEL'
@@ -9,7 +9,7 @@
EXPECT_STATE WAITING_FOR_INPUT
## now start over and see if it works
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND OK
EXPECT_STATE WAITING_FOR_INPUT
SEND 'BEGIN'
Index: external-failed.auth-script
===================================================================
RCS file: /cvs/dbus/dbus/test/data/auth/external-failed.auth-script,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/external-failed.auth-script 5 Mar 2003 02:01:34 -0000 1.2
+++ b/external-failed.auth-script 17 May 2004 22:19:04 -0000 1.3
@@ -2,7 +2,7 @@
SERVER
NO_CREDENTIALS
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND REJECTED
EXPECT_STATE WAITING_FOR_INPUT
Index: external-root.auth-script
===================================================================
RCS file: /cvs/dbus/dbus/test/data/auth/external-root.auth-script,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/external-root.auth-script 5 Mar 2003 02:01:34 -0000 1.2
+++ b/external-root.auth-script 17 May 2004 22:19:04 -0000 1.3
@@ -2,7 +2,7 @@
SERVER
ROOT_CREDENTIALS
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND OK
EXPECT_STATE WAITING_FOR_INPUT
SEND 'BEGIN'
Index: external-silly.auth-script
===================================================================
RCS file: /cvs/dbus/dbus/test/data/auth/external-silly.auth-script,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/external-silly.auth-script 5 Mar 2003 02:01:34 -0000 1.2
+++ b/external-silly.auth-script 17 May 2004 22:19:04 -0000 1.3
@@ -2,7 +2,7 @@
SERVER
SILLY_CREDENTIALS
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND REJECTED
EXPECT_STATE WAITING_FOR_INPUT
Index: external-successful.auth-script
===================================================================
RCS file: /cvs/dbus/dbus/test/data/auth/external-successful.auth-script,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/external-successful.auth-script 5 Mar 2003 02:01:34 -0000 1.2
+++ b/external-successful.auth-script 17 May 2004 22:19:04 -0000 1.3
@@ -1,7 +1,7 @@
## this tests a successful auth of type EXTERNAL
SERVER
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND OK
EXPECT_STATE WAITING_FOR_INPUT
SEND 'BEGIN'
Index: extra-bytes.auth-script
===================================================================
RCS file: /cvs/dbus/dbus/test/data/auth/extra-bytes.auth-script,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/extra-bytes.auth-script 5 Mar 2003 02:01:34 -0000 1.2
+++ b/extra-bytes.auth-script 17 May 2004 22:19:04 -0000 1.3
@@ -1,7 +1,7 @@
## this tests that we have the expected extra bytes at the end
SERVER
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND OK
EXPECT_STATE WAITING_FOR_INPUT
SEND 'BEGIN\r\nHello'
Index: fail-after-n-attempts.auth-script
===================================================================
RCS file: /cvs/dbus/dbus/test/data/auth/fail-after-n-attempts.auth-script,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/fail-after-n-attempts.auth-script 5 Mar 2003 02:01:34 -0000 1.2
+++ b/fail-after-n-attempts.auth-script 17 May 2004 22:19:04 -0000 1.3
@@ -4,30 +4,30 @@
NO_CREDENTIALS
# 1
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND REJECTED
EXPECT_STATE WAITING_FOR_INPUT
# 2
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND REJECTED
EXPECT_STATE WAITING_FOR_INPUT
# 3
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND REJECTED
EXPECT_STATE WAITING_FOR_INPUT
# 4
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND REJECTED
EXPECT_STATE WAITING_FOR_INPUT
# 5
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_COMMAND REJECTED
EXPECT_STATE WAITING_FOR_INPUT
# 6
-SEND 'AUTH EXTERNAL USERID_BASE64'
+SEND 'AUTH EXTERNAL USERID_HEX'
EXPECT_STATE NEED_DISCONNECT
More information about the dbus-commit
mailing list