mirror of https://github.com/grpc/grpc-java.git
alts: ensure only the first few bytes of key are used
Fixes grpc/grpc#19271
This commit is contained in:
parent
be819fa3fd
commit
f8ba38a0e4
|
|
@ -136,7 +136,7 @@ class AltsHandshakerClient {
|
|||
throw new IllegalStateException("Could not get enough key data from the handshake.");
|
||||
}
|
||||
byte[] key = new byte[KEY_LENGTH];
|
||||
result.getKeyData().copyTo(key, 0);
|
||||
result.getKeyData().substring(0, KEY_LENGTH).copyTo(key, 0);
|
||||
return key;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue