diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 8a92ecd55e4dfb2dfa4e133ce586a512cd3b5d25..ba02d73f3aa4348ae351c03d08f51ce0a94d1260 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -1882,7 +1882,7 @@ void passthru_input_thread(void* arg) if(i == 0) { - lprintf(LOG_NOTICE,"Node %d passthru disconnected", sbbs->cfg.node_num); + lprintf(LOG_NOTICE,"Node %d SSH passthru disconnected", sbbs->cfg.node_num); break; } @@ -4606,15 +4606,15 @@ void DLLCALL bbs_thread(void* arg) /* Couldn't do that... create a new context and use the key from there... */ if(!cryptStatusOK(i=cryptCreateContext(&ssh_context, CRYPT_UNUSED, CRYPT_ALGO_RSA))) { - lprintf(LOG_ERR,"Cryptlib error %d creating context",i); + lprintf(LOG_ERR,"SSH Cryptlib error %d creating context",i); goto NO_SSH; } if(!cryptStatusOK(i=cryptSetAttributeString(ssh_context, CRYPT_CTXINFO_LABEL, "ssh_server", 10))) { - lprintf(LOG_ERR,"Cryptlib error %d setting key label",i); + lprintf(LOG_ERR,"SSH Cryptlib error %d setting key label",i); goto NO_SSH; } if(!cryptStatusOK(i=cryptGenerateKey(ssh_context))) { - lprintf(LOG_ERR,"Cryptlib error %d generating key",i); + lprintf(LOG_ERR,"SSH Cryptlib error %d generating key",i); goto NO_SSH; } @@ -5029,31 +5029,34 @@ NO_SSH: if(ssh) { if(!cryptStatusOK(i=cryptCreateSession(&sbbs->ssh_session, CRYPT_UNUSED, CRYPT_SESSION_SSH_SERVER))) { - lprintf(LOG_WARNING,"%04d Cryptlib error %d creating session", client_socket, i); + lprintf(LOG_WARNING,"%04d SSH Cryptlib error %d creating session", client_socket, i); close_socket(client_socket); continue; } if(!cryptStatusOK(i=cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_PRIVATEKEY, ssh_context))) { - lprintf(LOG_WARNING,"%04d Cryptlib error %d setting private key",client_socket, i); + lprintf(LOG_WARNING,"%04d SSH Cryptlib error %d setting private key",client_socket, i); cryptDestroySession(sbbs->ssh_session); close_socket(client_socket); continue; } /* Accept any credentials */ if(!cryptStatusOK(i=cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_AUTHRESPONSE, 1))) { - lprintf(LOG_WARNING,"%04d Cryptlib error %d setting AUTHRESPONSE",client_socket, i); + lprintf(LOG_WARNING,"%04d SSH Cryptlib error %d setting AUTHRESPONSE",client_socket, i); cryptDestroySession(sbbs->ssh_session); close_socket(client_socket); continue; } if(!cryptStatusOK(i=cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_NETWORKSOCKET, client_socket))) { - lprintf(LOG_WARNING,"%04d Cryptlib error %d setting socket",client_socket, i); + lprintf(LOG_WARNING,"%04d SSH Cryptlib error %d setting socket",client_socket, i); cryptDestroySession(sbbs->ssh_session); close_socket(client_socket); continue; } if(!cryptStatusOK(i=cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_ACTIVE, 1))) { - lprintf(LOG_WARNING,"%04d Cryptlib error %d setting session active",client_socket, i); + if(i==CRYPT_ERROR_BADDATA) + lprintf(LOG_NOTICE,"%04d SSH Bad/unrecognised data format", client_socket); + else + lprintf(LOG_WARNING,"%04d SSH Cryptlib error %d setting session active",client_socket, i); cryptDestroySession(sbbs->ssh_session); close_socket(client_socket); continue;