845ebe2014-11-03Martin Nilsson #pike 8.1 #ifdef SSL3_DEBUG #define SSL3_DEBUG_MSG(X ...) werror(X) #else /*! SSL3_DEBUG */ #define SSL3_DEBUG_MSG(X ...) #endif /* SSL3_DEBUG */ inherit SSL.Context; // // --- Compat code below // protected Crypto.RSA.State compat_rsa; protected array(string(8bit)) compat_certificates; //! The servers default private RSA key.
3524712015-05-26Martin Nilsson //!
845ebe2014-11-03Martin Nilsson //! Compatibility, don't use. //! //! @deprecated find_cert //! //! @seealso //! @[`certificates], @[find_cert()]
db05e12014-11-03Martin Nilsson Crypto.RSA.State `rsa()
845ebe2014-11-03Martin Nilsson { return compat_rsa; } //! Set the servers default private RSA key. //! //! Compatibility, don't use. //! //! @deprecated add_cert //! //! @seealso //! @[`certificates=], @[add_cert()]
db05e12014-11-03Martin Nilsson void `rsa=(Crypto.RSA.State k)
845ebe2014-11-03Martin Nilsson { 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()]
db05e12014-11-03Martin Nilsson array(string(8bit)) `certificates()
845ebe2014-11-03Martin Nilsson { 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()]
db05e12014-11-03Martin Nilsson void `certificates=(array(string(8bit)) certs)
845ebe2014-11-03Martin Nilsson { 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()]
db05e12014-11-03Martin Nilsson Crypto.RSA.State `client_rsa()
845ebe2014-11-03Martin Nilsson { return compat_rsa; } //! Set the clients default private RSA key. //! //! Compatibility, don't use. //! //! @deprecated add_cert //! //! @seealso //! @[`client_certificates=], @[add_cert()]
db05e12014-11-03Martin Nilsson void `client_rsa=(Crypto.RSA.State k)
845ebe2014-11-03Martin Nilsson { 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()]
db05e12014-11-03Martin Nilsson array(array(string(8bit))) `client_certificates()
845ebe2014-11-03Martin Nilsson { 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()]
db05e12014-11-03Martin Nilsson void `client_certificates=(array(array(string(8bit))) certs)
845ebe2014-11-03Martin Nilsson { 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
db05e12014-11-03Martin Nilsson Crypto.DSA.State `dsa()
845ebe2014-11-03Martin Nilsson { return UNDEFINED; } //! Compatibility. //! @deprecated add_cert
db05e12014-11-03Martin Nilsson void `dsa=(Crypto.DSA.State k)
845ebe2014-11-03Martin Nilsson { 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
db05e12014-11-03Martin Nilsson void rsa_mode(int(0..)|void min_keylength)
845ebe2014-11-03Martin Nilsson { 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
db05e12014-11-03Martin Nilsson void dhe_dss_mode(int(0..)|void min_keylength)
845ebe2014-11-03Martin Nilsson { SSL3_DEBUG_MSG("SSL.Context: dhe_dss_mode()\n"); preferred_suites = get_suites(min_keylength, 1); }