Skip to content

Zcrypto does not parse a authorityKeyId with value "0." #256

@GOODPWDCETCSZ

Description

@GOODPWDCETCSZ

Env: Ubuntu x64

Go version: 1.13, 1.15

Reproduce: ./zcertificate seed-4s18-107s39-277s36-546s31-704s37-817s26-81c17-791c21.pem

Expected result:
similar to

X509v3 Authority Key Identifier: 
                0.

Actual result:
no AKI in JSON ouput

  "extensions": {
    "key_usage": {
      "certificate_sign": true,
      "value": 32
    },
    "basic_constraints": {
      "is_ca": false
    },
    "name_constraints": {
      "critical": false,
      "permitted_names": [
        "www.c.com"
      ],
      "permitted_email_addresses": [
        "[email protected]"
      ],
      "permitted_ip_addresses": [
        {
          "cidr": "219.218.18.18/32",
          "begin": "219.218.18.18",
          "end": "219.218.18.18",
          "mask": "255.255.255.255"
        }
      ],
      "permitted_directory_names": [
        {
          "country": [
            "UN"
          ]
        }
      ],
      "excluded_names": [
        "www.f.com"
      ],
      "excluded_email_addresses": [
        "[email protected]"
      ],
      "excluded_ip_addresses": [
        {
          "cidr": "2001:250:581d:22:eca0:db8d:6b83:9f59/128",
          "begin": "2001:250:581d:22:eca0:db8d:6b83:9f59",
          "end": "2001:250:581d:22:eca0:db8d:6b83:9f59",
          "mask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
        }
      ],
      "excluded_directory_names": [
        {
          "province": [
            "Shandong"
          ]
        }
      ]
    },
    "subject_key_id": "bc93a7c14d51a1b11e5dc9c191eadb5b53d5bc58",
    "certificate_policies": [
      {
        "id": "2.23.140.1.2.1",
        "cps": [
          "https://www.a.com/b.ext",
          "https://www.c.com/d.ext"
        ],
        "user_notice": [
          {
            "explicit_text": "here is the explicit text",
            "notice_reference": [
              {
                "organization": "Org A",
                "notice_numbers": [
                  1,
                  3,
                  5
                ]
              }
            ]
          }
        ]
      }
    ],
    "authority_info_access": {
      "ocsp_urls": [
        "https://www.a.com/b.ext",
        "https://www.ocsp.com/ocsp.ext"
      ],
      "issuer_urls": [
        "http://www.ca-issuer.com/ca-issuer"
      ]
    }
  },
  "unknown_extensions": [
    {
      "id": "2.16.840.1.113730.1.1",
      "critical": true,
      "value": "AwIGwA=="
    },
    {
      "id": "1.3.6.1.5.5.7.1.11",
      "critical": false,
      "value": "MHkwHwYIKwYBBQUHMAGGE2xkYXA6Ly9odHRwOi91bi5vcmcwLwYIKwYBBQUHMAKGI2h0dHBzOi8vd3d3LmNhLWlzc3Vlci5jb20vY2EtaXNzdWVyMCUGCCsGAQUFBzABhhlodHRwczovL29jc3AuY29tL29jc3AuZXh0"
    },
    {
      "id": "2.16.840.1.113730.1.1",
      "critical": false,
      "value": "AwIGwA=="
    }
  ],

Attachments:
seed-4s18-107s39-277s36-546s31-704s37-817s26-81c17-791c21.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions