7 #include "simpleOpensslSigner.h"
11 #include "remoteSigner.h"
14 #include "recordHandler.h"
22 extern std::string serialPath;
23 extern std::vector<Profile> profiles;
25 int main( int argc, const char* argv[] ) {
32 path = "/etc/cacert/cassiopeia/cassiopeia.conf";
37 if( parseConfig( path ) != 0 ) {
41 std::shared_ptr<int> ssl_lib = ssl_lib_ref;
43 if( serialPath == "" ) {
44 std::cout << "Error: no serial device is given" << std::endl;
48 std::shared_ptr<BIO> conn = openSerial( serialPath );
49 std::shared_ptr<BIO> slip1( BIO_new( toBio<SlipBIO>() ), BIO_free );
50 ( ( SlipBIO* )slip1->ptr )->setTarget( std::shared_ptr<OpensslBIO>( new OpensslBIOWrapper( conn ) ) );
53 DefaultRecordHandler* dh = new DefaultRecordHandler( std::shared_ptr<Signer>( new SimpleOpensslSigner( profiles[5] ) ), slip1 );
58 } catch( char const* ch ) {
59 std::cout << "Exception: " << ch << std::endl;