mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8237474: Default SSLEngine should create in server role
Reviewed-by: xuelei, coffeys
This commit is contained in:
parent
b812e8baff
commit
aadc7c7ca8
9 changed files with 67 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1178,6 +1178,10 @@ public abstract class SSLContextImpl extends SSLContextSpi {
|
|||
@Override
|
||||
protected SSLParameters engineGetDefaultSSLParameters() {
|
||||
SSLEngine engine = createSSLEngineImpl();
|
||||
// Note: The TLSContext defaults to client side SSLParameters.
|
||||
// We can do the same here. Please don't change the behavior
|
||||
// for compatibility.
|
||||
engine.setUseClientMode(true);
|
||||
return engine.getSSLParameters();
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ final class TransportContext implements ConnectionContext {
|
|||
// Called by SSLEngineImpl
|
||||
TransportContext(SSLContextImpl sslContext, SSLTransport transport,
|
||||
InputRecord inputRecord, OutputRecord outputRecord) {
|
||||
this(sslContext, transport, new SSLConfiguration(sslContext, true),
|
||||
this(sslContext, transport, new SSLConfiguration(sslContext, false),
|
||||
inputRecord, outputRecord, true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue