@@ -123,11 +123,14 @@ pub enum Host {
123
123
/// * `options` - Command line options used to configure the server.
124
124
/// * `application_name` - Sets the `application_name` parameter on the server.
125
125
/// * `sslcert` - Location of the client SSL certificate file.
126
+ /// * `sslcert_inline` - The contents of the client SSL certificate.
126
127
/// * `sslkey` - Location for the secret key file used for the client certificate.
128
+ /// * `sslkey_inline` - The contents of the client SSL key.
127
129
/// * `sslmode` - Controls usage of TLS. If set to `disable`, TLS will not be used. If set to `prefer`, TLS will be used
128
130
/// if available, but not used otherwise. If set to `require`, `verify-ca`, or `verify-full`, TLS will be forced to
129
131
/// be used. Defaults to `prefer`.
130
132
/// * `sslrootcert` - Location of SSL certificate authority (CA) certificate.
133
+ /// * `sslrootcert_inline` - The contents of the SSL certificate authority.
131
134
/// * `host` - The host to connect to. On Unix platforms, if the host starts with a `/` character it is treated as the
132
135
/// path to the directory containing Unix domain sockets. Otherwise, it is treated as a hostname. Multiple hosts
133
136
/// can be specified, separated by commas. Each host will be tried in turn when connecting. Required if connecting
@@ -638,6 +641,9 @@ impl Config {
638
641
return Err ( Error :: config_parse ( Box :: new ( InvalidValue ( "sslcert" ) ) ) ) ;
639
642
}
640
643
} ,
644
+ "sslcert_inline" => {
645
+ self . ssl_cert ( value. as_bytes ( ) ) ;
646
+ }
641
647
"sslkey" => match std:: fs:: read ( value) {
642
648
Ok ( contents) => {
643
649
self . ssl_key ( & contents) ;
@@ -646,6 +652,9 @@ impl Config {
646
652
return Err ( Error :: config_parse ( Box :: new ( InvalidValue ( "sslkey" ) ) ) ) ;
647
653
}
648
654
} ,
655
+ "sslkey_inline" => {
656
+ self . ssl_key ( value. as_bytes ( ) ) ;
657
+ }
649
658
"sslmode" => {
650
659
let mode = match value {
651
660
"disable" => SslMode :: Disable ,
@@ -665,6 +674,9 @@ impl Config {
665
674
return Err ( Error :: config_parse ( Box :: new ( InvalidValue ( "sslrootcert" ) ) ) ) ;
666
675
}
667
676
} ,
677
+ "sslrootcert_inline" => {
678
+ self . ssl_root_cert ( value. as_bytes ( ) ) ;
679
+ }
668
680
"host" => {
669
681
for host in value. split ( ',' ) {
670
682
self . host ( host) ;
0 commit comments