Skip to content

proposal: crypto/x509: add Public Key Algorithms from RFC 4491 #21858

Description

@realmfoo

RFC 4491 describes encoding formats,
identifiers, and parameter formats for the algorithms GOST R 34.10-
94, GOST R 34.10-2001, and GOST R 34.11-94 for use in Internet X.509
Public Key Infrastructure (PKI).

It was published at May 2006.

What did you do?

Parsed certificate with GOST R 34.10 Algorithms. Such as:

Certificate:
    Data:
        Version: 3 (0x2)
    ...
    Signature Algorithm: GOST R 34.11-94 with GOST R 34.10-2001
        Subject Public Key Info:
            Public Key Algorithm: GOST R 34.10-2001
        ...

And tried to get information about public key algorithm:

	cert, err := x509.ParseCertificate(raw)
	if err != nil {
		return nil, err
	}

	fmt.Printf("%s", cert.PublicKeyAlgorithm)

What did you expect to see?

Expected to see some valid algorithm with value greater then 0:

s%!(EXTRA x509.PublicKeyAlgorithm=4)

What did you see instead?

It's unknown algorithm:

s%!(EXTRA x509.PublicKeyAlgorithm=0)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions