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";
40 if( parseConfig( path ) != 0 ) {
44 std::shared_ptr<int> ssl_lib = ssl_lib_ref;
46 if( serialPath == "" ) {
47 std::cout << "Error: no serial device is given" << std::endl;
51 std::shared_ptr<BIO> conn = openSerial( serialPath );
52 std::shared_ptr<BIO> slip1( BIO_new( toBio<SlipBIO>() ), BIO_free );
53 ( ( SlipBIO* )slip1->ptr )->setTarget( std::shared_ptr<OpensslBIO>( new OpensslBIOWrapper( conn ) ) );
56 DefaultRecordHandler* dh = new DefaultRecordHandler( std::shared_ptr<Signer>( new SimpleOpensslSigner( profiles[5] ) ), slip1 );
61 } catch( char const* ch ) {
62 std::cout << "Exception: " << ch << std::endl;