-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Hi,
I am testing the Http2 library and having issues with connecting to Apple. The issue is in the following line of code:
await sslStream.AuthenticateAsClientAsync(
ConnectionSettings.Host,
ConnectionSettings.Certificates ?? new X509CertificateCollection(),
System.Security.Authentication.SslProtocols.Tls12,
false).ConfigureAwait(false);
The Error message is "The message received was unexpected or badly formatted" and when I use wireshark and look at the packets received I see that there is a Handshake issue reported by apple failure 40.
I am quite certain that the p12 file I have created is fine because I can use it on gateway.push.apple.com with port 2195 and it works fine. I have checked the certificate and it is production cert that supports HTTP2 it has the right info in the cert itself such as Apple Push Services. I was wondering have you managed to run the HTTP2 code successful to connect to apple at all? I have even installed the GeoTrust Global CA cert and that didn't help. I can verify and connect to apple using openssl as long as GeoTrust Global CA is attached to the call.
I am torn between some sort of issue in the P12 file although I think it was created properly or the fact that .net isn't sending the certificate information properly to apple. I saw that ALPN wasn't supported by .net just yet!!!
Appreciate your help.
Regards,
mike