propertyTstRequestCertificateGenerator.AcceptRequestedExtensions
property AcceptRequestedExtensions: tExtnValues read fAcceptRequestedExtensions write SetAcceptRequestedExtensions default cDefaultAcceptRequestedExtensions;
THE EXTENSION KINDS WHOSE REQUESTED VALUE THIS COMPONENT TAKES WITHOUT A HANDLER SAYING SO - the only kinds for which the no-handler verdict is rqvAccept rather than rqvIgnore. Everything not listed keeps the default this unit has always had, so the cA:TRUE attack stays dead: not merely by default but by construction, because basicConstraints is one of the cCaComposedExtensions this property REFUSES TO HOLD, and a requester therefore cannot widen its own permitted keyUsage by asking.
Ships [evCeSubjectKeyIdentifier,evCeKeyUsage] because those two are RESTATEMENTS, not requests: a requester naming them is repeating back something the CA can compute for itself from the request's own public key. Taking them costs the CA nothing it did not know; checking them tells the requester something it needs to hear.
"ACCEPT NOTHING" IS []. The component then behaves exactly as it did before this property existed. "Accept these two" is the default. There is no third state and no separate Boolean: emptying the set IS the off switch. evUndefined is stripped on assignment - an extension this library does not model has no CHOICE alternative to copy into, so seeding rqvAccept for it would configure a refusal nobody asked for.
IT SEEDS; A HANDLER DECIDES. The verdict this property chooses is passed into OnCheckRequestExtension's var parameter, so an attached handler sees it and may overwrite it in either direction: rqvIgnore for a listed kind composes the CA's own value and names the kind in IgnoredItemNames, exactly as if it had never been listed. Same rule as RefuseUnhandledRequestItems, and the same direction the header settles the accepted-value-versus-Extensions conflict in.
ACCEPTING IS NOT BELIEVING. Whatever ends up accepted - from this property or from a handler - is checked against the request's own public key, and a value that fails is REFUSED, before a serial is drawn and before the issuer key is opened. A keyUsage the subject key cannot perform, or a subjectKeyIdentifier that identifies no key this CA can recognise, aborts the issuance. To certify a value that fails that check, answer rqvIgnore and write the value you want in OnGetExtensions - and EDIT THE EXTENSION IN PLACE there (FindExtension(kind).extnValue.AsCeXxx := ...), because OnGetExtensions fires AFTER the impositions and the append idiom would leave the certificate carrying two instances of one extension.
WHAT ACCEPTING THESE TWO ACTUALLY DOES, because it is not free. A taken keyUsage SUPPRESSES ImposeExtnKeyUsage, so a coherent restatement that is NARROWER than the wizard's own value is honoured - narrowing your own key's usage is the restatement case in its purest form. A taken subjectKeyIdentifier suppresses ImposeExtnSubjectKeyIdentifier, and the certificate's identity becomes the requester's bytes: AKI chaining inside this library survives that, but KEY-TO-CERTIFICATE PAIRING does not, because that path re-derives from the key and compares against the extension - and since this library's derivation is not RFC 5280 method 1 for any EC, EdDSA or post-quantum key, a CONFORMING external requester is the common case that triggers it, not an edge case. Remove evCeSubjectKeyIdentifier from this set to keep pairing.
Criticality is IMPOSED for these two rather than copied from the request - RFC 5280 requires subjectKeyIdentifier non-critical and wants keyUsage critical, and a requester is not in a position to know either.
IT SAYS NOTHING ABOUT ABSENCE. A missing keyUsage still fires OnRequestExtensionMissing with abvSupply.
With CertificateWizard = ncwUndefined the component imposes nothing of its own, so these two are taken from the request and checked, and nothing else is composed. That is a coherent posture and the checks still apply, but note that SubjectIsCA then answers False; a CA composing basicConstraints cA:TRUE in OnGetExtensions must override it, or a legitimate keyCertSign restatement will be refused.
To recognise the RFC 7093 SHA-2 key-identifier conventions, link stSHA256 and stSHA512; without them those candidates cannot be computed and the refusal message says so.