QUnit for OCSP request/response ASN1 Encoder Class 'asn1ocsp.js'

Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

Tests completed in 112 milliseconds.
95 assertions of 96 passed, 1 failed.

  1. OCSPResponse with status success test (0, 2, 2)Rerun7 ms
    1. hex with sighex
    2. dump with sighex
  2. OCSPResponse with status error test (0, 2, 2)Rerun0 ms
    1. status=1
    2. status=internalError(2)
  3. ResponseBytes test (0, 2, 2)Rerun2 ms
    1. hex with sighex
    2. dump with sighex
  4. BasicOCSPResponse test (0, 4, 4)Rerun46 ms
    1. hex with sighex
    2. dump with sighex
    3. hex with reskey
    4. dump with reskey
  5. ResponseData test (0, 2, 2)Rerun1 ms
    1. hex
    2. dump
  6. ResponderID test (0, 12, 12)Rerun11 ms
    1. hex by key
    2. dump by key hex
    3. hex by name param
    4. dump by name
    5. key by cert
    6. key by cert dump
    7. name by cert
    8. name by cert dump
    9. key by X509 obj
    10. key by X509 obj dump
    11. name by X509 obj
    12. name by X509 obj dump
  7. SingleResponseList test (0, 2, 2)Rerun0 ms
    1. hex
    2. dump
  8. SingleResponse test (0, 4, 4)Rerun1 ms
    1. hex
    2. dump
    3. hex with nextupdate and ext
    4. dump with nextupdate and ext
  9. CertID.setByValue (0, 1, 1)Rerun0 ms
    1. all
  10. CertID.setByCert (0, 1, 1)Rerun3 ms
    1. all
  11. CertID constructor by value (0, 1, 1)Rerun0 ms
    1. all
  12. CertID constructor by cert (0, 1, 1)Rerun3 ms
    1. all
  13. CertStatus test (0, 6, 6)Rerun0 ms
    1. good 8000
    2. unknown 8200
    3. revoked hex
    4. revoked dump
    5. revoked2 hex with reason3
    6. revoked2 dump with reason3
  14. Request constructor by cert (0, 1, 1)Rerun3 ms
    1. all
  15. TBSRequest constructor by cert (0, 1, 1)Rerun2 ms
    1. all
  16. OCSPRequest constructor by cert (0, 1, 1)Rerun3 ms
    1. all
  17. OCSPUtil.getRequestHex (0, 1, 1)Rerun2 ms
    1. hex
  18. OCSPUtil.getOCSPResponseInfo wikipedia good (0, 4, 4)Rerun0 ms
    1. good responseStatus=0
    2. certStatus=good
    3. thisUpdate=20161002032702Z
    4. nextUpdate=20161006032702Z
  19. OCSPUtil.getOCSPResponseInfo wikipedia revoked (0, 5, 5)Rerun0 ms
    1. good responseStatus=0
    2. certStatus=revoked
    3. revocationTime=20160426174407Z
    4. thisUpdate=20161002025327Z
    5. nextUpdate=20161006025327Z
  20. OCSPUtil.getOCSPResponseInfo ry good (0, 4, 4)Rerun1 ms
    1. good responseStatus=0
    2. certStatus=good
    3. thisUpdate=20160921033451Z
    4. nextUpdate=20160925033451Z
  21. pos test OCSP valid (0, 15, 15)Rerun0 ms
    1. lv1
    2. lv2
    3. lv3
    4. lv4
    5. lv5
    6. lv6
    7. lv7
    8. lv8
    9. i2 8000 good
    10. i3 gentime1
    11. i4 [0] gentime2
    12. i good 318
    13. o good 8000
    14. i t1 322
    15. i t2 356
  22. pos test OCSP revoked (0, 4, 4)Rerun0 ms
    1. o revoked
    2. o revoked time
    3. o t1
    4. o t2
  23. OCSPParser.getOCSPResponse test (0, 2, 2)Rerun2 ms
    1. successful + responseBytes
    2. unauhorized(6)
  24. OCSPParser.getResponseBytes test (0, 1, 1)Rerun0 ms
    1. test1
  25. OCSPParser.getBasicOCSPResponse test (0, 1, 1)Rerun0 ms
    1. test1
  26. OCSPParser.getResponseData test (0, 1, 1)Rerun0 ms
    1. test1
  27. OCSPParser.getResponderID test (0, 2, 2)Rerun1 ms
    1. key
    2. name
  28. OCSPParser.getSingleResponseList test (0, 1, 1)Rerun0 ms
    1. test
  29. OCSPParser.getSingleResponse test (1, 2, 3)Rerun3 ms
    1. test
    2. test2
    3. test3
      Expected:
      {
        "certid": {
          "alg": "sha1",
          "isskey": "12ab",
          "issname": "12ab",
          "sbjsn": "12ab"
        },
        "ext": [
          {
            "extn": "030101",
            "extname": "1.2.3.4"
          }
        ],
        "nextupdate": "20200913235959Z",
        "status": {
          "status": "good"
        },
        "thisupdate": "20200903235959Z"
      }
      Result:
      {
        "certid": {
          "alg": "sha1",
          "isskey": "12ab",
          "issname": "12ab",
          "sbjsn": "12ab"
        },
        "ext": [
          {
            "extn": {
              "bitstr": {
                "bin": ""
              }
            },
            "extname": "1.2.3.4"
          }
        ],
        "nextupdate": "20200913235959Z",
        "status": {
          "status": "good"
        },
        "thisupdate": "20200903235959Z"
      }
      Diff:
       {
         "certid":  {
           "alg":  "sha1",
           "isskey":  "12ab",
           "issname":  "12ab",
           "sbjsn":  "12ab"
         },
         "ext":  [
           {
             "extn": "030101",
            {
              "bitstr": {
                "bin": ""
              }
            },
             "extname":  "1.2.3.4"
           }
         ],
         "nextupdate":  "20200913235959Z",
         "status":  {
           "status":  "good"
         },
         "thisupdate":  "20200903235959Z"
       } 
      Source:
          at Object.<anonymous> (https://solutionweb.vps.infologis.fr/library/jsrsasign/test/qunit-do-asn1ocsp.html:740:1)
  30. OCSPParser.getCertStatus test (0, 3, 3)Rerun0 ms
    1. good
    2. unknown
    3. revoked
  31. OCSPParser.getOCSPRequest test (0, 1, 1)Rerun1 ms
    1. digicert ev
  32. OCSPParser.getTBSRequest test (0, 2, 2)Rerun0 ms
    1. digicert ev
    2. twitter with ocspNonce ext
  33. OCSPParser.getRequestList test (0, 1, 1)Rerun0 ms
    1. digicert ev
  34. OCSPParser.getRequest test (0, 1, 1)Rerun1 ms
    1. digicert ev
  35. OCSPParser.getCertID test (0, 1, 1)Rerun0 ms
    1. digicert ev
test markup
TEST INDEX | API |