Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Qualified Certificate Statements (qcStatements) (1.3.6.1.5.5.7.1.3) #231

Closed
april opened this issue Jun 5, 2019 · 4 comments

Comments

@april
Copy link

april commented Jun 5, 2019

You can see a cert with this here:
https://www.zijnjullieeraluit.nl/

Here is the object:

{
  "extnID": "1.3.6.1.5.5.7.1.3",
  "extnValue": {
    "blockName": "OctetString",
    "blockLength": 96,
    "error": "",
    "warnings": [],
    "valueBeforeDecode": "045E305C3008060604008E4601013013060604008E4601063009060704008E46010603303B060604008E4601053031302F162968747470733A2F2F7777772E71756F7661646973676C6F62616C2E636F6D2F7265706F7369746F72791302656E",
    "idBlock": {
      "blockName": "identificationBlock",
      "blockLength": 1,
      "error": "",
      "warnings": [],
      "valueBeforeDecode": "",
      "isHexOnly": false,
      "valueHex": "",
      "tagClass": 1,
      "tagNumber": 4,
      "isConstructed": false
    },
    "lenBlock": {
      "blockName": "lengthBlock",
      "blockLength": 1,
      "error": "",
      "warnings": [],
      "valueBeforeDecode": "",
      "isIndefiniteForm": false,
      "longFormUsed": false,
      "length": 94
    },
    "valueBlock": {
      "blockName": "OctetStringValueBlock",
      "blockLength": 94,
      "error": "",
      "warnings": [],
      "valueBeforeDecode": "",
      "isIndefiniteForm": false,
      "value": [],
      "isHexOnly": true,
      "valueHex": "305C3008060604008E4601013013060604008E4601063009060704008E46010603303B060604008E4601053031302F162968747470733A2F2F7777772E71756F7661646973676C6F62616C2E636F6D2F7265706F7369746F72791302656E",
      "isConstructed": false
    }
  }
}

For more information, see:
https://tools.ietf.org/html/rfc3739.html
https://www.etsi.org/deliver/etsi_ts/101800_101899/101862/01.03.03_60/ts_101862v010303p.pdf

Thanks as always!

@YuryStrozhevsky
Copy link
Collaborator

YuryStrozhevsky commented Jun 6, 2019

@april April, this is a "rare used" extension with a more or less primitive encoding in there:

SEQUENCE {
   SEQUENCE {
     OBJECT IDENTIFIER etsiQcsCompliance (0 4 0 1862 1 1)
     }
   SEQUENCE {
     OBJECT IDENTIFIER '0 4 0 1862 1 6'
     SEQUENCE {
       OBJECT IDENTIFIER '0 4 0 1862 1 6 3'
       }
     }
   SEQUENCE {
     OBJECT IDENTIFIER '0 4 0 1862 1 5'
     SEQUENCE {
       SEQUENCE {
         IA5String  'https://www.quovadisglobal.com/repository'
         PrintableString 'en'
         }
       }
     }
   }

Do you really need support from PKI.js for such data? From my PoV I think you could use only ASN1js decoding features: it would not provide your a schema verification, but you will have all necessary data in there.

const asn1 = asn1js.fromBER(buffer);

@rmhrisk
Copy link
Contributor

rmhrisk commented Jun 6, 2019

Let’s add it, it’s becoming more common.

@april
Copy link
Author

april commented Jun 6, 2019

The EU seems to be on a push to use it, and they just released a Firefox extension that depends upon it. I honestly didn’t know it existed until then. :)

YuryStrozhevsky added a commit that referenced this issue Jun 7, 2019
Signed-off-by: YuryStrozhevsky <yury@strozhevsky.com>
@YuryStrozhevsky
Copy link
Collaborator

@april I made changes, but want to warn you that it is almost useless - in the extension mandatory part is id only, all remaining is id-dependant and could not be parsed correctly on PKI.js side. Thus in any case you would need to work with ASN1js values in your client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants