-
Notifications
You must be signed in to change notification settings - Fork 383
TAO support revocation lists #1830
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
base: master
Are you sure you want to change the base?
Changes from all commits
fe4d159
9724eee
499ac64
871d045
ee04ea4
7f5487a
ca58777
5d9ed94
58aa6ef
ad82b5e
ae13b49
2a1773c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -314,6 +314,9 @@ TAO::SSLIOP::Protocol_Factory::init (int argc, ACE_TCHAR* argv[]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
int private_key_type = -1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
int dhparams_type = -1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CORBA::String_var crl_path; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
int crl_type = -1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
int prevdebug = -1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Force the Singleton instance to be initialized/instantiated. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -411,6 +414,17 @@ TAO::SSLIOP::Protocol_Factory::init (int argc, ACE_TCHAR* argv[]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else if (ACE_OS::strcasecmp (argv[curarg], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ACE_TEXT("-SSLCRLFile")) == 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curarg++; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (curarg < argc) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
crl_type = parse_x509_file (ACE_TEXT_ALWAYS_CHAR(argv[curarg]), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
caoxiaolins marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
crl_path.out ()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+417
to
+426
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add error handling for missing argument. The command-line parsing should handle the case where no argument is provided after Apply this diff to improve error handling: else if (ACE_OS::strcasecmp (argv[curarg],
ACE_TEXT("-SSLCRLFile")) == 0)
{
curarg++;
if (curarg < argc)
{
crl_type = parse_x509_file (ACE_TEXT_ALWAYS_CHAR(argv[curarg]),
crl_path.out ());
+ if (crl_type == -1)
+ {
+ ORBSVCS_ERROR ((LM_ERROR,
+ ACE_TEXT ("TAO (%P|%t) - Invalid CRL file format ")
+ ACE_TEXT ("<%C>, must be PEM or ASN1\n"),
+ argv[curarg]));
+ return -1;
+ }
}
+ else
+ {
+ ORBSVCS_ERROR ((LM_ERROR,
+ ACE_TEXT ("TAO (%P|%t) - -SSLCRLFile requires a ")
+ ACE_TEXT ("filename argument\n")));
+ return -1;
+ }
} 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else if (ACE_OS::strcasecmp (argv[curarg], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ACE_TEXT("-SSLAuthenticate")) == 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -634,6 +648,27 @@ TAO::SSLIOP::Protocol_Factory::init (int argc, ACE_TCHAR* argv[]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (crl_path.in() != 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (ssl_ctx->load_crl_file(crl_path.in(), crl_type) != 1) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ORBSVCS_ERROR ((LM_ERROR, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ACE_TEXT ("TAO (%P|%t) - Unable to load crl file ") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ACE_TEXT ("<%C> in SSLIOP factory, errno = %C.\n"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
crl_path.in(), ERR_reason_error_string(ERR_get_error()))); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
caoxiaolins marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (TAO_debug_level > 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ORBSVCS_DEBUG ((LM_INFO, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ACE_TEXT ("TAO (%P|%t) - SSLIOP loaded crl file ") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ACE_TEXT("<%C>\n"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
crl_path.in())); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Load in the DH params. If there was a file explicitly specified, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// then we do that here, otherwise we load them in from the cert file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Note that we only do this on the server side, I think so we might | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.