+ std::shared_ptr<BIO> conn = openSerial( serialPath );
+ std::shared_ptr<BIO> slip1( BIO_new( toBio<SlipBIO>() ), BIO_free );
+ static_cast<SlipBIO*>( slip1->ptr )->setTarget( std::shared_ptr<OpensslBIO>( new OpensslBIOWrapper( conn ) ) );
+
+ DefaultRecordHandler* dh = new DefaultRecordHandler( std::shared_ptr<Signer>( new SimpleOpensslSigner( ) ), slip1 );
+
+ while( true ) {
+ try {
+ dh->handle();
+ //} catch( const std::exception &ch ) {
+ //std::cout << "Real exception: " << typeid(ch).name() << ", " << ch.what() << std::endl;
+ } catch( char const* ch ) {
+ std::cout << "Exception: " << ch << std::endl;
+ }
+ }
+
+ return -1;