-
Notifications
You must be signed in to change notification settings - Fork 35
Add support for query operations #58
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
Conversation
Add Query operation and demo program. Add ssl_connect functions.
PeterHamilton
left a comment
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.
Overall I like most of the Query changes. I'll need to do a second pass to verify the correctness on most of the new functionality. Unit tests must be added for most of the new functions and existing unit tests should be modified for the existing functions that were modified.
I am less sure if we want to use the SSL modifications. The demo applications are just that, demonstrations of how to use the library. If a developer wants to augment or improve how SSL is handled, then they can incorporate that into their own applications.
|
|
||
| #define MAX_QUERY_LEN 128 | ||
| #define MAX_QUERY_OPS 0x40 | ||
| #define MAX_QUERY_OBJS 0x20 |
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.
Move these #define statements over with the others.
| char build_level[MAX_QUERY_LEN]; | ||
| char build_date[MAX_QUERY_LEN]; | ||
| char cluster_info[MAX_QUERY_LEN]; | ||
| } QueryResponse; |
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.
The fields in this struct don' correspond to the fields defined in the specification. Defining maximum array lengths also doesn't align with the repeating nature of some of these fields. Most of them should be linked lists that grow as needed to fit the encoding or user usage.
Don't use ssl_connect wrapper yet.
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.
Thanks for updating this pull request. While I would prefer the not implemented functions to be filled in, the surrounding additions are definitely worthwhile and I would like to see them added to the library.
That said, at a minimum the new encoding/decoding/compare functions must have unit tests associated with them. See here for an example of how the Create request payload encoding is tested.
I will not be able to merge this in until unit tests are added for:
kmip_compare_query_functionskmip_encode_query_functionskmip_encode_query_request_payloadkmip_decode_query_functionskmip_decode_operationskmip_decode_object_typeskmip_decode_server_informationkmip_decode_query_response_payload
Please also address the remaining comments on the kmip.h modifications. Thanks!
|
I should be able to work on this again soon. |
User Functions structure instead of LinkedList or QueryRequestPayload. Add decode/compare functions for more query functions. Add some decode/encode tests.
|
I'm still working on this. This is an intermediate drop with 4 tests added. |
|
With all the respect to the efforts, any chance to get this done? |
Add tests for querying server information and object types.
Add test for decode_query_response_payload
|
I think I've added the requested tests. |
PeterHamilton
left a comment
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.
Thank you for submitting the additional tests. This looks pretty well rounded and adds a lot of useful functionality.
Just address that one question on that final test case comparing query functions and this will be good to go.
Add Query operation and demo program.
Add ssl_connect functions.
This is just the query operation. Still need to look at the tests.