Skip to content

SFTP: PKCS#8 OpenSSL key format not supported #1765

@stephanritscher

Description

@stephanritscher

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When creating a PKCS#8 key using openssl genpkey tool, the generated key cannot be imported by Acode for SFTP drives.

E.g. create unencrypted RSA key with
openssl genpkey -algorithm RSA -out key.pem
Create SFTP drive with public key authentication, select key.pem, no password and press save.
Error toast: Invalid passphrase for key file

Those are key files starting with
-----BEGIN PRIVATE KEY-----

The same holds for encrypted key files generated by genpkey which start with
-----BEGIN ENCRYPTED PRIVATE KEY-----
and also for EC keys which can also be generated by genpkey and be hold by this key format.

Opposed to that, PKCS#1 keys generated by openssl rsa -traditional can be imported:
openssl genrsa -traditional -out rsa.key
These start with
-----BEGIN RSA PRIVATE KEY-----
The same holds for EC keys in PKCS#1 format which start with
-----BEGIN EC PRIVATE KEY-----
and the encrypted variants.

Environment

Acode 1.11.7
Android 16

If applicable, add mockups / screenshots regarding your vision

No response

If applicable, attach your Acode.log file to this issue.

Acode.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions