Allow CryptoExceptions to be fatal

This commit is contained in:
Keegan McAllister
2012-03-26 21:02:23 -04:00
parent 519d1ee282
commit ba6387f36c
3 changed files with 15 additions and 5 deletions
+5 -1
View File
@@ -592,7 +592,11 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network
fprintf( stderr, "%s: %s\n", e.function.c_str(), strerror( e.the_errno ) );
spin();
} catch ( Crypto::CryptoException e ) {
fprintf( stderr, "Crypto exception: %s\n", e.text.c_str() );
if ( e.fatal ) {
throw;
} else {
fprintf( stderr, "Crypto exception: %s\n", e.text.c_str() );
}
}
}
}