AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1727719
Accepted
ArthurG
ArthurG
Asked: 2022-06-22 16:44:46 +0800 CST2022-06-22 16:44:46 +0800 CST 2022-06-22 16:44:46 +0800 CST

无法让 Mac 上的 Chrome 浏览器通过 SSL/TLS 安全连接到 Centos 上的 Apache 2.4

  • 772

我们运营多个运行 Leaf webapp 的站点。我们的配置在 Centos 7.9 上运行,带有 .NET Web API 和 Apache 2.4。

该系统仅供访问我们内部网的员工使用。它使用自签名的机构根证书、中间证书和由中间证书签名(颁发)的服务器证书。openssl显示链:

$ openssl s_client -connect leaf.ourdomain:443 -showcerts -CAfile path_to_root_cert/RootCert.cer 2> /dev/null | egrep "Certificate chain| s:| i:"
Certificate chain
 0 s:/CN=leaf.ourdomain
   i:/DC=org/DC=our_dc/CN=Our system CA
 1 s:/DC=org/DC=our_dc/CN=Our system CA
   i:/CN=Our System

我混淆了我们机构的名称,但其他一切都保持不变。

Chrome 在 Mac 上运行并配置为使用 Mac 的钥匙串访问应用程序中的根证书。这为 Leaf 的生产部署获得了安全的私有连接。

我正在配置生产系统的 VM 克隆。我们创建了一个新的私钥和一个由中间证书签名的服务器证书。httpd.conf已修改为新域名。服务器证书、私钥和中间证书已存储在服务器上,这些 httpd 属性现在指向它们:

  SSLCertificateFile "/etc/pki/tls/certs/omop-leaf-temp_hpc_our_domain_ssl.cer"
  SSLCertificateKeyFile "/etc/pki/tls/private/omop-leaf-temp_hpc_our_domain_ssl.key"
  SSLCertificateChainFile "/etc/pki/tls/certs/Intermediate.cer"

服务器的域名似乎要签出。混淆了,就是omop-leaf-temp.hpc.our_domain。该名称用于 1) https 请求的 URL,2) Chrome 报告的错误消息,以及 3 ) CN. SSLCertificateFile这证实了

$ openssl x509 -text -in ./omop-leaf-temp_xxxx.cer| grep CN= | grep omop
        Subject: C=US, ST=xxx, L=xxx, O=Our System, OU=xxx, CN=-hpc.our_domain/emailAddress=leaf-support@xxx

但是获取到生产系统的安全连接的 Chrome 实例在 VM 克隆中无法这样做: Chrome 无法与 VM 克隆中的服务器建立安全连接

“PEM 编码链”标识 3 个证书。按顺序,它们是SSLCertificateFile,SSLCertificateChainFile和 Chrome 通过 Keychain Access 获得的我们的自签名根证书(我猜想)。这对我来说似乎很好。

httpdChrome 尝试连接时不会在日志中报告错误(包括error_log、leaf_access_log和)。是。leaf_ssl_error_logLogLevelwarn

我很困惑。为什么 Chrome 会报告Your connection is not private以及NET::ERR_CERT_COMMON_NAME_INVALIDCN 正确且证书链良好的情况?我可以做些什么来进一步调查和解决这个问题?

谢谢

google-chrome security
  • 2 2 个回答
  • 50 Views

2 个回答

  • Voted
  1. Ram
    2022-06-22T17:01:58+08:002022-06-22T17:01:58+08:00

    通用名称看起来不对:

    ./omop-leaf-temp_xxxx.cer| grep CN= | grep omop 主题:C=US, ST=xxx, L=xxx, O=Our System, OU=xxx, CN= "

    但是“-hpc.our_domain/emailAddress=leaf-support@x”与“omop-leaf-temp.hpc.our_domain”有很大不同

    • 0
  2. Best Answer
    ArthurG
    2022-06-28T14:57:43+08:002022-06-28T14:57:43+08:00

    正如@dave_thompson_085 所指出的,服务器的证书需要有一个包含服务器名称的 SubjectAlternativeName (SAN) 扩展。

    这使 Chrome(版本 102.0.5005.115)和 Safari(版本 15.0)都可以与服务器建立安全连接。

    证书是使用创建的

    openssl req \
    -newkey rsa:4096 \
    -nodes \
    -keyout omop-leaf-temp_redacted.key \
    -out omop-leaf-temp_redacted.csr \
    -config csr_with_san.conf \
    -days 730 \
    -batch \
    -verbose
    

    使用这个配置文件

    [ req ]
    default_bits              = 2048
    default_md              = sha256
    distinguished_name    = req_distinguished_name
    req_extensions     = req_ext
    prompt = no
    
    [ req_distinguished_name ]
    countryName                 = US
    stateOrProvinceName       = New York
    localityName                  = New York City
    organizationName          = redacted
    organizationalUnitName  = redacted
    commonName                  = omop-leaf-temp.redacted
    emailAddress                  = redacted
    
    [ req_ext ]
    subjectAltName          = @alt_names
    
    [alt_names]
    DNS.1                   = omop-leaf-temp.redacted
    

    我敦促评估客户端是否已建立安全连接的代码的开发人员提供明确的错误,表明证书需要 SAN 而不是不正确的错误ERR_CERT_COMMON_NAME_INVALID。

    • 0

相关问题

  • Chrome 密码和子目录

  • 如何强制chrome在macos中使用pac文件?

  • 校验和失败——Fedora 29 或旋转 KDE Plasma

  • 浏览器不会在 Windows 7 64 位操作系统上获得压缩页面

  • Jupyter 笔记本中的字体已更改

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve