]> WPIA git - cassiopeia.git/blobdiff - src/crypto/X509.cpp
fmt: Whitespace
[cassiopeia.git] / src / crypto / X509.cpp
index a068957b4071a2646f3d2b8d475b991aae8bdf4c..a617ac33ffddb21c7d471d9b251b0bfd6faf7f29 100644 (file)
@@ -247,9 +247,11 @@ std::shared_ptr<SignedCertificate> X509Cert::sign( std::shared_ptr<EVP_PKEY> caK
     //X509_print_fp( stdout, target.get() );
 
     std::shared_ptr<BIO> mem = std::shared_ptr<BIO>( BIO_new( BIO_s_mem() ), BIO_free );
+
     if( !mem ) {
         throw "Failed to allocate memory for the signed certificate.";
     }
+
     PEM_write_bio_X509( mem.get(), target.get() );
 
     BUF_MEM* buf = NULL;
@@ -259,6 +261,7 @@ std::shared_ptr<SignedCertificate> X509Cert::sign( std::shared_ptr<EVP_PKEY> caK
     res->certificate = std::string( buf->data, buf->data + buf->length );
 
     std::shared_ptr<BIGNUM> ser( ASN1_INTEGER_to_BN( target->cert_info->serialNumber, NULL ), BN_free );
+
     if( !ser ) {
         throw "Failed to retrieve certificate serial of signed certificate.";
     }