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

#560 Enable removing NOC ICA certificates #567

Merged
merged 6 commits into from
May 6, 2024

Conversation

Abdulbois
Copy link
Collaborator

No description provided.

@Abdulbois Abdulbois force-pushed the #560-Enable-removing-ICA-certs branch 2 times, most recently from a6b15c8 to c90939e Compare April 24, 2024 15:57
Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
@Abdulbois Abdulbois force-pushed the #560-Enable-removing-ICA-certs branch from c90939e to 9bde610 Compare April 25, 2024 06:41
Enable actionlint job

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
@Abdulbois Abdulbois force-pushed the #560-Enable-removing-ICA-certs branch from 7d42a5f to 3a7bac6 Compare May 2, 2024 14:57
@@ -1466,6 +1466,25 @@ Revoked certificates can be retrieved by using the [GET_REVOKED_CERT](#get_revok
- CLI command:
- `dcld tx pki revoke-noc-x509-ica-cert --subject=<base64 string> --subject-key-id=<hex string> --serial-number=<string> --info=<string> --time=<int64> --revoke-child=<bool> --from=<account>`

#### REMOVE_NOC_IC
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#### REMOVE_NOC_IC
#### REMOVE_NOC_ICA


// Remove from ICA lists
removeCertFromList(certBySerialNumber.Issuer, certBySerialNumber.SerialNumber, &icaCerts.Certs)
k._removeNocX509IcaCert(ctx, certID, &icaCerts, msg.SerialNumber)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe that calling k.RemoveNocIcaCertificateBySerialNumber(ctx, certificates.Vid, certID.Subject, certID.SubjectKeyId, serialNumber) will be enough here

// Remove from Approved lists
aprCerts, _ := k.GetApprovedCertificates(ctx, msg.Subject, msg.SubjectKeyId)
removeCertFromList(certBySerialNumber.Issuer, certBySerialNumber.SerialNumber, &aprCerts.Certs)
k._removeApprovedX509Cert(ctx, certID, &aprCerts, msg.SerialNumber)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it would be better to move _removeApprovedX509Cert from msg_server_remove_x_509_cert file to a more generic file

}
if foundRevoked {
removeCertFromList(certBySerialNumber.Issuer, certBySerialNumber.SerialNumber, &revCerts.Certs)
k._removeRevokedX509Cert(ctx, certID, &revCerts)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it would be better to move _removeRevokedX509Cert from msg_server_remove_x_509_cert file to a more generic file

Move methods to more generic place

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
@Abdulbois Abdulbois force-pushed the #560-Enable-removing-ICA-certs branch from 184ca90 to b694a77 Compare May 6, 2024 14:36
@Abdulbois Abdulbois merged commit 6f3b8bf into master May 6, 2024
9 checks passed
@Abdulbois Abdulbois deleted the #560-Enable-removing-ICA-certs branch May 6, 2024 15:55
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.

None yet

2 participants