]> WPIA git - cassiopeia.git/blobdiff - src/io/opensslBIO.h
fmt: run format script excluding lambdas
[cassiopeia.git] / src / io / opensslBIO.h
index a3d7188c02e74800808994edaf98793007e0763c..46e3642bfc6feaba0ef3eb0e952cc5f474d1f6ca 100644 (file)
@@ -2,20 +2,29 @@
 
 #include <memory>
 #include "bios.h"
+#include <vector>
+#include <exception>
 
 class OpensslBIOWrapper : public OpensslBIO {
 private:
     std::shared_ptr<BIO> b;
+    std::vector<char> buffer;
+    int pos = 0;
 public:
     OpensslBIOWrapper( std::shared_ptr<BIO> b );
     virtual ~OpensslBIOWrapper();
 
-    int write( const charbuf, int num );
-    int read( charbuf, int size );
-    long ctrl( int cmod, long arg1, voidarg2 );
+    int write( const char *buf, int num );
+    int read( char *buf, int size );
+    long ctrl( int cmod, long arg1, void *arg2 );
 
-    int puts( const charstr );
-    int gets( charstr, int size );
+    int puts( const char *str );
+    int gets( char *str, int size );
 
-    static const char* getName();
+    static const char *getName();
+
+    std::string readLine();
+};
+
+class eof_exception : public std::exception {
 };