Skip to content

Commit

Permalink
Fix missing zero padding for generated CA serial
Browse files Browse the repository at this point in the history
fixes #10074
  • Loading branch information
Michael Friedrich committed Sep 3, 2015
1 parent 35acba7 commit 9a2ae6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/base/tlsutility.cpp
Expand Up @@ -399,7 +399,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())
Expand Down

0 comments on commit 9a2ae6e

Please sign in to comment.