I have written a simple HTML code to play an audio file using the HTML5 audio tag on IPhone.
<audio controls="controls" autoplay="autoplay">
<source src="http://192.168.1.130/ab.wav>" type="audio/wav" preload="auto"/>
Your browser does not support the audio element.
</audio>
The above code works perfectly fine over safari. The problem comes when I change the Source URL from HTTP to HTTPS.
I started getting "This movie could not be played" error message.
I am using a certificate chain which is as follows:
VeriSign Trial Secure Server Root CA - G2 -> VeriSign Trial Secure Server CA - G2 -> ucbu-aricent-vm200
The certificate of the Root CA (above) is not available in Safari by default.
So I had attached the certificate for the certificate authority (both Root and Intermediate) to an email, and then added them in IPhone by clicking the attachments in the email.
But still I see that the SSL Handshake fails when Safari created a TCP session to transfer the WAV file.
NOTE: The SSL handshake goes successful when the TCP session is created to fetch the HTML file from the server. I had compared the network packets of the SSL handshake of HTML and WAV file scenarios and both of them were identical.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…