title: Couldn't able to connect to APNS Sandbox server
body: <p>I am trying to  connect to Apple APNS server with the following observations:</p>
  
  <p>1)port 2195 is open 2)With Valid key passphrase for APNS_SSLCertificate_Key.pem 3)Entrust certificate (2048) downloaded from <code>https://www.entrust.net/downloads/binary/entrust_ssl_ca.cer</code></p>
  
  <p>4)With the successful telnet response as below :</p>
  
  <blockquote>
    <p>$ telnet gateway.sandbox.push.apple.com 2195 Trying 17.172.232.226...
    Connected to gateway.sandbox.push-apple.com.akadns.net. Escape
    character is '^]'.</p>
  </blockquote>
  
  <p>But when i run the following openssl command in my server to test the APNS connectivity :</p>
  
  <pre><code>openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert  APNS_SSLCertificate_Key.pem -debug -showcerts -CAfile server-ca-cert.pem
  </code></pre>
  
  <p>I am getting error as follows:</p>
  
  <blockquote>
    <p>unable to load certificate 57013:error:0906D06C:PEM
    routines:PEM_read_bio:no start
    line:/SourceCache/OpenSSL098/OpenSSL098-35/src/crypto/pem/pem_lib.c:650:Expecting:
    TRUSTED CERTIFICATE</p>
  </blockquote>
  
  <p>So please suggest how to resolve this problem</p>
  
  <p>Thanks in advance ......</p>