Skip to content

Commit e4add31

Browse files
PawelDefeethomasnordquist
authored andcommitted
Accept smaller key files
I can generate a valid key file for my Mosquitto setup that fails the minimum size check of 128, for example this kind of key: -----BEGIN PRIVATE KEY----- MC4CAQAwBQYDK2VwBCIEIFXWXY9yVJRKhZRfLz/oaAcjmOzX/2El+QRU+/1Npyfe -----END PRIVATE KEY-----
1 parent 9cdfa2d commit e4add31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/actions/ConnectionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async function openCertificate(): Promise<CertificateParameters> {
8383
}
8484

8585
const data = await fsPromise.readFile(selectedFile)
86-
if (data.length > 16_384 || data.length < 128) {
86+
if (data.length > 16_384 || data.length < 64) {
8787
throw rejectReasons.certificateSizeDoesNotMatch
8888
}
8989

0 commit comments

Comments
 (0)