Simon Ratner created MYNEWT-451:
-----------------------------------

             Summary: `newt create-image` does not recognise PEM unless private 
key is listed first
                 Key: MYNEWT-451
                 URL: https://issues.apache.org/jira/browse/MYNEWT-451
             Project: Mynewt
          Issue Type: Bug
          Components: Newt
    Affects Versions: v1_0_0_beta1
            Reporter: Simon Ratner
            Assignee: Sterling Hughes


Here is an example of a PEM file not recognised by `newt create-image`:

{noformat}
ASN1 OID: secp224r1
NIST CURVE: P-224
-----BEGIN EC PARAMETERS-----
BgUrgQQAIQ==
-----END EC PARAMETERS-----
-----BEGIN EC PRIVATE KEY-----
MGgCAQEEHC+OSuFL+Y4G1vbb2Tuj3cAmmj99EJjxWVNQlc2gBwYFK4EEACGhPAM6
AATnm3vSTozIAcjQVNKRzJ7RKk+S2qF6cuHfxaCf0jp8IaJlO2bY6cd/ArSKF8kQ
Jl2kETQMT0B1OA==
-----END EC PRIVATE KEY-----
{noformat}

This is the direct output of:
{noformat}
openssl ecparam -genkey -name secp224r1 -text -out test.pem
{noformat}

Removing the text section (but keeping params) is not sufficient. Re-arranging 
the sections such that the private key section appears first in the file makes 
`newt` recognise it correctly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to