【问题标题】:How to disable SSLv3 for embedded Jetty server for Ring application?如何为 Ring 应用程序的嵌入式 Jetty 服务器禁用 SSLv3?
【发布时间】:2015-01-27 15:36:38
【问题描述】:

This answer 这个问题的 Java 版本 – How to disable the SSLv3 protocol in Jetty to prevent Poodle Attack – 涵盖了如何做到这一点,但是对于使用 Ring 和 Ring Jetty 适配器(使用嵌入式Jetty 版本 7?

【问题讨论】:

    标签: clojure jetty embedded-jetty ring poodle-attack


    【解决方案1】:

    这是我添加到包含我项目的 -main 函数的命名空间文件中的内容:

    (defn is-jetty-ssl-connector?
      [^org.eclipse.jetty.server.Connector c]
      (= (.getName (type c)) "org.eclipse.jetty.server.ssl.SslSelectChannelConnector"))
    
    (defn jetty-configurator
      [jetty-server]
      (doseq [c (filter is-jetty-ssl-connector? (.getConnectors jetty-server))]
        (.addExcludeProtocols (.getSslContextFactory c) (into-array String ["SSLv3"]))))
    

    添加到我的-main 函数中的jetty/run-jetty 函数调用的选项映射中:

    :configurator jetty-configurator
    

    我确认这似乎可以使用如下 cURL 命令来工作:

    curl -v3 -X HEAD https://localhost:443
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-03-03
    • 1970-01-01
    • 2020-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-16
    • 2016-08-30
    相关资源
    最近更新 更多