Skip to content

Commit

Permalink
HPCC-27255 TLS cert/key as buffers 3
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Kelly <[email protected]>
  • Loading branch information
mckellyln committed Sep 7, 2023
1 parent fb17ee0 commit 9ab52fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion esp/bindings/SOAP/Platform/soapbind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static IPropertyTree *createSecClientConfigBuf(const char *clientCertBuf, const
if (!isEmptyString(caCertsBuf))
{
IPropertyTree *ca = ensurePTree(verify, "ca_certificates");
ca->setProp("@pem", caCertsBuf);
ca->setProp("pem", caCertsBuf);
}
verify->setPropBool("@enable", true);
verify->setPropBool("@accept_selfsigned", acceptSelfSigned);
Expand Down
4 changes: 3 additions & 1 deletion system/security/securesocket/securesocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,8 @@ static bool isPEMBuffer(const char *certBuf)
// -----BEGIN PRIVATE KEY-----
// -----BEGIN RSA PRIVATE KEY-----
// -----BEGIN CERTIFICATE-----
// or maybe just:
// -----BEGIN

if ( (strstr(certBuf, "-----BEGIN PRIVATE KEY-----")) ||
(strstr(certBuf, "-----BEGIN RSA PRIVATE KEY-----")) ||
Expand Down Expand Up @@ -1528,7 +1530,7 @@ class CSecureSocketContext : implements ISecureSocketContext, public CInterface

if(m_verify)
{
const char *cacertbuf = config->queryProp("verify/ca_certificates/@pem");
const char *cacertbuf = config->queryProp("verify/ca_certificates/pem");
if (cacertbuf && *cacertbuf)
{
// can have multiple certs in buffer
Expand Down

0 comments on commit 9ab52fe

Please sign in to comment.