Facing issue with fairplay Streaming server SDK 26.0.0

I am trying to Build server for testing on Linux(Alma linux 9 VM) NAME="AlmaLinux" VERSION="9.7 (Moss Jungle Cat)" ID="almalinux" ID_LIKE="rhel centos fedora" VERSION_ID="9.7" PLATFORM_ID="platform:el9" PRETTY_NAME="AlmaLinux 9.7 (Moss Jungle Cat)" ANSI_COLOR="0;34"

[azuki@AlmaDevVM ~]$ uname -m x86_64

I have tried the following steps:

  1. Before starting, ensured that Swift 6 installed. Referred https://www.swift.org/install/ for instructions.

  2. Build the library

In Terminal, uses the following commands to compile the Swift library: cd Development/Key_Server_Module/Swift swift build -Xbuild-tools-swiftc -DTEST_CREDENTIALS

  1. After building the library, ran test cases to ensure the library behaves as expected. ALL unit tests are passing with the development credentials.

• Since I was using an x86_64 machine: export LD_LIBRARY_PATH=./Sources/prebuilt/x86_64-unknown-linux-gnu/

Run all tests: swift test -Xbuild-tools-swiftc -DTEST_CREDENTIALS --disable-swift-testing

  1. Build the server

Build the server: Apache Before starting, ensured the following: a. Installed Apache HTTPD and the dev tools. Using the following command for installation: yum install httpd httpd-devel redhat-rpm-config b. After this, integrated it into the Apache server environment with swift library that was built above. Used the following command to build the server using apxs: • Since I was using an x86_64 machine: apxs -i -a -c
-Wl,-L${PWD}/.build/x86_64-unknown-linux-gnu/debug/
-Wl,-lswift_fpssdk
-Wl,-L${PWD}/Sources/prebuilt/x86_64-unknown-linux-gnu -lfpscrypto
-Wl,-R${PWD}/.build/x86_64-unknown-linux-gnu/debug
server_setup/mod_fps.c

c. Next, copied the dependent libraries to the Apache modules folder using these commands: • If using an x86_64 machine: cp Sources/prebuilt/x86_64-unknown-linux-gnu/libfpscrypto.so /usr/lib64/httpd/modules/libfpscrypto.so cp .build/x86_64-unknown-linux-gnu/debug/libswift_fpssdk.so /usr/lib64/httpd/modules/libswift_fpssdk.so

d. Configuring Apache HTTPD Configured Apache HTTPD by adding the module and handler to your Apache HTTPD configuration (/etc/httpd/conf/httpd.conf). Note that the apxs command may automatically add the LoadModule line in the previous step. Listen 8080 LoadFile /usr/lib64/httpd/modules/libfpscrypto.so LoadFile /usr/lib64/httpd/modules/libswift_fpssdk.so LoadModule fps_module /usr/lib64/httpd/modules/mod_fps.so <Location "/fps"> SetHandler fps_handler </Location> Copy the credentials to the Apache modules folder. cp -r ../credentials /usr/lib64/httpd/modules/ export FPS_CERT_PATH=
/usr/lib64/httpd/modules/credentials/test_certificates.json e. Run your server You can run the Apache HTTPD server with the configured module by using the following command: httpd -D FOREGROUND

No issues see till step.

Get SDK version [azuki@AlmaDevVM Key_Server_Module]$ curl localhost:8080/fps/v 26.0.0

But when i try to generate license [azuki@AlmaDevVM Key_Server_Module]$ curl -d ../Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps {"fairplay-streaming-response":{"create-ckc":[{"id":1,"status":-42601}]}}

Can you please suggest what i might be missing here?

Answered by Security Engineer in 873256022

This looks like a problem with your curl command. Can you try the following?

curl -d @Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps

The @ symbol is needed to send the contents of the file. Otherwise, curl just sends the filename as a string in the body of the request, and the server will respond with that error. Also, it looks like you are running from the Key_Server_Module directory, so the relative path is probably Test_Inputs instead of ../Test_Inputs.

This looks like a problem with your curl command. Can you try the following?

curl -d @Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps

