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

VendorAuthenticationTest.test01_3GPPMode depends on server time zone

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Cosmetic
    • Resolution: Fixed
    • Affects Version/s: EJBCA 6.15.0.2
    • Fix Version/s: EJBCA 7.0.0
    • Component/s: None
    • Labels:
    • Issue discovered during:
      Integration
    • Sprint:
      EJBCA Team Bob - 2018 w45, EJBCA Team Bob - 2018 w48

      Description

      Class org.ejbca.core.protocol.cmp.VendorAuthenticationTest
      
      test01_3GPPMode	Failure	expected:<...tAfter: Thu Jan 16 1[2:38:24 CET] 2014> but was:<...tAfter: Thu Jan 16 1[1:38:24 UTC] 2014>
      
      junit.framework.AssertionFailedError: expected:<...tAfter: Thu Jan 16 1[2:38:24 CET] 2014> but was:<...tAfter: Thu Jan 16 1[1:38:24 UTC] 2014>
      at org.ejbca.core.protocol.cmp.VendorAuthenticationTest.test01_3GPPMode(VendorAuthenticationTest.java:348)
      

      Failure happens when server uses UTC, since client message is hard coded to

                      String expectedErrMsg = "The certificate attached to the PKIMessage in the extraCert field is not valid  - Could not validate certificate: NotAfter: Thu Jan 16 12:38:24 CET 2014";
      

      Tests would also be sensitive to Locale mismatch.

      • A nice solution would catch this exception and transform it into something more deterministic.
      • A descent/semi-robust solution (ignoring Locale) would conclude that the error message is good enough if it begins with the string up to an including "... NotAfter:"
      • A less nice solution might be to create the client side version of the error message of the test in the same way as we expect the server to do it.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                samuel Samuel Lidén Borell
                Reporter:
                johan Johan Eklund
                Verified by:
                Andrey Sergeev
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h