X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fcrypto%2FremoteSigner.cpp;h=1c32ba0ed513f877f13811557865cb7989da49f7;hb=e0713d1539887566e0ea7d85942c305ec727c9dd;hp=a8907115dd89b475d222103e0357aa9f757e666b;hpb=e6410538775681e2ec88521f05e530b79e8cbe7b;p=cassiopeia.git diff --git a/src/crypto/remoteSigner.cpp b/src/crypto/remoteSigner.cpp index a890711..1c32ba0 100644 --- a/src/crypto/remoteSigner.cpp +++ b/src/crypto/remoteSigner.cpp @@ -92,8 +92,8 @@ std::shared_ptr RemoteSigner::sign( std::shared_ptr(); } } @@ -107,7 +107,7 @@ std::shared_ptr RemoteSigner::sign( std::shared_ptr RemoteSigner::sign( std::shared_ptr pem( PEM_read_bio_X509( bios.get(), NULL, 0, NULL ) ); if( !pem ) { - throw "Pem was not readable"; + throw std::runtime_error("Pem was not readable"); } std::shared_ptr ser( ASN1_INTEGER_to_BN( pem->cert_info->serialNumber, NULL ), BN_free ); @@ -169,7 +169,7 @@ std::pair, std::string> RemoteSigner::revoke( std::shared_p std::string date; if( static_cast( head.command ) != RecordHeader::SignerResult::REVOKED ) { - throw "Protocol violation"; + throw std::runtime_error("Protocol violation"); } const unsigned char* buffer2 = reinterpret_cast( payload.data() ); @@ -196,7 +196,7 @@ std::pair, std::string> RemoteSigner::revoke( std::shared_p payload = parseCommandChunked( head, conn ); if( static_cast( head.command ) != RecordHeader::SignerResult::FULL_CRL ) { - throw "Protocol violation"; + throw std::runtime_error("Protocol violation"); } std::string name_bak = ca->path + std::string( "/ca.crl.bak" );