mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 11:42:52 +00:00
feat(fips): requested changes
This commit is contained in:
@@ -49,8 +49,8 @@ const createQuicConnection = async (
|
||||
verifyPeer: true,
|
||||
verifyCallback: async (certs) => {
|
||||
if (!certs || certs.length === 0) return quic.native.CryptoError.CertificateRequired;
|
||||
const serverCertificate = new crypto.rawCrypto.X509Certificate(Buffer.from(certs[0]));
|
||||
const caCertificate = new crypto.rawCrypto.X509Certificate(tlsOptions.ca);
|
||||
const serverCertificate = new crypto.nativeCrypto.X509Certificate(Buffer.from(certs[0]));
|
||||
const caCertificate = new crypto.nativeCrypto.X509Certificate(tlsOptions.ca);
|
||||
const isValidServerCertificate = serverCertificate.verify(caCertificate.publicKey);
|
||||
if (!isValidServerCertificate) return quic.native.CryptoError.BadCertificate;
|
||||
|
||||
@@ -73,7 +73,7 @@ const createQuicConnection = async (
|
||||
crypto: {
|
||||
ops: {
|
||||
randomBytes: async (data) => {
|
||||
crypto.rawCrypto.getRandomValues(new Uint8Array(data));
|
||||
crypto.nativeCrypto.getRandomValues(new Uint8Array(data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user