PrashantBhanage commented on code in PR #13490:
URL: https://github.com/apache/cloudstack/pull/13490#discussion_r4414994731
##########
server/src/main/java/com/cloud/api/ApiResponseHelper.java:
##########
@@ -5362,12 +5585,12 @@ public NetworkPermissionsResponse
createNetworkPermissionsResponse(NetworkPermis
protected void handleCertificateResponse(String certStr,
DirectDownloadCertificateResponse response) {
try {
Certificate cert = CertificateHelper.buildCertificate(certStr);
- if (cert instanceof X509CertImpl) {
- X509CertImpl certificate = (X509CertImpl) cert;
+ if (cert instanceof X509Certificate) {
+ X509Certificate certificate = (X509Certificate) cert;
response.setVersion(String.valueOf(certificate.getVersion()));
response.setSubject(certificate.getSubjectDN().toString());
response.setIssuer(certificate.getIssuerDN().toString());
-
response.setSerialNum(certificate.getSerialNumberObject().toString());
+
response.setSerialNum(certificate.getSerialNumber().toString());
Review Comment:
> @PrashantBhanage any reason to change how the certificate serial number is
shown here? main shows it in hex, this shows it as a plain number
Okk So the serial number format changed because I swapped X509CertImpl for
X509Certificate. I reverted that part, so handleCertificateResponse is the same
as main now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]