Skip to content

Commit

Permalink
HPCC-33260 missing "cert" validation check/skip and review changes
Browse files Browse the repository at this point in the history
Add check for "cert" configuration to avoid legacy
environment.conf check.

Review changes

Signed-off-by: Jake Smith <[email protected]>
  • Loading branch information
jakesmith committed Jan 20, 2025
1 parent c3a3002 commit a50602f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 2 additions & 4 deletions fs/dafilesrv/dafilesrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,14 +585,12 @@ int main(int argc, const char* argv[])
rowServiceConfiguration = daFileSrv->queryProp("@rowServiceConfiguration");

// merge in bare-metal dafilesrv component expert settings
IPropertyTree *componentExpert = nullptr;
componentExpert = daFileSrv->queryPropTree("expert");
IPropertyTree *componentExpert = daFileSrv->queryPropTree("expert");
if (componentExpert)
synchronizePTree(expert, componentExpert, false, true);

// merge in bare-metal dafilesrv component cert settings into newConfig
IPropertyTree *componentCert = nullptr;
componentCert = daFileSrv->queryPropTree("cert");
IPropertyTree *componentCert = daFileSrv->queryPropTree("cert");
if (componentCert)
{
IPropertyTree *cert = ensurePTree(newConfig, "cert");
Expand Down
8 changes: 6 additions & 2 deletions fs/dafsserver/dafsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static ISecureSocket *createSecureSocket(ISocket *sock, bool disableClientCertVe
}
else
{
IPropertyTree *cert = getComponentConfigSP()->getPropTree("cert");
Owned<IPropertyTree> cert = getComponentConfigSP()->getPropTree("cert");
if (cert)
{
Owned<ISyncedPropertyTree> certSyncedWrapper = createSyncedPropertyTree(cert);
Expand Down Expand Up @@ -5459,7 +5459,11 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface
securitySettings.privateKey = nullptr;
}
}
else
else if (!isContainerized() && getComponentConfigSP()->hasProp("cert"))
{
// validated when context is created in createSecureSocket
}
else // using environment.conf HPCCCertificateFile etc.
validateSSLSetup();
#endif

Expand Down

0 comments on commit a50602f

Please sign in to comment.