streamingContentKeyRequestDataForApp = unknown error -42784

What could be wrong, here are the steps:


1. load url "Test Streams/Muxed/encrypted/prog_index.m3u8", loads fine

2. the delegate function "shouldWaitForLoadingOfRequestedResource" is called since it url is encrypted

3. in the myGetAppCertificateData function I load the file:

certificate = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://77.110.47.86/fairplaytestdata/dev_certificate.der"]];

and it loads fine, data contains 897 bytes.

4. but this call (streamingContentKeyRequestDataForApp) , just return nil with error -42784

requestBytes = [loadingRequest streamingContentKeyRequestDataForApp:certificate

contentIdentifier:assetId

options:nil

error:&error];


I have downloaded the latest version of the sdk v2.0.3

These steps should be possible without even having started on the KSM implementation, right?

Replies

If you are attempting round-trip playback on the device using the encrypted test streams along with the development credentials (dev_certificate.der and dev_private_key.pem), this is not possible. An iOS device (or Apple TV) will reject the developer credentials. These are only for validating your Key Security Module implementation.


You need to use the certificate issued specifically to you via the FairPlay Streaming Deployment package. See <https://developer.apple.com/contact/fps/> for instruction on how to get it.


The FairPlay Streaming Programming Guide (in the SDK, see https://developer.apple.com/services-account/download?path=/Developer_Tools/FairPlay_Streaming_SDK/FairPlay_Streaming_Server_SDK_v2.0.3.zip) discusses this topic in the sections titled "Testing the Key Security Modules" (pg. 25), “Using the FPS SDK and Tools” (pg. 40) and "FairPlay Streaming SDK Contents” pg. 10.