mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: RSA not working in UI
This commit is contained in:
@@ -47,7 +47,7 @@ const SignForm = ({ cmek }: FormProps) => {
|
||||
} = useForm<FormData>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
signingAlgorithm: cmek?.encryptionAlgorithm?.startsWith("rsa")
|
||||
signingAlgorithm: cmek?.encryptionAlgorithm?.startsWith("RSA")
|
||||
? SigningAlgorithm.RSASSA_PSS_SHA_512
|
||||
: SigningAlgorithm.ECDSA_SHA_256,
|
||||
isBase64Encoded: false
|
||||
@@ -83,7 +83,7 @@ const SignForm = ({ cmek }: FormProps) => {
|
||||
};
|
||||
|
||||
const allowedSigningAlgorithms = Object.values(SigningAlgorithm).filter((a) =>
|
||||
cmek?.encryptionAlgorithm?.startsWith("rsa")
|
||||
cmek?.encryptionAlgorithm?.startsWith("RSA")
|
||||
? a.toLowerCase().startsWith("rsa")
|
||||
: a.toLowerCase().startsWith("ecdsa")
|
||||
);
|
||||
|
||||
@@ -61,7 +61,7 @@ const VerifyForm = ({ cmek }: FormProps) => {
|
||||
} = useForm<FormData>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
signingAlgorithm: cmek?.encryptionAlgorithm?.startsWith("rsa")
|
||||
signingAlgorithm: cmek?.encryptionAlgorithm?.startsWith("RSA")
|
||||
? SigningAlgorithm.RSASSA_PSS_SHA_512
|
||||
: SigningAlgorithm.ECDSA_SHA_256,
|
||||
isBase64Encoded: false
|
||||
@@ -101,7 +101,7 @@ const VerifyForm = ({ cmek }: FormProps) => {
|
||||
const signingAlgorithm = cmekVerify.data?.signingAlgorithm;
|
||||
|
||||
const allowedSigningAlgorithms = Object.values(SigningAlgorithm).filter((a) =>
|
||||
cmek?.encryptionAlgorithm?.startsWith("rsa")
|
||||
cmek?.encryptionAlgorithm?.startsWith("RSA")
|
||||
? a.toLowerCase().startsWith("rsa")
|
||||
: a.toLowerCase().startsWith("ecdsa")
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user