The @ symbol is needed to send the contents of the file. Otherwise, curl just sends the filename as a string in the body of the request, and the server will respond with that error. Also, it looks like you are running from the Key_Server_Module directory, so the relative path is probably Test_Inputs instead of ../Test_Inputs.

[azuki@AlmaDevVM Key_Server_Module]$ ps -aef | grep httpd

root 1004896 1 0 Jan21 ? 00:00:00 sudo httpd -D FOREGROUND

root 1004898 1004896 0 Jan21 ? 00:00:01 httpd -D FOREGROUND

apache 1009052 1004898 0 Jan21 ? 00:00:00 httpd -D FOREGROUND

apache 1009054 1004898 0 Jan21 ? 00:00:06 httpd -D FOREGROUND

apache 1009073 1004898 0 Jan21 ? 00:00:06 httpd -D FOREGROUND

apache 1021431 1004898 0 04:17 ? 00:00:00 httpd -D FOREGROUND

apache 1021493 1004898 0 04:17 ? 00:00:00 httpd -D FOREGROUND azuki 1021571 1021387 0 04:17 pts/1 00:00:00 grep --color=auto httpd

[azuki@AlmaDevVM Key_Server_Module]$ curl -d @Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps

curl: (52) Empty reply from server [azuki@AlmaDevVM Key_Server_Module]$

