<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div><br>Hi <span style="display: inline !important; float: none; background-color: transparent; color: rgb(0, 0, 0); font-family: arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;">Viktor,

Many thanks for your response.</span></div><div><br>We are using SSL_CTX_use_certificate() instead of <span style="display: inline !important; float: none; background-color: transparent; color: rgb(0, 0, 0); font-family: arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;">SSL_CTX_use_certificate_chain_file().
</span>Does it also support multiple certificate chains?<br></div><div>And as I know, OpenSSL 1.0.2 and later have a separate chain store for each type of certificate (RSA, ECC or DSA),<br>Is there any bad impact to call it multiple times for same type of certificate?<br></div><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><div><br></div><div>Best Regards,</div><div>Jane</div><pre><br>At 2018-11-20 23:44:59, "Viktor Dukhovni" <openssl-users@dukhovni.org> wrote:
>> On Nov 20, 2018, at 9:48 AM, maoly527 <maoly527@163.com> wrote:
>> 
>> Does anyone know how to use RSA and ECC certificate simultaneously in one server?
>
>You just configure two private keys and two certificate chains by calling:
>
>  if (SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0) {
>    /* error */;
>  }
>  if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0) {
>       /* error */;
>  }
>  if (SSL_CTX_check_private_key(ctx) != 0) {
>    /* error */;
>  } 
>
>once for each "cert_file" and associated "key_file" (the same file often
>holds both, in which case cert_file == key_file).  The SSL error stack
>will contain error details.
>
>The SSL library will automatically select the appropriate key and certificate
>chain.
>
>-- 
>    Viktor.
>
>-- 
>openssl-users mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
</pre></div><br><br><span title="neteasefooter"><p> </p></span>