Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-6903

REST method for revoking a certificate

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 6.14.0
    • Component/s: None
    • Labels:
      None

      Description

      PUT method

      endpoint: /v1/certificate/{issuer_dn}/{certificate_serial_number}/revoke

      issuer_dn must be URL encoded, certificate_serial_number must be decimal

      Input:

      reason (mandatory) - should be one of the RevocationReasons enum values (e.g. KEY_COMPROMISE)
      date (optional) - validates that the date is not in the future

      date must be URL encoded

      Example request:

      curl --key superadmin.key --cert superadmin.crt -X PUT -k -v 'https://localhost:8443/ejbca/ejbca-rest-api/v1/certificate/CN%3DManagementCA%2CO%3DEJBCA%20Sample%2CC%3DSE/200580229088265211/revoke?reason=UNSPECIFIED&date=2018-02-10T17%3A06%3A15%2B00%3A00'
      

      Output:

      Status Code: 200

      {
          "serialNumber": 1984262536909266874,
          "status": "Revoked",
          "message": "Successfully revoked",
          "date": "2018-05-18T10:40:57+02:00"
      }
      

      Note: "status" field will be just some string in the first iteration. will specify it better later.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hsunmark Henrik Sunmark
                Reporter:
                tarmo_helmes Tarmo Raudsep
                Verified by:
                Oskar Eriksson (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Time Spent - 6 hours, 30 minutes Remaining Estimate - 1 day, 1 hour, 30 minutes
                  1d 1h 30m
                  Logged:
                  Time Spent - 6 hours, 30 minutes Remaining Estimate - 1 day, 1 hour, 30 minutes
                  6h 30m