Fix missing zero padding for generated CA serial

fixes #10074
This commit is contained in:
Michael Friedrich 2015-09-03 17:11:12 +02:00
parent ad33dcb07a
commit c953104783
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ boost::shared_ptr<X509> CreateCert(EVP_PKEY *pubkey, X509_NAME *subject, X509_NA
std::ofstream ofp;
ofp.open(serialfile.CStr());
ofp << std::hex << serial + 1;
ofp << std::hex << std::setw(2) << std::setfill('0') << serial + 1;
ofp.close();
if (ofp.fail())