karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KARAF-5073) OpenSSHGeneratorFileKeyProvider is unable to write SSH keys
Date Tue, 01 Aug 2017 13:21:00 GMT

     [ https://issues.apache.org/jira/browse/KARAF-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Christian Schneider resolved KARAF-5073.
       Resolution: Fixed
         Assignee: Christian Schneider  (was: Jean-Baptiste Onofré)
    Fix Version/s: 4.2.0

This patch was already applied by gnodet.

> OpenSSHGeneratorFileKeyProvider is unable to write SSH keys
> -----------------------------------------------------------
>                 Key: KARAF-5073
>                 URL: https://issues.apache.org/jira/browse/KARAF-5073
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.1.0, 4.1.2
>         Environment: all
>            Reporter: Lukasz Lech
>            Assignee: Christian Schneider
>             Fix For: 4.2.0
>         Attachments: karaf-shell-ssh-OpenSSHGeneratorFileKeyProvider.patch
> Project: org.apache.karaf.shell.ssh
> Class org.apache.karaf.shell.ssh.OpenSSHGeneratorFileKeyProvider has method doWriteKeyPair
to write generated SSH keys to the disk. 
> When I run karaf and log in with SSH, the keys are generated, but not written. In console
> > sun.security.rsa.RSAPrivateCrtKeyImpl cannot be cast to org.apache.commons.ssl.PEMItem
> After inspicing the implementation and comparing it with the not-yes-ssl-commons code
I can't see how this method could function for anyone in current form. PEMUtil.encode expected
the collection of org.apache.commons.ssl.PEMItem items, which have no inheriting classes nor
implement/extend anything. 
> *Probably* the correct way would be either using toPEM and formatRSAPrivateKey methods
from PEMUtil, but it doesn't seem obvious to me what method is symethrical to the constructor
of org.apache.commons.ssl.PKCS8Key.
> One is sure, doWriteKeyPair with current codebase can no way work.  

This message was sent by Atlassian JIRA

View raw message