<div class="__aliyun_email_body_block"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Only this one certificate, acutually this file is used for the iOS APNs function.</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">the weird thing is, I use the same file and same code on other 2 server, it work well. That is really confused me. </span></div><blockquote  style="margin-right:.0px;margin-top:.0px;margin-bottom:.0px;"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">------------------------------------------------------------------</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">发件人:Viktor Dukhovni <openssl-users@dukhovni.org></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">发送时间:2016年9月13日(星期二) 23:46</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">收件人:openssl-users <openssl-users@openssl.org></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">主 题:Re: [openssl-users] 回复:  [help]SSL_CTX_use_certificate_file failed!</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div>On Tue, Sep 13, 2016 at 10:53:57PM +0800, zy_chongqing wrote:<br ><br >> thanks for your reply. please kindly find the attached to get the certificate.<br ><br >Firstly, you posted a 2048-bit certificate, which would not normally<br >fail with a "key too small" error, other than by failure to parse<br >the public key.<br ><br >Secondly, when I start the OpenSSL 1.1.0 s_server(1) with the posted<br >certificate as the chain file, and a random 2048-bit RSA key as<br >the key file, the error is that the key and certificate don't match.<br >This means that at least s_server *is* able to parse the public<br >key.  Are there some other certificates in the chain file, in<br >addition to the leaf certificate you posted?  Please post all<br >the certificates (but not the private key) from that chain file.<br ><br >    $ openssl genrsa 2048 >> /tmp/cert.pem<br >    Generating RSA private key, 2048 bit long modulus<br >    ........................................................................+++<br >    ...............+++<br >    e is 65537 (0x010001)<br ><br >    $ openssl s_server -cert /tmp/cert.pem -accept 12345<br >    Using default temp DH parameters<br >    error setting private key<br >    140735148003328:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:../openssl/crypto/x509/x509_cmp.c:295:<br ><br >-- <br > Viktor.<br >-- <br >openssl-users mailing list<br >To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users</blockquote><div ><br ></div></div>