Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296787

Unify debug printing format of X.509 cert serial numbers

XMLWordPrintable

    • b03
    • generic
    • generic

        The JDK debug libraries print X.509 certificate serial numbers in 3 different formats. We should unify on one format.

        e.g.
        ==============
        certpath: X509CertSelector.match(SN: 83be056904246b1a1756ac95991c74a
          Issuer: CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US
          Subject: CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US)
        certpath: X509CertSelector.match returning: true
        certpath: YES - try this trustedCert



        certpath: Constraints.permits(): RSA, [
          Variant: tls server
          Anchor: [
          Trusted CA cert: [
        [
          Version: V3
          Subject: CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US
          Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

          Key: Sun RSA public key, 2048 bits
          params: null
          modulus: 28559384442792876273280274398620578979733786817784174960112400169719065906301471912340204391164075730987771255281479191858503912379974443363319206013285922932969143082114108995903507302607372164107846395526169928849546930352778612946811335349917424469188917500996253619438384218721744278787164274625243781917237444202229339672234113350935948264576180342492691117960376023738627349150441152487120197333042448834154779966801277094070528166918968412433078879939664053044797116916260095055641583506170045241549105022323819314163625798834513544420165235412105694681616578431019525684868803389424296613694298865514217451303
          public exponent: 65537
          Validity: [From: Fri Nov 10 00:00:00 UTC 2006,
                       To: Mon Nov 10 00:00:00 UTC 2031]
          Issuer: CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US
          SerialNumber: [ 083be056 904246b1 a1756ac9 5991c74a]

        Certificate Extensions: 4
        [1]: ObjectId: 2.5.29.35 Criticality=false
        AuthorityKeyIdentifier [
        KeyIdentifier [
        0000: 03 DE 50 35 56 D1 4C BB 66 F0 A3 E2 1B 1B C3 97 ..P5V.L.f.......
        0010: B2 3D D1 55 .=.U
        ]

          "certificate" : {
            "version" : "v3",
            "serial number" : "083BE056904246B1A1756AC95991C74A",
            "signature algorithm": "SHA1withRSA",
            "issuer" : "CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US",
            "not before" : "2006-11-10 24:00:00.000 UTC",
            "not after" : "2031-11-10 24:00:00.000 UTC",
            "subject" : "CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US",
            "subject public key" : "RSA",
            "extensions" : [

        ==============
        one cert - 3 styles of serial number :

        SN: 83be056904246b1a1756ac95991c74a
        SerialNumber: [ 083be056 904246b1 a1756ac9 5991c74a]
        "serial number" : "083BE056904246B1A1756AC95991C74A",

        It would help with debug log checks.

              bperez Ben Perez
              coffeys Sean Coffey
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: