Skip to content

Commit

Permalink
Update rotate-certificate.go to fix another bug
Browse files Browse the repository at this point in the history
Update rotate-certificate.go to fix another bug
  • Loading branch information
jdsmithit authored Sep 14, 2023
1 parent e5425b3 commit 3dacbd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd/rotate-certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var rotateCertificateCmd = &cobra.Command{
province, _ := cmd.Flags().GetString(flags.Province)
certificateDirectory, _ := cmd.Flags().GetString(flags.CertificateDirectory)
acmRegion, _ := cmd.Flags().GetString(flags.AcmRegion)
acmPcaRegion, _ := cmd.Flags().GetString(flags.RegionNameAcmPcaDesc)
pcaRegion, _ := cmd.Flags().GetString(flags.PcaRegion)
expiryDays, _ := cmd.Flags().GetInt64(flags.CertificateExpiryDays)

accessKeyPca, _ := cmd.Flags().GetString(flags.AccessKeyAcmPca)
Expand All @@ -40,11 +40,11 @@ var rotateCertificateCmd = &cobra.Command{
acmCreds := awsService.NewAwsCredentialsObject(accessKeyAcm, secretAccessKeyAcm, sessionTokenAcm, profileNameAcm)
acmPcaCreds := awsService.NewAwsCredentialsObject(accessKeyPca, secretAccessKeyPca, sessionTokenPca, profileNamePca)

_, err := acmpcaService.GenerateCertificate(acmPcaCreds, acmpcaArn, commonName, organizationName, organizationalUnit, country, locality, province, certificateDirectory, acmPcaRegion, expiryDays)
_, err := acmpcaService.GenerateCertificate(acmPcaCreds, acmpcaArn, commonName, organizationName, organizationalUnit, country, locality, province, certificateDirectory, pcaRegion, expiryDays)
cobra.CheckErr(err)
_, err = acmService.ImportCertificate(acmCreds, certificateDirectory, acmRegion)
cobra.CheckErr(err)
_, err = acmpcaService.RevokeCertificate(acmPcaCreds, certArn, acmpcaArn, revocationReasons.Superseded, acmPcaRegion)
_, err = acmpcaService.RevokeCertificate(acmPcaCreds, certArn, acmpcaArn, revocationReasons.Superseded, pcaRegion)
cobra.CheckErr(err)
},
}
Expand Down

0 comments on commit 3dacbd4

Please sign in to comment.