In the latest entry blog about Apple Push Notifications, I show how use certificates to authenticate against Apple Push Servers.
First enter in your developer account and create a new certificate for Apple Push Notification service
Once you have downloaded your certificate, the sgcWebSockets HTTP/2 client allows to use 2 security IOHandlers (only for windows, for other personalities only openSSL is supported).
- OpenSSL
- SChannel (only for windows)
OpenSSL
If you use openSSL, you must deploy the openSSL libraries with your application. Before set the certificate with the TsgcHTTP2Client, first this certificate must be converted to PEM format because openSSL doesn't allow to import P12 certificates directly.
Use the following commands to convert a single P12 certificate to a certificate in PEM format and a private key file
create PEM certificate file
openssl pkcs12 -in INFILE.p12 -out OUTFILE.crt -nokeys
Create Private Key file
openssl pkcs12 -in INFILE.p12 -out OUTFILE.key -nodes -nocerts
Once you have your certificate and private key in PEM format, you can configure the TsgcHTTP2Client as follows.
SChannel
If you use SChannel there is no need to deploy any libraries and the certificate downloaded from Apple can be directly imported without the need of a previous conversion to PEM format.