X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_ssl_gnutls.cpp;h=1d2e8561bcbd7661f4cc6df57fcc14027c1dc1ac;hb=034f74a23b3d6aff177682c916e18382621f495a;hp=fc8429ee216a4935a0c1de29a1944b8edbfe96c2;hpb=db3665d03e35192510ddeef5c41762cf195d0609;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index fc8429ee2..1d2e8561b 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -33,6 +33,8 @@ bool isin(int port, const std::vector &portlist) return false; } +/** Represents an SSL user's extra data + */ class issl_session : public classbase { public: @@ -242,7 +244,7 @@ class ModuleSSLGnuTLS : public Module virtual Version GetVersion() { - return Version(1, 0, 0, 0, VF_VENDOR); + return Version(1, 1, 0, 0, VF_VENDOR, API_VERSION); } void Implements(char* List) @@ -475,7 +477,7 @@ class ModuleSSLGnuTLS : public Module // Bugfix, only send this numeric for *our* SSL users if(dest->GetExt("ssl", dummy) || (IS_LOCAL(dest) && isin(dest->GetPort(), listenports))) { - source->WriteServ("320 %s %s :is using a secure connection", source->nick, dest->nick); + ServerInstance->SendWhoisLine(source, 320, "%s %s :is using a secure connection", source->nick, dest->nick); } } @@ -614,11 +616,12 @@ class ModuleSSLGnuTLS : public Module unsigned int status; const gnutls_datum_t* cert_list; int ret; - unsigned int cert_list_size, name_size; + unsigned int cert_list_size; gnutls_x509_crt_t cert; char name[MAXBUF]; unsigned char digest[MAXBUF]; size_t digest_size = sizeof(digest); + size_t name_size = sizeof(name); ssl_cert* certinfo = new ssl_cert; user->Extend("ssl_cert",certinfo); @@ -703,12 +706,10 @@ class ModuleSSLGnuTLS : public Module return; } - name_size = sizeof(name); gnutls_x509_crt_get_dn(cert, name, &name_size); certinfo->data.insert(std::make_pair("dn",name)); - name_size = sizeof(name); gnutls_x509_crt_get_issuer_dn(cert, name, &name_size); certinfo->data.insert(std::make_pair("issuer",name));