From beaf4797322f303f2c496fab2f4deab8f3435f85 Mon Sep 17 00:00:00 2001 From: Gio Date: Mon, 7 Nov 2016 14:14:28 +0100 Subject: [PATCH] Remove rotten code in rsloginhandler autologin --- libretroshare/src/rsserver/rsloginhandler.cc | 57 +------------------- 1 file changed, 2 insertions(+), 55 deletions(-) diff --git a/libretroshare/src/rsserver/rsloginhandler.cc b/libretroshare/src/rsserver/rsloginhandler.cc index fcd5965e4..b06021ce2 100644 --- a/libretroshare/src/rsserver/rsloginhandler.cc +++ b/libretroshare/src/rsserver/rsloginhandler.cc @@ -198,62 +198,9 @@ bool RsLoginHandler::tryAutoLogin(const RsPeerId& ssl_id,std::string& ssl_passwd return (status == 0); /******************** OSX KeyChain stuff *****************************/ -#else /* UNIX, but not HAS_GNOME_KEYRING or APPLE */ - -#ifdef TODO_CODE_ROTTEN - FILE* helpFile = RsDirUtil::rs_fopen(getAutologinFileName(ssl_id).c_str(), "r"); - - if(helpFile == NULL){ - std::cerr << "\nFailed to open help file\n" << std::endl; - return false; - } - - /* decrypt help */ - - int c ; - std::string passwd ; - while( (c = getc(helpFile)) != EOF ) - passwd += (char)c ; - - const int DAT_LEN = passwd.length(); - const int KEY_DAT_LEN = RsInitConfig::load_cert.length(); - unsigned char* key_data = (unsigned char*)RsInitConfig::load_cert.c_str(); - unsigned char* indata = new unsigned char[DAT_LEN]; - unsigned char* outdata = new unsigned char[DAT_LEN]; - - for(int i=0;i