Testing Certificate Communication Using the Sample App

Integrating the Jamf Certificate SDK with Mobile Device Apps Deployed by Jamf Pro

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US

You can test the certificate communication in your environment using the Jamf Certificate SDK Sample App that is included with the SDK. You can run the following types of tests depending on your environment:

  • ActualThe Actual test type makes network calls to the Jamf Pro server to request a certificate from a certificate authority (CA). This test ensures that communication is established between the app and Jamf Pro, and that the managed app configuration is sending the required information needed by the app to the CA server.
    Note:

    This test requires access to a Jamf Pro instance.

  • SimulatedThe Simulated test type includes an embedded .p12 file for local testing so you can simulate certificate communication without a Jamf Pro instance or the required managed app configuration. You can use settings in the Sample App to simulate a slow network connection and an error state.
    Note:

    This test does not require access to a Jamf Pro instance.

Test progress, errors and results are displayed for both types of tests in the Action Log of the Sample App interface. In addition, you can schedule a local notification that prompts to renew the certificate.

Requirements

To test certificate communication using the Actual test type, you need access to a Jamf Pro instance so you can distribute the Sample App to a device using Jamf Pro. This allows you to apply the required managed app configuration to the app during distribution. For information on distributing in-house apps developed with the Jamf Certificate SDK, see the Integrating with Active Directory Certificate Services (AD CS) Using Jamf Pro technical paper.

To test certificate communication using the Simulated test type, the Sample App can be distributed to a device through any means that fit your environment.

In addition, ensure the general requirements for distributing apps are met. For more information, see Jamf Certificate SDK Requirements.

  1. Open the Sample App on the device it is installed on.
  2. Do one of the following:
    • To use the actual test type, tap Actual and then tap Run Test. The progress of the actual test is displayed in the Action Log, along with any errors that may occur.

    • To use the simulated test type, tap Simulated, apply your desired settings, and then tap Run Test. The progress of the simulated test is displayed in the Action Log. For a list of potential errors, see CertificateRequestErrorDomain Constants.

  3. (Optional) To schedule a local notification to prompt a user to renew the certificate, tap Schedule Notification. This notification is displayed after Schedule Notification is tapped.
    • If the app is running in the background or closed when the notification is displayed, the app must be reopened to start the certificate renewal process. Tapping the notification also reopens the app.

    • If the app is running in the foreground, the certificate automatically renews. The progress of the certificate renewal process is displayed in the Action Log. The certificate renews using the Simulated test type.

  4. To reset a test, tap Reset.
    Note:

    The certificate used for the test remains in the keychain until Reset is tapped.

  5. To rerun a test, tap Rerun Test.