简体   繁体   English

从 Digital Ocean 下载的 .crt CA 证书文件放在哪里,用于连接到其托管 PostgreSQL 服务器的 SSL

[英]Where to put the .crt CA certificate file downloaded from Digital Ocean for a SSL connection to their Managed PostgreSQL server

In a simple HelloWorld app using JDBC to make a connection to the Managed PostgreSQL servers by Digital Ocean, where does one place the downloaded ca-certificate.crt file downloaded from their "Getting Started" page?在一个简单的 HelloWorld 应用程序中,使用 JDBC 连接到 Digital Ocean 托管的 PostgreSQL服务器,从他们的“入门”页面下载的ca-certificate.crt文件放在哪里?

I assume the JDBC driver needs access to the certificate to make an encrypted SSL (TLS) connection to the database server.我假设 JDBC 驱动程序需要访问证书才能与数据库服务器建立加密的 SSL (TLS) 连接。 But how do I make the certificate available to the JDBC driver during development and at deployment?但是,如何在开发和部署期间使证书对 JDBC 驱动程序可用?

You have different "factories" to choose from.你有不同的“工厂”可供选择。 If you use LibPQFactory (which may or may not be the default, depending on what sentence of the docs you trust), then you put the cert in the same place as you put it for libpq, ie for psql, which varies by your OS.如果您使用 LibPQFactory(它可能是默认值,也可能不是默认值,具体取决于您信任的文档的哪一句),那么您将证书放在与 libpq 相同的位置,即 psql,这因您的操作系统而异. If you use a different factory, then you need to jump through keytool's hoops, as described in the docs .如果您使用不同的工厂,那么您需要跳过 keytool 的箍,如 文档中所述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 SSL 证书 (ca-cert) 添加到 node.js 环境变量以连接到 Digital Ocean Postgres 托管数据库? - How to add an SSL certificate (ca-cert) to node.js environment variables in order to connect to Digital Ocean Postgres Managed Database? 如何使用 SSL 和 Nodejs 为 Digital Ocean 托管的 Postgres 数据库创建连接池? - How to Create Connection Pools for Digital Ocean Managed Postgres Database using SSL with Nodejs? 配置 `DataSource` 以使用 SSL/TLS 加密连接到 Digital Ocean 上的托管 Postgres 服务器 - Configure a `DataSource` to connect to a managed Postgres server on Digital Ocean with SSL/TLS encryption TypeORM - PostgreSQL - 数字海洋 - MustBeEntityError - TypeORM - PostgreSQL - Digital Ocean - MustBeEntityError 如何将Django项目和PostgreSQL从本地主机部署到Digital Ocean - How to deploy django project and postgreSQL from localhost to Digital ocean 远程Postgres数据库Heroku连接因Digital Ocean实例而变慢 - Remote Postgres Database Heroku Connection is slow from Digital Ocean Instance 备份运行在 Digital Ocean 上的容器中的 PostgreSQL 数据库 - Backup PostgreSQL database running in a container on Digital Ocean 从需要 ssl 和 ssl 模式的托管 postgresql 实例转储 - Dump from a managed postgresql instance with ssl and ssl mode required Jetty + HikariCP + JVM SSL 连接问题到具有 RDS 2019 CA 根证书的 RDS PostgreSQL - Jetty + HikariCP + JVM SSL Connectivity Issues to RDS PostgreSQL with RDS 2019 CA root certificate Postgresql-100%确定与服务器使用SSL连接吗? - Postgresql - 100% sure to use SSL connection with server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM