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