<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.StylE-mailovZprvy17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="CS" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am trying to renew a certificate via CMP and authenticate the request using the same cert.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I start the mock server:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">openssl cmp -port 8080 -srv_trusted test-ca-cert.pem \<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">            -srv_key test-server-key.pem -srv_cert test-server-cert.pem \<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">            -rsp_cert test-client-cert2.pem -rsp_capubs test-ca-cert.pem &<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">And run the client:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">openssl cmp -cmd kur -server localhost:8080/pkix/ -srvcert test-server-cert.pem \<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">            -key test-client-key.pem -cert test-my-cert.pem \<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">            -newkey test-client-key2.pem -certout test-my-cert2.pem<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">However, the CMP server(?) compares the serial number of the old client certificate with the serial of the new (enrolled) certificate and fails. (I can make the enrollment succeed if I force the old and the new certificate
 to have the same serial.)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">CMP error: received error:PKIStatus: rejection; PKIFailureInfo: badRequest; StatusString: "wrong certid"; errorCode: 1D0000BD; errorDetails: CMP routines, wrong certid<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">What am I doing wrong, please? It is quite obvious the new certificate will have a different certid, isn’t it?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Petr<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>