oven-sh/bun · error · TypeError
SUITE_B_LOS_NOT_ALLOWED
SUITE_B_LOS_NOT_ALLOWED
Error message
SUITE_B_LOS_NOT_ALLOWED
What it means
CertError::SUITE_B_LOS_NOT_ALLOWED maps BoringSSL X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED (verify code 60). The configured Suite B level of security (LOS) does not allow a curve used in the chain: P-384 keys are outside the 128-bit LOS profile, and P-256 outside the 192-bit one. Message: "Suite B: curve not allowed for this LOS".
Source
Thrown at src/http/error.rs:239
#[error("APPLICATION_VERIFICATION")]
APPLICATION_VERIFICATION,
#[error("UNSUPPORTED_CONSTRAINT_TYPE")]
UNSUPPORTED_CONSTRAINT_TYPE,
#[error("UNSUPPORTED_CONSTRAINT_SYNTAX")]
UNSUPPORTED_CONSTRAINT_SYNTAX,
#[error("UNSUPPORTED_NAME_SYNTAX")]
UNSUPPORTED_NAME_SYNTAX,
#[error("CRL_PATH_VALIDATION_ERROR")]
CRL_PATH_VALIDATION_ERROR,
#[error("SUITE_B_INVALID_VERSION")]
SUITE_B_INVALID_VERSION,
#[error("SUITE_B_INVALID_ALGORITHM")]
SUITE_B_INVALID_ALGORITHM,
#[error("SUITE_B_INVALID_CURVE")]
SUITE_B_INVALID_CURVE,
#[error("SUITE_B_INVALID_SIGNATURE_ALGORITHM")]
SUITE_B_INVALID_SIGNATURE_ALGORITHM,
#[error("SUITE_B_LOS_NOT_ALLOWED")]
SUITE_B_LOS_NOT_ALLOWED,
#[error("SUITE_B_CANNOT_SIGN_P_384_WITH_P_256")]
SUITE_B_CANNOT_SIGN_P_384_WITH_P_256,
#[error("HOSTNAME_MISMATCH")]
HOSTNAME_MISMATCH,
#[error("EMAIL_MISMATCH")]
EMAIL_MISMATCH,
#[error("IP_ADDRESS_MISMATCH")]
IP_ADDRESS_MISMATCH,
#[error("INVALID_CALL")]
INVALID_CALL,
#[error("STORE_LOOKUP")]
STORE_LOOKUP,
#[error("NAME_CONSTRAINTS_WITHOUT_SANS")]
NAME_CONSTRAINTS_WITHOUT_SANS,
#[error("UNKNOWN_CERTIFICATE_VERIFICATION_ERROR")]
UNKNOWN_CERTIFICATE_VERIFICATION_ERROR,
}View on GitHub (pinned to 8c5296ac45)
Solutions
- Decide the target LOS, then make every chain certificate use that curve: P-256 for 128-bit, P-384 for 192-bit
- Align the flag with reality: set X509_V_FLAG_SUITE_B_128_LOS for P-256 chains, _192_LOS for P-384
- Audit for mixed curves: openssl x509 -noout -text | grep 'ASN1 OID' across the chain
Example fix
# before: 128-bit LOS flag, chain contains P-384 intermediates verify_flags = suiteb_128 # after: consistent profile - all P-256 with 128-bit LOS verify_flags = suiteb_128 # chain: prime256v1 throughout
Defensive patterns
Strategy: validation
Validate before calling
// Assert one curve strength throughout the chain matching the intended Suite B LOS
import tls from "node:tls";
import { X509Certificate } from "node:crypto";
export function chainMatchesLos(host, los /* 'P-256' | 'P-384' */, port = 443) {
return new Promise((resolve, reject) => {
const s = tls.connect({ host, port, servername: host, rejectUnauthorized: false }, () => {
let c = s.getPeerCertificate(true), ok = true;
do { ok = ok && new X509Certificate(c.raw).keyObject.export({ format: "jwk" }).crv === los; }
while (c.issuerCertificate && (c = c.issuerCertificate) && !Object.is(c, s.getPeerCertificate(true)));
s.end(); resolve(ok);
});
s.on("error", reject);
});
} Type guard
export function isSuiteBLosNotAllowed(e): e is Error & { code: "SUITE_B_LOS_NOT_ALLOWED" } {
return e instanceof Error && (e as any).code === "SUITE_B_LOS_NOT_ALLOWED";
} Try / catch
try {
await fetch(url);
} catch (e) {
if (e?.code === "SUITE_B_LOS_NOT_ALLOWED") {
// curve strength doesn't match the enabled LOS flag - align chain and flag
alignSuiteBProfile(url);
} else throw e;
} Prevention
- Pick one LOS per environment and enforce a single curve across root/intermediate/leaf
- When upgrading to 192-bit, re-key the whole chain before flipping the flag
- Config-review Suite B flags on gateways whenever chain strength changes
When it happens
Trigger: Verifier sets X509_V_FLAG_SUITE_B_128_LOS but the chain contains a P-384 certificate (or _192_LOS with a P-256 certificate). Suite B pins one curve strength per profile; mixing fails.
Common situations: Teams 'upgrading' half a chain to P-384 while the gateway runs the 128-bit flag; flag misconfiguration (192 selected where 128 intended) on defense-grade proxies; inconsistent policy between two enforcing middleboxes in the path.
Related errors
- SUITE_B_INVALID_VERSION
- SUITE_B_INVALID_CURVE
- SUITE_B_CANNOT_SIGN_P_384_WITH_P_256
- SUITE_B_INVALID_ALGORITHM
- SUITE_B_INVALID_SIGNATURE_ALGORITHM
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/b7e1c28540831af0.
Report an issue: GitHub.