Argh, so you were not really after Issuer Alternative Names (which, like SANs, are about entity names),
but after Authority Key Identifiers (which, like SKIDs, are about IDs for key material)!
but after Authority Key Identifiers (which, like SKIDs, are about IDs for key material)!
That's an entirely different thing.
As a general note,
it would have been helpful to have a look at the OpenSSL documentation on how to set them up
before experimenting in trial-and-error mode and asking on a large mailing list like this.
With OpenSSL 3.0 the documentation on certificate handling has been improved significantly,
and some more improvements are in the pipeline for version 3.2.
So (at least meanwhile) it's worth consulting the man pages first.
before experimenting in trial-and-error mode and asking on a large mailing list like this.
With OpenSSL 3.0 the documentation on certificate handling has been improved significantly,
and some more improvements are in the pipeline for version 3.2.
So (at least meanwhile) it's worth consulting the man pages first.
Concerning the particular topic SKIDs and AKIDs, I had recently written to this mailing list
on Thu, 2023-04-27 at 05:22 +0200:
on Thu, 2023-04-27 at 05:22 +0200:
Another advantage of using the OpenSSL 3.0+ apps is that they automatically add any needed/recommended
subject key identifier (SKID) and authority key identifier (AKID) extensions (while they are not needed for self-signed end-entity certs),
without the need to use extension configuration files or CLI parameters such as -addext 'authorityKeyIdentifier = keyid:always'
David
On Sun, 2023-05-14 at 19:52 -0400, Robert Moskowitz wrote:
i asked a question about the whole aKID and sKID piece on the pkix listand Peter Gutmann said something that I had lost track of in the weeds...The content of keyid used in:authorityKeyIdentifier = keyidIs the sKID from the signing cert. argh.So going back to the hack that Viktor had given me to have control overthe Validity dates in my self-signed cert,,,,I realized that was where the aKID was really coming from, and that certwas generated before I worked out controlling sKID in the conf:subjectKeyIdentifier = $ENV::DETSo go all the way back to start.and Now I have my certs with the sKID and aKID I was trying to get.Well there is 2+ days of struggle and distracting all of you from othertasks!Thank you Viktor for you time.I can't directly control what is in aKID, as it is pulling aKID from thesigning cert. Fix that and..BobOn 5/14/23 15:28, Robert Moskowitz wrote:On 5/14/23 14:00, Viktor Dukhovni wrote:On Sun, May 14, 2023 at 12:44:48PM -0400, Robert Moskowitz wrote:I looked at that manpage and tried:authorityKeyIdentifier =otherName:1.3.27.16.2.1.1;BITSTR:20010030000000052aeb9adc1ce8b1ecAuthorityKeyIdentifier ::= SEQUENCE {keyIdentifier [0] KeyIdentifier OPTIONAL,authorityCertIssuer [1] GeneralNames OPTIONAL,authorityCertSerialNumber [2] CertificateSerialNumberOPTIONAL }You're trying to set the AKID to just the GeneralName, but it has to bea tagged sequence,I did spend some time digging to get what a "tagged sequence" is letalone represent it but can't find it in 5280and note that "authorityCertIssuer" is the name ofthe "grandparent" of the certificate in which the AKID appears, alongwith the authorityCertIssuer you'd need to provide the serial numberof the parent certificate.The two together seems only mandated in sec A.2.I am not finding any discussion on authorityCertIssuer being that ofthe "grandparent", can you point me to that?But as I mentioned before, I don't expect that support for names otherthan directory names in the AKID extension is particularly common.Well I could put:e.d.c.a.b.0.b.e.0.6.8.2.e.0.b.9.5.0.8.f.f.3.e.f.f.3.0.0.1.0.0.2.ip6.arpa.? It will exist (we are for now doing this under driptesting.org as itwill be a bit of process to get 3.0.0.1.0.0.2.ip6.arpa. delegated).But that is 73 bytes to show a 16 byte value.You're better off with just "keyIdentifier", liking the child certto the key if of the parent cert.I assume you mean:authorityKeyIdentifier = keyidand I can't see how to set keyid to 20010030000000052aeb9adc1ce8b1ecI can control subjectKeyIdentifier like:subjectKeyIdentifier = 20010030000000052aeb9adc1ce8b1ecX509v3 Subject Key Identifier:20:01:00:30:00:00:00:05:2A:EB:9A:DC:1C:E8:B1:ECWhich is defined as:SubjectKeyIdentifier ::= KeyIdentifierI triedauthorityKeyIdentifier = keyid=20010030000000052aeb9adc1ce8b1ecAnd get an errorauthorityKeyIdentifier = keyid:20010030000000052aeb9adc1ce8b1ecJust uses the keyid as is:X509v3 Authority Key Identifier:0F:4E:5E:54:C2:4F:80:9E:E5:79:CD:B4:14:9B:BF:EB:A8:57:CB:CAPerhaps I should not have mentioned issuer SANs, you probably have nouse for them. Do use the appropriate data type in the EE SAN.