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

Add pki nss-cert-find --cert option #4539

Merged
merged 1 commit into from
Aug 11, 2023
Merged

Add pki nss-cert-find --cert option #4539

merged 1 commit into from
Aug 11, 2023

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Aug 11, 2023

The pki nss-cert-find has been updated to provide an option to search for a cert in NSS database based on an existing cert file. This can be used to check whether the cert has been imported into the NSS database and to get the nickname and trust flags assigned to the cert.

Copy link
Contributor

@ckelleyRH ckelleyRH left a comment

Choose a reason for hiding this comment

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

LGTM!

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 a minor comment but feel free to merge as it is.

}

public Collection<X509Certificate> findCertByDERCert(byte[] derCert) throws Exception {

Copy link
Member

Choose a reason for hiding this comment

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

Should never return more than one element so I would have preferred this to return an X509Certificate. The caller can add in the list.

The pki nss-cert-find has been updated to provide an option to
search for a cert in NSS database based on an existing cert file.
This can be used to check whether the cert has been imported into
the NSS database and to get the nickname and trust flags assigned
to the cert.
@sonarcloud
Copy link

sonarcloud bot commented Aug 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
7.6% 7.6% Duplication

@edewata
Copy link
Contributor Author

edewata commented Aug 11, 2023

@ckelleyRH @fmarco76 I updated the code. Thanks!

@edewata edewata merged commit b36c32e into dogtagpki:master Aug 11, 2023
148 of 149 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.

3 participants