Skip to content

Missing OID mapping for ecdsa-with-SHA512 (hex 300a06082a8648ce3d040304) — causes "Unknow Hash Algorithm OID" #9

Description

@mario-ca

When cloning a certificate signed with ecdsa-with-SHA512, the script fails with the following error:

Unknow Hash Algorithm OID: 300a06082a8648ce3d040304

Steps to reproduce

  1. Obtain or generate an X.509 certificate with Signature Algorithm: ecdsa-with-SHA512.
  2. Run: ./clone-cert.sh path/to/cert.pem
  3. Observe the error output.

Expected behavior

The script should correctly detect the hash algorithm (SHA512) and proceed with the cloning process.

Actual behavior

The script exits with:
Unknow Hash Algorithm OID: 300a06082a8648ce3d040304

Root cause

The function oid() in clone-cert.sh does not include a mapping for the OID representing ecdsa-with-SHA512.

Proposed fix

Add the missing mapping in the oid() function:

"300a06082a8648ce3d040304") echo sha512
;;#ecdsa-with-SHA512

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions