Skip to content

Commit a47a284

Browse files
committed
update code comments
1 parent 43be82b commit a47a284

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

util/src/main/java/io/grpc/util/AdvancedTlsX509KeyManager.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,8 @@
4444
*
4545
* <p>The alias increments on every credential load (e.g. {@code "key-1"}, {@code "key-2"}, ...),
4646
* so the same alias always maps to the same key material. The previous alias is retained for one
47-
* rotation to allow in-progress handshakes to complete. This is required by Netty's
48-
* {@code OpenSslCachingX509KeyManagerFactory} to cache key material across cert reloads.
49-
*
50-
* <p>When using {@code SslProvider.OPENSSL}, wrap this key manager in Netty's
51-
* {@code OpenSslCachingX509KeyManagerFactory} to avoid per-handshake key material encoding
52-
* overhead, e.g. {@code new OpenSslCachingX509KeyManagerFactory(
53-
* new KeyManagerFactoryWrapper(advancedTlsKeyManager))}, and pass the factory to
54-
* {@code SslContextBuilder} instead of the key manager directly.
47+
* rotation to allow in-progress handshakes to complete, ensuring alias-to-key-material consistency
48+
* across credential reloads.
5549
*/
5650
public final class AdvancedTlsX509KeyManager extends X509ExtendedKeyManager {
5751
private static final Logger log = Logger.getLogger(AdvancedTlsX509KeyManager.class.getName());
@@ -251,6 +245,7 @@ public Closeable updateIdentityCredentialsFromFile(File keyFile, File certFile,
251245
}
252246

253247
private static class KeyInfo {
248+
// The private key and the cert chain we will use to send to peers to prove our identity.
254249
final X509Certificate[] certs;
255250
final PrivateKey key;
256251
final String alias;

0 commit comments

Comments
 (0)