-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADBDEV-6682: Implement TLS options for PXF external tables #141
base: pxf-6.x
Are you sure you want to change the base?
Conversation
{ | ||
const char *proto = get_pxf_protocol(); | ||
|
||
if (proto && strcmp(proto, "https") == 0 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (proto && strcmp(proto, "https") == 0 ) | |
if (proto && strcmp(proto, "https") == 0) |
{ | ||
const char *proto = getenv(ENV_PXF_PROTOCOL); | ||
|
||
if (proto == NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An opening bracket after if
should be in the next line - this is code style of PostgreSQL. As an alternative the brackets can be removed here
long verifypeer = PXF_DEFAULT_SSL_VERIFY_PEER; | ||
|
||
if (verify_peer_var != NULL) | ||
{ | ||
verifypeer = atol(verify_peer_var); | ||
} | ||
|
||
return verifypeer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to remove the verifypeer variable
long verifypeer = PXF_DEFAULT_SSL_VERIFY_PEER; | |
if (verify_peer_var != NULL) | |
{ | |
verifypeer = atol(verify_peer_var); | |
} | |
return verifypeer; | |
if (verify_peer_var != NULL) | |
{ | |
return atol(verify_peer_var); | |
} | |
return PXF_DEFAULT_SSL_VERIFY_PEER; |
@@ -116,6 +128,85 @@ get_pxf_port(void) | |||
return port; | |||
} | |||
|
|||
const char * | |||
get_pxf_ssl_keypasswd(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about only two functions
const char *getenv_char(const char *name, const char *default);
long getenv_long(const char *name, long default);
TLS options implemented for PXF external tables
The requirement for using TLS is implemented for PXF external tables. The
communication takes place between the segment node and the PXF server and is
pointless without the PXF server. The testing shall be done in conjunction with
PXF server changes and is out of scope for this commit.