pike.git / lib / modules / SSL.pmod / Context.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Context.pike:917:   }      //! Remove a session from the cache.   void purge_session(Session s)   {    SSL3_DEBUG_MSG("SSL.Context->purge_session: %O\n", s->identity || "");    if (s->identity)    m_delete (session_cache, s->identity);    /* There's no need to remove the id from the active_sessions queue */   } -  -  - // - // --- Compat code below - // -  - protected Crypto.RSA.State compat_rsa; - protected array(string(8bit)) compat_certificates; -  - //! The servers default private RSA key. - //! - //! Compatibility, don't use. - //! - //! @deprecated find_cert - //! - //! @seealso - //! @[`certificates], @[find_cert()] - __deprecated__ Crypto.RSA.State `rsa() - { -  return compat_rsa; - } -  - //! Set the servers default private RSA key. - //! - //! Compatibility, don't use. - //! - //! @deprecated add_cert - //! - //! @seealso - //! @[`certificates=], @[add_cert()] - __deprecated__ void `rsa=(Crypto.RSA.State k) - { -  compat_rsa = k; -  if (k && compat_certificates) { -  catch { -  add_cert(k, compat_certificates); -  }; -  } - } -  - //! The server's certificate, or a chain of X509.v3 certificates, with - //! the server's certificate first and root certificate last. - //! - //! Compatibility, don't use. - //! - //! @deprecated find_cert - //! - //! @seealso - //! @[`rsa], @[find_cert()] - __deprecated__ array(string(8bit)) `certificates() - { -  return compat_certificates; - } -  - //! Set the servers certificate, or a chain of X509.v3 certificates, with - //! the servers certificate first and root certificate last. - //! - //! Compatibility, don't use. - //! - //! @deprecated add_cert - //! - //! @seealso - //! @[`rsa=], @[add_cert()] - __deprecated__ void `certificates=(array(string(8bit)) certs) - { -  compat_certificates = certs; -  -  if (compat_rsa && certs) { -  catch { -  add_cert(compat_rsa, certs); -  }; -  } - } -  - //! The clients RSA private key. - //! - //! Compatibility, don't use. - //! - //! @deprecated find_cert - //! - //! @seealso - //! @[`certificates], @[find_cert()] - __deprecated__ Crypto.RSA.State `client_rsa() - { -  return compat_rsa; - } -  - //! Set the clients default private RSA key. - //! - //! Compatibility, don't use. - //! - //! @deprecated add_cert - //! - //! @seealso - //! @[`client_certificates=], @[add_cert()] - __deprecated__ void `client_rsa=(Crypto.RSA.State k) - { -  compat_rsa = k; -  if (k && compat_certificates) { -  catch { -  add_cert(k, compat_certificates); -  }; -  } - } -  - //! The client's certificate, or a chain of X509.v3 certificates, with - //! the client's certificate first and root certificate last. - //! - //! Compatibility, don't use. - //! - //! @deprecated find_cert - //! - //! @seealso - //! @[`rsa], @[find_cert()] - __deprecated__ array(array(string(8bit))) `client_certificates() - { -  return compat_certificates && ({ compat_certificates }); - } -  - //! Set the client's certificate, or a chain of X509.v3 certificates, with - //! the client's certificate first and root certificate last. - //! - //! Compatibility, don't use. - //! - //! @deprecated add_cert - //! - //! @seealso - //! @[`rsa=], @[add_cert()] - __deprecated__ void `client_certificates=(array(array(string(8bit))) certs) - { -  compat_certificates = certs && (sizeof(certs)?certs[0]:({})); -  -  if (compat_rsa && certs) { -  foreach(certs, array(string(8bit)) chain) { -  catch { -  add_cert(compat_rsa, chain); -  }; -  } -  } - } -  - //! Compatibility. - //! @deprecated find_cert - __deprecated__ Crypto.DSA.State `dsa() - { -  return UNDEFINED; - } -  - //! Compatibility. - //! @deprecated add_cert - __deprecated__ void `dsa=(Crypto.DSA.State k) - { -  error("The old DSA API is not supported anymore.\n"); - } -  - //! Set @[preferred_suites] to RSA based methods. - //! - //! @param min_keylength - //! Minimum acceptable key length in bits. - //! - //! @seealso - //! @[dhe_dss_mode()], @[filter_weak_suites()] - //! - //! @deprecated get_suites - __deprecated__ void rsa_mode(int(0..)|void min_keylength) - { -  SSL3_DEBUG_MSG("SSL.Context: rsa_mode()\n"); -  preferred_suites = get_suites(min_keylength, 1); - } -  - //! Set @[preferred_suites] to DSS based methods. - //! - //! @param min_keylength - //! Minimum acceptable key length in bits. - //! - //! @seealso - //! @[rsa_mode()], @[filter_weak_suites()] - //! - //! @deprecated get_suites - __deprecated__ void dhe_dss_mode(int(0..)|void min_keylength) - { -  SSL3_DEBUG_MSG("SSL.Context: dhe_dss_mode()\n"); -  preferred_suites = get_suites(min_keylength, 1); - } +