Skip to content
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

Replace tpsclient with pki tps-client #4969

Merged
merged 2 commits into from
Feb 27, 2025
Merged

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Feb 27, 2025

Most of the code in tpsclient has been moved into libpki-tps.so (i.e. reverting commit 65d1a36) such that it can be reused by other tools. The main() function itself has been moved into tpsclient.cpp.

The pki tps-client has been added to replace tpsclient to make it easier to maintain TPS client code and to troubleshoot TPS issues. Currently it will simply reuse libpki-tps.so but in the future the native code will gradually be converted to Java.

The tpsclient has been deprecated and will be removed in the future.

The basic TPS test has been updated to test both pki tps-client and tpsclient.

/~https://github.com/edewata/pki/blob/tpsclient/docs/changes/v11.7.0/Tools-Changes.adoc

Most of the code in tpsclient has been moved into libpki-tps.so
(i.e. reverting commit 65d1a36)
such that it can be reused by other tools. The main() function
itself has been moved into tpsclient.cpp.
@edewata edewata requested a review from fmarco76 February 27, 2025 01:37
The pki tps-client has been added to replace tpsclient to make
it easier to maintain TPS client code and to troubleshoot TPS
issues. Currently it will simply reuse libpki-tps.so but in the
future the native code will gradually be converted to Java.

The tpsclient has been deprecated and will be removed in the
future.

The basic TPS test has been updated to test both pki tps-client
and tpsclient.
Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just minor comments

/**
* @author Endi S. Dewata
*/
public class TPSClientCLI extends CommandCLI {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TO be more in line with the other commands I think we should have tps-client-format and tps-client-enroll eliminating the need for the 2 additional scripts but this change can go in future PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the plan, but it will require some additional native -> Java conversion. We can add that later.


/* Shutdown NSS and NSPR */
NSS_Shutdown ();
PR_Cleanup ();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initialisation is done in CryptoManger during CLI initialisation but shutdown/cleanup is not present (at least I have not found). I guess there should be no effect since after the operations the command will exit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so far pki CLI is working just fine without it, but we can add it if necessary.

@edewata
Copy link
Contributor Author

edewata commented Feb 27, 2025

@fmarco76 Thanks!

@edewata edewata merged commit 2bb936b into dogtagpki:master Feb 27, 2025
170 of 177 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants