maguro 2005/03/31 10:28:11
Modified: modules/core/src/java/org/openejb/corba/util Util.java
Log:
Fleshed out AS Mech group
Revision Changes Path
1.9 +5 -6
openejb/modules/core/src/java/org/openejb/corba/util/Util.java
Index: Util.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/util/Util.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Util.java 29 Mar 2005 23:53:38 -0000 1.8
+++ Util.java 31 Mar 2005 15:28:11 -0000 1.9
@@ -193,7 +193,7 @@
try {
byte[] oid_arr = encodeOID(oid);
int oid_len = oid_arr.length;
- byte[] name_arr = name.getBytes();
+ byte[] name_arr = name.getBytes("UTF-8");
int name_len = name_arr.length;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -294,7 +294,7 @@
* @param target The target name.
* @return The byte array of the ASN1 encoded GSSToken.
*/
- public static byte[] encodeGSSUPToken(ORB orb, Codec codec, String user,
char[] pwd, String target) {
+ public static byte[] encodeGSSUPToken(ORB orb, Codec codec, String user,
String pwd, String target) {
byte[] result = null;
try {
// write the GSS ASN tag
@@ -303,10 +303,9 @@
// create and encode a GSSUP initial context token
InitialContextToken init_token = new InitialContextToken();
- init_token.username = user.getBytes();
+ init_token.username = (user + "@" + target).getBytes("UTF-8");
- String password = new String(pwd);
- init_token.password = password.getBytes();
+ init_token.password = pwd.getBytes("UTF-8");
init_token.target_name =
encodeGSSExportName(GSSUPMechOID.value.substring(4), target);