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

Fields notBefore and notAfter in the order object are optional

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 6.14.0
    • Component/s: None
    • Labels:
    • Issue discovered during:
      Testing
    • Epic Link:
    • Sprint:
      EJBCA Sprint 16

      Description

      The spec says that both notBefore and notAfter fields in the order object are "optional"

      notBefore (optional, string): The requested value of the notBefore
      field in the certificate, in the date format defined in [RFC3339].

      notAfter (optional, string): The requested value of the notAfter
      field in the certificate, in the date format defined in [RFC3339].

      However, EJBCA crashes if the notBefore or notAfter field is null since null cannot be parsed to a long.

      AcmeOrder acmeOrder = new AcmeOrder(acmeAccount.getAccountId(), 
                      expires, 
                      acmeOrderRequest.getIdentifiers(),
                      Rfc3339DateTimeUtil.parse(acmeOrderRequest.getNotBefore()), 
                      Rfc3339DateTimeUtil.parse(notAfter));
      

      Results in java.lang.IllegalArgumentException: 'null' could not be parsed as an RFC3339 date.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                realiserad Bastian Fredriksson
                Reporter:
                realiserad Bastian Fredriksson
                Verified by:
                Andrey Sergeev
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 hours
                  3h
                  Remaining:
                  Time Spent - 1 hour, 10 minutes Remaining Estimate - 1 hour, 50 minutes
                  1h 50m
                  Logged:
                  Time Spent - 1 hour, 10 minutes Remaining Estimate - 1 hour, 50 minutes
                  1h 10m