[
https://issues.apache.org/jira/browse/SSHD-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17376632#comment-17376632
]
Lyor Goldstein commented on SSHD-1189:
--------------------------------------
While it seems harmless, it begs the question why do you need to do this ?
After all, these are the defaults - i.e., if you do not explicitly intervene in
the code these will be the values that are used. On the other hand, please note
that these "defaults" may be furthered filtered by "weeding out" unsupported
ones:
{code:java|title=BaseBuilder}
/**
* @param ignoreUnsupported If {@code true} then all the default ciphers
are included, regardless of whether they
* are currently supported by the JCE. Otherwise,
only the supported ones out of the list
* are included
* @return A {@link List} of the default {@link
NamedFactory} instances of the {@link Cipher}s
* according to the preference order defined by
{@link #DEFAULT_CIPHERS_PREFERENCE}.
* <B>Note:</B> the list may be filtered to
exclude unsupported JCE ciphers according to
* the <tt>ignoreUnsupported</tt> parameter
* @see BuiltinCiphers#isSupported()
*/
@SuppressWarnings({ "unchecked", "rawtypes" }) // safe due to the hierarchy
public static List<NamedFactory<Cipher>> setUpDefaultCiphers(boolean
ignoreUnsupported) {
return (List) NamedFactory.setUpBuiltinFactories(ignoreUnsupported,
DEFAULT_CIPHERS_PREFERENCE);
}
/**
* @param ignoreUnsupported If {@code true} all the available built-in
{@link Mac} factories are added, otherwise
* only those that are supported by the current
JDK setup
* @return A {@link List} of the default {@link
NamedFactory} instances of the {@link Mac}s
* according to the preference order defined by
{@link #DEFAULT_MAC_PREFERENCE}.
* <B>Note:</B> the list may be filtered to
exclude unsupported JCE MACs according to the
* <tt>ignoreUnsupported</tt> parameter
* @see BuiltinMacs#isSupported()
*/
@SuppressWarnings({ "unchecked", "rawtypes" }) // safe due to the hierarchy
public static List<NamedFactory<Mac>> setUpDefaultMacs(boolean
ignoreUnsupported) {
return (List) NamedFactory.setUpBuiltinFactories(ignoreUnsupported,
DEFAULT_MAC_PREFERENCE);
}
{code}
> How to fetch default KEX, ciphers and mac
> -----------------------------------------
>
> Key: SSHD-1189
> URL: https://issues.apache.org/jira/browse/SSHD-1189
> Project: MINA SSHD
> Issue Type: Question
> Reporter: Susmit Sarkar
> Priority: Blocker
> Attachments: 47C4C2C1-97E3-4934-B862-2E49C75CAB69.png
>
>
> Hi Team,
> In 2.7.0 we see
> ConfigFileReaderSupport.DEFAULT_KEX_ALGORITHMS;
> ConfigFileReaderSupport.DEFAULT_CIPHERS;
> ConfigFileReaderSupport.DEFAULT_MACS;
>
> Are not present, how can we get the list now?
>
> Thanks,
> Susmit
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]