7 #include "simpleOpensslSigner.h"
11 #include "remoteSigner.h"
14 #include "recordHandler.h"
22 int handlermain( int argc, const char* argv[] );
24 extern std::string serialPath;
25 extern std::vector<Profile> profiles;
27 int main( int argc, const char* argv[] ) {
34 path = "/etc/cacert/cassiopeia/cassiopeia.conf";
39 if( parseConfig( path ) != 0 ) {
43 std::shared_ptr<int> ssl_lib = ssl_lib_ref;
45 if( serialPath == "" ) {
46 std::cout << "Error: no serial device is given" << std::endl;
50 std::shared_ptr<BIO> conn = openSerial( serialPath );
51 std::shared_ptr<BIO> slip1( BIO_new( toBio<SlipBIO>() ), BIO_free );
52 ( ( SlipBIO* )slip1->ptr )->setTarget( std::shared_ptr<OpensslBIO>( new OpensslBIOWrapper( conn ) ) );
55 DefaultRecordHandler* dh = new DefaultRecordHandler( std::shared_ptr<Signer>( new SimpleOpensslSigner( profiles[5] ) ), slip1 );
60 } catch( char const* ch ) {
61 std::cout << "Exception: " << ch << std::endl;