5 #include "db/database.h"
7 #include "crypto/simpleOpensslSigner.h"
8 #include "crypto/remoteSigner.h"
9 #include "crypto/sslUtil.h"
11 #include "io/slipBio.h"
12 #include "io/recordHandler.h"
22 extern std::string serialPath;
24 int main( int argc, const char* argv[] ) {
31 path = "/etc/cacert/cassiopeia/cassiopeia.conf";
36 if( parseConfig( path ) != 0 ) {
40 std::shared_ptr<int> ssl_lib = ssl_lib_ref;
42 if( serialPath == "" ) {
43 std::cout << "Error: no serial device is given" << std::endl;
47 std::shared_ptr<BIO> conn = openSerial( serialPath );
48 std::shared_ptr<BIO> slip1( BIO_new( toBio<SlipBIO>() ), BIO_free );
49 static_cast<SlipBIO*>( slip1->ptr )->setTarget( std::shared_ptr<OpensslBIO>( new OpensslBIOWrapper( conn ) ) );
51 DefaultRecordHandler* dh = new DefaultRecordHandler( std::shared_ptr<Signer>( new SimpleOpensslSigner( ) ), slip1 );
56 //} catch( const std::exception &ch ) {
57 //std::cout << "Real exception: " << typeid(ch).name() << ", " << ch.what() << std::endl;
58 } catch( char const* ch ) {
59 std::cout << "Exception: " << ch << std::endl;