With this, I see empty re[ply now

Tried this. Now I see curl: (52) Empty reply from server


 curl -d @Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps

curl: (52) Empty reply from server [azuki@AlmaDevVM Key_Server_Module]$

Any further help would be highly appreciated. Is it specific to this OS? Any other working reference would be helpful.

  1. Please verify that your apache server is still running, for example by doing version check: "curl localhost:8080/fps/v"
  2. Check that in the folder where you run "curl -d @Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps" you can access the SPC request you are sending to the server, for example by running:

"ls Test_Inputs/iOS/spc_ios_hd_lease_2048.json"

I have confirmed that server is running. I am able to get version

[azuki@AlmaDevVM ~]$ cd server_setup/FairPlay_Streaming_Server_SDK_26/FairPlay_Streaming_Server_SDK_26/Development/Key_Server_Module/

[azuki@AlmaDevVM Key_Server_Module]$ ls

credentials parse_fps Rust Swift Test_Inputs

[azuki@AlmaDevVM Key_Server_Module]$ curl localhost:8080/fps/v

26.0.0

I had tried few more requests and i noticed same response for all

[azuki@AlmaDevVM Key_Server_Module]$ curl -d @Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps

curl: (52) Empty reply from server

[azuki@AlmaDevVM Key_Server_Module]$ curl -d @Test_Inputs/tvOS/spc_tvos_get_client_info_1024.json localhost:8080/fps

curl: (52) Empty reply from server


[azuki@AlmaDevVM Key_Server_Module]$ curl -d @Test_Inputs/iOS/spc_v3_ios_uhd_no_lease_2048.json localhost:8080/fps

curl: (52) Empty reply from server

[azuki@AlmaDevVM Key_Server_Module]$

Two things you could try that may give some clue as to why it's not working:

  1. Review apache logs in /etc/httpd/logs/error_log
  2. Run the curl command with -v or --trace -

Thanks for the sugegstions

I ran the curl with -v option

[azuki@AlmaDevVM Key_Server_Module]$ curl -v -d @Test_Inputs/iOS/spc_v3_ios_uhd_no_lease_2048.json localhost:8080/fps
*   Trying ::1:8080...
* Connected to localhost (::1) port 8080 (#0)
> POST /fps HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.76.1
> Accept: */*
> Content-Length: 5947
> Content-Type: application/x-www-form-urlencoded
>
* Empty reply from server
* Closing connection 0
curl: (52) Empty reply from server
[azuki@AlmaDevVM Key_Server_Module]$

Also when I checked httpd logs I do see a couple of errors.

[DEBUG] ❌ Assertion failure: paramErr (-42585) [src/parse_certificates.swift:36]
src/parse_certificates.swift:13: Fatal error: 'try!' expression unexpectedly raised an error: src.FPSStatus.paramErr
[Thu Jan 22 04:17:30.168292 2026] [core:notice] [pid 1004898:tid 1004898] AH00051: child pid 1009053 exit signal Illegal instruction (4), possible coredump in /etc/httpd
timestamp="2026-01-22 04:18:01,830",FP_TOOLN="fpssdk",FP_TOOLV="26.0.0",FP_PID="1021431",FP_FL="parse_certificates.swift",FP_LN="35",FP_ERRCODE="-42585",Error reading certificate file (../credentials/test_certificates.json): Error Domain=NSCocoaErrorDomain Code=260 "The file doesn’t exist."UserInfo={NSUnderlyingError=Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory", NSURL=../credentials/test_certificates.json -- file:///home/azuki/, NSFilePath=/home/credentials/test_certificates.json}
[DEBUG] ❌ Assertion failure: paramErr (-42585) [src/parse_certificates.swift:36]
src/parse_certificates.swift:13: Fatal error: 'try!' expression unexpectedly raised an error: src.FPSStatus.paramErr
[Thu Jan 22 04:18:03.204641 2026] [core:notice] [pid 1004898:tid 1004898] AH00051: child pid 1021431 exit signal Illegal instruction (4), possible coredump in /etc/httpd
timestamp="2026-01-27 15:05:22,145",FP_TOOLN="fpssdk",FP_TOOLV="26.0.0",FP_PID="1021588",FP_FL="parse_certificates.swift",FP_LN="35",FP_ERRCODE="-42585",Error reading certificate file (../credentials/test_certificates.json): Error Domain=NSCocoaErrorDomain Code=260 "The file doesn’t exist."UserInfo={NSUnderlyingError=Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory", NSURL=../credentials/test_certificates.json -- file:///home/azuki/, NSFilePath=/home/credentials/test_certificates.json}
[DEBUG] ❌ Assertion failure: paramErr (-42585) [src/parse_certificates.swift:36]
src/parse_certificates.swift:13: Fatal error: 'try!' expression unexpectedly raised an error: src.FPSStatus.paramErr
[Tue Jan 27 15:05:23.587233 2026] [core:notice] [pid 1004898:tid 1004898] AH00051: child pid 1021588 exit signal Illegal instruction (4), possible coredump in /etc/httpd
timestamp="2026-01-27 15:06:10,198",FP_TOOLN="fpssdk",FP_TOOLV="26.0.0",FP_PID="1182129",FP_FL="parse_certificates.swift",FP_LN="35",FP_ERRCODE="-42585",Error reading certificate file (../credentials/test_certificates.json): Error Domain=NSCocoaErrorDomain Code=260 "The file doesn’t exist."UserInfo={NSUnderlyingError=Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory", NSFilePath=/home/credentials/test_certificates.json, NSURL=../credentials/test_certificates.json -- file:///home/azuki/}
[DEBUG] ❌ Assertion failure: paramErr (-42585) [src/parse_certificates.swift:36]
src/parse_certificates.swift:13: Fatal error: 'try!' expression unexpectedly raised an error: src.FPSStatus.paramErr
[Tue Jan 27 15:06:11.639857 2026] [core:notice] [pid 1004898:tid 1004898] AH00051: child pid 1182129 exit signal Illegal instruction (4), possible coredump in /etc/httpd
timestamp="2026-01-27 15:07:13,904",FP_TOOLN="fpssdk",FP_TOOLV="26.0.0",FP_PID="1009073",FP_FL="parse_certificates.swift",FP_LN="35",FP_ERRCODE="-42585",Error reading certificate file (../credentials/test_certificates.json): Error Domain=NSCocoaErrorDomain Code=260 "The file doesn’t exist."UserInfo={NSFilePath=/home/credentials/test_certificates.json, NSURL=../credentials/test_certificates.json -- file:///home/azuki/, NSUnderlyingError=Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}
[DEBUG] ❌ Assertion failure: paramErr (-42585) [src/parse_certificates.swift:36]
src/parse_certificates.swift:13: Fatal error: 'try!' expression unexpectedly raised an error: src.FPSStatus.paramErr
[Tue Jan 27 15:07:15.708569 2026] [core:notice] [pid 1004898:tid 1004898] AH00051: child pid 1009073 exit signal Illegal instruction (4), possible coredump in /etc/httpd

I hope this helps to understand what might be the issue.

Facing issue with fairplay Streaming server SDK 26.0.0
 
 
Q