Package org.metricshub.ipmi.core.api.sol
Class SpecificCipherSuiteSelector
java.lang.Object
org.metricshub.ipmi.core.api.sol.SpecificCipherSuiteSelector
- All Implemented Interfaces:
CipherSuiteSelectionHandler
Implementation of
CipherSuiteSelectionHandler that always returns cipher suite provided in the constructor.-
Constructor Summary
ConstructorsConstructorDescriptionSpecificCipherSuiteSelector(CipherSuite cipherSuite) Creates a selector that always returns the given suite, whether the BMC offers it or not. -
Method Summary
Modifier and TypeMethodDescriptionchoose(List<CipherSuite> availableCipherSuites) Chooses oneCipherSuiteamong list of availableCipherSuites, to be used during IPMI connection.
-
Constructor Details
-
SpecificCipherSuiteSelector
Creates a selector that always returns the given suite, whether the BMC offers it or not.- Parameters:
cipherSuite- the suite to use, for exampleCipherSuite.forId(17)
-
-
Method Details
-
choose
Description copied from interface:CipherSuiteSelectionHandlerChooses oneCipherSuiteamong list of availableCipherSuites, to be used during IPMI connection.- Specified by:
choosein interfaceCipherSuiteSelectionHandler- Parameters:
availableCipherSuites-CipherSuites returned by the server as avaialble to use.- Returns:
- the suite to use, never null: a selector that refuses every suite the BMC offers throws an exception (a null suite fails the session setup, and is never taken for suite 0)
-