diff --git a/src/components/certificate-create-by-custom/CertificateCreateByCustom.tsx b/src/components/certificate-create-by-custom/CertificateCreateByCustom.tsx index bb7e5d73..d989d1a2 100644 --- a/src/components/certificate-create-by-custom/CertificateCreateByCustom.tsx +++ b/src/components/certificate-create-by-custom/CertificateCreateByCustom.tsx @@ -22,7 +22,7 @@ import styles from "./styles/index.module.scss"; export interface ICertificateCreateByCustomData { subject: CertificateSubjectProps; - algorithm?: CertificateAlgorithmProps; + algorithm: CertificateAlgorithmProps; extendedKeyUsages: ICertificateExtendedKeyUsages[]; type: CertificateType; } diff --git a/src/dialogs/certificate-create-dialog/useCertificateCreateDialog.tsx b/src/dialogs/certificate-create-dialog/useCertificateCreateDialog.tsx index 488cbd09..5652f983 100644 --- a/src/dialogs/certificate-create-dialog/useCertificateCreateDialog.tsx +++ b/src/dialogs/certificate-create-dialog/useCertificateCreateDialog.tsx @@ -52,8 +52,8 @@ export function useCertificateCreateDialog(props: { localCurrentProviderId.current as string, { subjectName: subject, - hashAlgorithm: algorithm?.hash as EHashAlgorithm, - signatureAlgorithm: algorithm?.signature as ESignatureAlgorithm, + hashAlgorithm: algorithm.hash, + signatureAlgorithm: algorithm?.signature, } ); } else if (type === "csr") {