File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1170,14 +1170,21 @@ async fn create_cluster_client(
11701170 ) ) ) ;
11711171 }
11721172 let mut combined_certs = Vec :: new ( ) ;
1173- for cert in & request. root_certs {
1173+ for ( i , cert) in request. root_certs . iter ( ) . enumerate ( ) {
11741174 if cert. is_empty ( ) {
11751175 return Err ( RedisError :: from ( (
11761176 ErrorKind :: InvalidClientConfig ,
11771177 "Root certificate cannot be empty byte string" ,
11781178 ) ) ) ;
11791179 }
1180+
1181+ // Add the certificate
11801182 combined_certs. extend_from_slice ( cert) ;
1183+
1184+ // Ensure proper PEM separation between certificates
1185+ if i < request. root_certs . len ( ) - 1 && !cert. ends_with ( b"\n " ) {
1186+ combined_certs. push ( b'\n' ) ;
1187+ }
11811188 }
11821189
11831190 // DEBUG: Print certificate content for cluster connections
You can’t perform that action at this time.
0 commit comments