Skip to content

Commit a5c25d8

Browse files
rjernstChrisHegarty
authored andcommitted
8286395: Address possibly lossy conversions in java.security.jgss
Reviewed-by: chegar
1 parent e93be3a commit a5c25d8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Des.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,15 @@ public static long char_to_key(char[] passwdChars) throws KrbCryptoException {
272272
key = set_parity(key);
273273
if (bad_key(key)) {
274274
byte [] temp = long2octet(key);
275-
temp[7] ^= 0xf0;
275+
temp[7] ^= (byte) 0xf0;
276276
key = octet2long(temp);
277277
}
278278

279279
newkey = des_cksum(long2octet(key), passwdBytes, long2octet(key));
280280
key = octet2long(set_parity(newkey));
281281
if (bad_key(key)) {
282282
byte [] temp = long2octet(key);
283-
temp[7] ^= 0xf0;
283+
temp[7] ^= (byte) 0xf0;
284284
key = octet2long(temp);
285285
}
286286

src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/Des3DkCrypto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private static byte[] des3Expand(byte[] input, int start, int end) {
157157
}
158158
++posn;
159159
if (bit != 0) {
160-
last |= (bit<<posn);
160+
last |= (byte) (bit<<posn);
161161
}
162162
}
163163

0 commit comments

Comments
 (0)