Skip to main content
Skip table of contents

Disabling SSL verification

By default, before playing a stream that is being served over HTTPS, the OpenTV Player does the following SSL verification checks:

  • Verify the host (CURL_VERIFY_HOST).
  • Verify the peer (CURL_VERIFY_PEER).
  • Check that the TLS version being used is 1.2 or above.

The verification stage can be disabled if required using the NMPSDK.disableSSLVerification() API. For example, if there is a problem with the certificate, you could decide to disable verification so that playback can proceed to avoid negatively impacting the user experience. 

This API only relates to adaptive streaming content that is served over HTTPS (i.e., manifest files and video container chunks). It does not cover any other HTTPS connections, such as those used for sign on and licence retrieval, which are performed outside the OpenTV Player SDK.

Prerequisites

If custom certificates are used, they must be added to the default AndroidCAStore before calling NMPSDK.load() to create the SDK.

Example code

SSL verification is disabled by calling NMPSDK.disableSSLVerification() after NMPSDK.load() is called, and before playback has started:

JAVA
boolean NMPSDK.disableSSLVerification()

This returns:

  • true if SSL verification was successfully disabled.
  • false if SSL verification could not be disabled because playback has already started.

Once this has been called:

  • HTTPS playback is allowed – the data will be decrypted but SSL verification will not be performed.
  • SSL verification will remain disabled for the lifetime of the NMPSDK.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.