Re: [lamps] struggling with CSRAttrs

Corey Bonnell <Corey.Bonnell@digicert.com> Tue, 02 August 2022 13:10 UTC

Return-Path: <Corey.Bonnell@digicert.com>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 548AFC13CCE4 for <spasm@ietfa.amsl.com>; Tue, 2 Aug 2022 06:10:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.687
X-Spam-Level:
X-Spam-Status: No, score=-2.687 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.582, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=digicert.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n5EMIrqj_MxL for <spasm@ietfa.amsl.com>; Tue, 2 Aug 2022 06:10:07 -0700 (PDT)
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2104.outbound.protection.outlook.com [40.107.244.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 849B9C159482 for <spasm@ietf.org>; Tue, 2 Aug 2022 06:10:06 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JPX4huIQLKUZbT5BVFMEXVcAp3wVXp3fy2SpeA4hBZ/BzP3Jcri7jnnq5LvJRhFbwNA67dortdiGmcVjr39D5PBE8CP7+WRWctma23wXPlGXyG87mAfu6ZVWbvHltyYZgkI1qcjMwyib3bhUCypRDCWovQlSb24ZqSu0CbiPL7ia6OvLsZsnR3LRUDv12bp9DOFkxFhH3VajrUGUSDTrL+i55oOeRWi4oMY6YHC2yuW/WXo5Wmr3XrSyfgXfY51Wb4oQsarKINRIdkbB6AIEFHqXZopnGUd9TWCDsVEP5TPfe4ZNhSh6+c+HT4IuWC+9+1Q1NbvHrIur13YK1bNVbA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FOXvaQaQquZBYoR2NjdoZ4gyojvf1TRNuBbno7Ys2Dk=; b=ld93sEv2GHCJoHhI2uh8Y3rk2opOozAVmr5l1zhY8mKa5fXNEFXFgabuB6ZH2YEIon/TNC3qe9QqGoCKKC3ZBj1HUKiEeNN7COfcYaDr9Xxe5OrNcGjGoGKg34qV8lNWVwfr1zSWb30p4FbrE8FziKcRC/MDPUDUOATgXgPP2QMsnzLHM3tRWy1IK0LtteAye2kVeSSfl1lXAQRVFoNIFAHx/9gu85iGePNN1LNouwXPRYBYgU0i76Y5YKe3+KJWOJr5a1Dt7U5CKcK4KD+K+XtjkAvf4hKcVybX3C/AtPdGcHn95bsWiAwIDPmXUnDZcljCWUcX6JXXWD/1bc9edQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digicert.com; dmarc=pass action=none header.from=digicert.com; dkim=pass header.d=digicert.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digicert.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FOXvaQaQquZBYoR2NjdoZ4gyojvf1TRNuBbno7Ys2Dk=; b=SOnIZy5Bt9sC+Hrap+D+eZdMQc20tBv+19qCaCGVJHBqOBcDagDbG3i8K1DYcPq7dbLYi11+gdEDBQqLzJeTHsbvtTDj2jarikDioFkR3FoQUj7h+uuPJuIiLlCpdAYktfGYALflCsz9Gp6NnYgg/VjtSyKxcktGMAj+NxMCgmVkxT8tDpA2f+vTCLXZ6HawGFOq1+Tjxq4uT9tucU9wr0ydsYCBC4cvBPSRAexkkMaOqxSYZTtpNrgy+IHCevWmVSG2LhSIPpqtOIToxokojtjRyT2Ysjp1gqdZby3NYw6vjGGnbE/zFMIrOCx7G/5ySj0lFR67Ra+e7zTawJBo0g==
Received: from DM6PR14MB2186.namprd14.prod.outlook.com (2603:10b6:5:b6::16) by SJ0PR14MB5920.namprd14.prod.outlook.com (2603:10b6:a03:486::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.11; Tue, 2 Aug 2022 13:10:02 +0000
Received: from DM6PR14MB2186.namprd14.prod.outlook.com ([fe80::f073:6195:1e12:682b]) by DM6PR14MB2186.namprd14.prod.outlook.com ([fe80::f073:6195:1e12:682b%3]) with mapi id 15.20.5504.014; Tue, 2 Aug 2022 13:10:02 +0000
From: Corey Bonnell <Corey.Bonnell@digicert.com>
To: David von Oheimb <David.von.Oheimb@siemens.com>, Michael Richardson <mcr+ietf@sandelman.ca>
CC: LAMPS WG <spasm@ietf.org>
Thread-Topic: [lamps] struggling with CSRAttrs
Thread-Index: AQHYpQTCW+TI1yXBSEK/awaiIOrS562bb88AgAAlJPA=
Date: Tue, 02 Aug 2022 13:10:02 +0000
Message-ID: <DM6PR14MB218658CA89AB81F66D1FF551929D9@DM6PR14MB2186.namprd14.prod.outlook.com>
References: <12352.1657505901@localhost> <ada963a796ca3fafb42a29751020ff4326fd2a1e.camel@von-Oheimb.de> <563732.1659120308@dooku> <36c409c2-ab92-4ec2-6f1e-235652a243d9@siemens.com> <56a8af3a-63f2-5f19-62d9-59469ab678bf@siemens.com>
In-Reply-To: <56a8af3a-63f2-5f19-62d9-59469ab678bf@siemens.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digicert.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 90556b58-93fe-4ab1-0bce-08da74884f50
x-ms-traffictypediagnostic: SJ0PR14MB5920:EE_
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: wyJX9SOVkWF2bLnUVV49H/QvHHyfElqoKAJkxWi0ClhmHTaKezD9DoIsU/TZwKvAXiMuNbZp62W+GIvzwySm3vEO72Pd8bh6x6wuXEg9bdGKPZa3vXAiSYSe8KY2u7UAE9UZWh5mE78BZZReF7uesoTGhPoo1P51sI+XWqnxgJ9iTOEm/0jGjxPUQGfFOHC1K4G9qTN3o7s7O26xmpOTLNlTzIwdAuxl/4KoW4FxaHdvAf04wDkw9czYfEVt23Uef6VThPWgVOvXtCY/HlqLxGvNR31pO6SYCmbFSMPWIH0Mncq2Y4toe4m1Q/g2rEFqK3zlcd+DL/nsIuuQVRSDt4wpZ1B9Hhx8VnkNErezHEPtp1NoNV1yEizeZ2fgRJDOIYxv0MwtDp+UKNpmXn7RgHHnqbqjwR+H4/MjM/BH3gRL837maFtmPGyWG5k85K1G/N3sFKBxTtUjU8vNYqO5EIbpB74HzxaTRQ/bI8Nn11jFzSzB0LqMnmwdj5H/busdY7qB2ac/pR0mQQZWabJo0QCfUoz0Vy8DeP0zJpLOA6c4baqJiCtoGa1PVbHo7x5boAIWLrI4zcXit389Q/f8rkADTpDzvJ6faWaxikRWW1H4vP1OtETmP/ost3PomYfc9eVJZdwF6QfG56Po4NcPOrRCslqNDhdmw3tCvESTQcOFCtN3kySyyHOOYJfG/Gai6x6Qh91ek74+Sm9rmFCm5H4kKrYgnhfyuyanu+csDrqKyLNyDfFw+jIRASviKqeDD/b/SqX+vW/LaK0ceOb/vkLmPUg6za+f6QqUcFbq0doRjSY/6RKAOmo8Yi4oPCXUw18NKXggZF0hKgZ28fXbGg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR14MB2186.namprd14.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(376002)(346002)(396003)(39850400004)(366004)(83380400001)(186003)(4326008)(9326002)(52536014)(66946007)(33656002)(2906002)(8676002)(76116006)(5660300002)(8936002)(64756008)(66556008)(66476007)(66446008)(55016003)(478600001)(110136005)(6506007)(9686003)(7696005)(53546011)(26005)(41300700001)(166002)(316002)(38070700005)(99936003)(38100700002)(86362001)(122000001)(966005)(71200400001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: Vjt6Nr5iKZEw2uvcmOpYTArCFpPVauKmvLvSCuzHQywrH8r+RWKVb/dHfEzJ2YYu04ERZ6k+cs6sxUER9AxyxRWzAEEaaP+Bo728HnW8Xi6kZQBZ4/0hryrBv90qo6guPvwncMBc8dVQh1juZ9W7tCnOCDodgAZy7yUU/TX0eb854Md0IcuHcaDsiLjgeFwFQy5l/ozqcMKr2kSkr6V4p3+bxuVcPBJ0N8RbizwggYF166AM65OCwLisfWlKwWZg/ZvmwrHzoz9AyD7KefDtZY4bmJFuUOvWj9C09T3fqoLIgbP9RYJ8AjImYo6Y4xFBB4RjB8OFOMsNn1FhWXZHgPxQutocPtmPGzNEHvkViI0dLe0nVaQ8ZIvxF8M69U+Jpud2M4ic4tWm56HYaA15SLn1rXAXhrvOaA95VEZImf7UYxnhKgo42msdWbO/7imozidvAHhudilppa/s5Bk67LNJJKPT9+jUg2IcHTc/Vn6kq6qdf95u7tofGOgqvwuHsBD1gEbBt7Cduq3NUG/pLyS/r2nUMrU+9D/zzmAjkMTdGwnQ+0OYe76E+TxRruY4lWHx7BLbYV54fCUyk+rNS5garGnCRN9NXV1NglcHfOLnHhdrmSyKw6fkNWf4uViDcrpcXTobgAEB0koHgnEST1WOFyKTU8/Z3T3sdu0oynzdWg6eRVNRTRolhIrhSjFQTTFLuYXKMWjU9vgNvh4nSK/mXrJMqCx7VyjlsBDLttkHR5cAzdc0+7pwLIJyDcH/ntey5NuAOp82dcblpg1T2jlLvrudHVa8gE/JvG77hEoYIIB/qpeOcdD9LbPMrN9pzkYyOfzr/kKvvaDWLfS8jDy86nwizG45I96EjT7L5Vdsex7VVYP1oMRECbxmzvywdgUMhOYb11GIWQr1NjGpyGWEIyOk1wIOcBZBxbNpWHxW7b2SsNZBrqXnSTSCIam75KePGf45sVuJbXPOg1CGk7wSDSpvP8gY+ofmIfu/bcNqQfoWvKP+d6ghPotF5x5HMP/koSO+ZA+HPEb5qC2RT7ZvDWXq6PdDlzhQjJirBBxzPYY7utbuKbmZ9rKySRs3K7zoj07EmG3ATXAFElTpCOmR1Thpi7onQaH9eXVI3qNLD82vXJHfECFL9XZLDadvFOr83KqkBnXynaqpRuemojm2RbvoGnllU9aDjlP8pgmwALodw4UvTi9XHQysiobINuPGEh5bwfG9oqiYXU968TMQMdbg/N6Zpx1cm+CuCyEEC8J1AEXnf67dL4QyjpPscNGgSnp7akEphQZ9PYIBYYJOxGiRO8ICV6Gq7Ab+M0eL4ckDHEBMKPs8If2it+7aRQtmj0y7gEgmJetH3jdFLeCdlIxR3ECOtZTrYKmmCSuzjO5vGReAxICgLDs2PDiETgTc9ZZOKXq1cAvJufmjW1XoieKIxcxEm69zFC7FVGIDIrHEPtejc3T0XtAtNiIdaC01TwPHGHASurqkVSjNw4Lx9sUN8OiVQHSoFbBlzDogSWfx5WI/M6hBjC5YYUhGew4NilVJMLzVgb+8aZQMbkR50Fz3a2oca31bVc2Cc/e0N4PMUHeKSBENw8/N8yit
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="2.16.840.1.101.3.4.2.1"; boundary="----=_NextPart_000_01A9_01D8A64F.A48115E0"
MIME-Version: 1.0
X-OriginatorOrg: digicert.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR14MB2186.namprd14.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 90556b58-93fe-4ab1-0bce-08da74884f50
X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2022 13:10:02.0898 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: cf813fa1-bde5-4e75-9479-f6aaa8b1f284
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: w9XnNtgMXqOwk6ptMwfCbmoEUCn7vcfhuQoenVRbruigIPOCfBi1aXiLsplyZxBn+GGGK3W8934zu4d1M6Bz6/t855Tgg6tW7IOj6ZUtkI4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR14MB5920
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/ElaY6GmnFmY6RUj4y4OsPmgHfQg>
Subject: Re: [lamps] struggling with CSRAttrs
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "This is a venue for discussion of doing Some Pkix And SMime \(spasm\) work." <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Aug 2022 13:10:12 -0000

Hi David,

One comment on the encoding of the subjectAltName, copied below:

 

SEQUENCE {
          OBJECT IDENTIFIER subjectAltName (2 5 29 17)
          [0] {
            BOOLEAN TRUE
            }
          OCTET STRING, encapsulates {
            SEQUENCE {
              [2] 'domain.example'
              }
            }
          }



I don’t think the critical BOOLEAN should be tagged above. RFC 5280, section 4.1 [1] defines Extension as:

 

Extension  ::=  SEQUENCE  {

        extnID      OBJECT IDENTIFIER,

        critical    BOOLEAN DEFAULT FALSE,

        extnValue   OCTET STRING

                    -- contains the DER encoding of an ASN.1 value

                    -- corresponding to the extension type identified

                    -- by extnID

        }

 

Given this ASN.1 definition, I believe the correct encoding of the subjectAltName would be:

 

SEQUENCE {
          OBJECT IDENTIFIER subjectAltName (2 5 29 17)
          BOOLEAN TRUE
          OCTET STRING, encapsulates {
            SEQUENCE {
              [2] 'domain.example'
              }
            }
          }



Thanks,

Corey

 

[1] https://datatracker.ietf.org/doc/html/rfc5280#section-4.1

 

From: Spasm <spasm-bounces@ietf.org> On Behalf Of David von Oheimb
Sent: Tuesday, August 2, 2022 6:45 AM
To: Michael Richardson <mcr+ietf@sandelman.ca>
Cc: LAMPS WG <spasm@ietf.org>
Subject: Re: [lamps] struggling with CSRAttrs

 

Here are further things to clarify, which I happened to come across yesterday
when tweaking the OpenSSL implementation <https://github.com/openssl/openssl/pull/18931>  of X.509 extensions in PKCS#10 CSRs (and certs).

It is common practice for PKCS#10 objects to contain just one X.509 extension attribute with a single set element,
although this appears not explicitly required by RFC 2986 <https://www.rfc-editor.org/rfc/rfc2986>  (at least I did not find this there),
and the value of this attribute is a sequence of actual extensions: 

        Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension

defined in RFC 5280 section 4.1 <https://datatracker.ietf.org/doc/html/rfc5280#section-4.1> , which also makes clear that X.509 certs can bear only one such list:

   TBSCertificate  ::=  SEQUENCE  {
        version         [0]  EXPLICIT Version DEFAULT v1,
        ...
        extensions      [3]  EXPLICIT Extensions OPTIONAL
                             -- If present, version MUST be v3
        }

As mentioned on July 19 (see other email below), the CsrAttrs syntax gives quite some needless

freedom how to represent multiple X.509 extensions (and potentially other types of attributes).

 

I believe we should clarify that 

*	There MUST be at most one attribute describing X.509 extensions,
i.e., one bearing the OID extensionRequest (1.2.840.113549.1.9.14) as its type.
*	The set in such an X.509 extension value MUST contain exactly one element.
*	The value of such an attribute MUST be of type Extensions, i.e., a sequence of Extension.

In this light, I've just updated the example to reflect the type SEQUENCE OF Extension
and extended it with two (non-critical) extensions to make it more general/educative:

SEQUENCE {
  SEQUENCE {
    OBJECT IDENTIFIER extensionRequest (1 2 840 113549 1 9 14)
    SET {
      SEQUENCE {
        SEQUENCE {
          OBJECT IDENTIFIER basicConstraints (2 5 29 19)
          OCTET STRING, encapsulates {
            SEQUENCE {}
            }
          }
        SEQUENCE {
          OBJECT IDENTIFIER extKeyUsage (2 5 29 37)
          OCTET STRING, encapsulates {
           SEQUENCE {
              OBJECT IDENTIFIER serverAuth (1 3 6 1 5 5 7 3 1)
             }
            }
          }
        SEQUENCE {
          OBJECT IDENTIFIER subjectAltName (2 5 29 17)
          [0] {
            BOOLEAN TRUE
            }
          OCTET STRING, encapsulates {
            SEQUENCE {
              [2] 'domain.example'
              }
            }
          }
        }
      }
    }
  }

Moreover, we might specify what an empty list of X.509 extensions means,
such as to express that no X.509 extensions should/must be used in the CSR.

 

    David

 

 

On 31.07.22 19:40, David von Oheimb wrote:

Hi Michael et al.

On 29.07.22 20:45, Michael Richardson wrote: 

   Attribute { ATTRIBUTE:IOSet } ::= SEQUENCE {
        extType  ATTRIBUTE.&id({IOSet}),
        extAttr  SET SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{@type})
   }

Well, this definition is semantically identical to the original one.
So better not rename the two fields of the Attribute structure, i.e., we
should stick with 'type' and 'values',
in particular since there may be attributes that are not X.509
extensions.

I found it clearer, but if you object to this rename, then I'll go with your preference.

Let's keep the original field names.
Also because this underlines the important fact that we do not change the ASN.1 syntax at all,
which is critical for bits-on-the-wire compatibility, but we just clarify its use and interpretation.

I've just made a pass on lamps-rfc7030-csrattrs.mkd in the GitHub repository.
Its new version contains various suggestions for improvements here and there.
Also updated the subjectAltName example to be of the more usual form of a dNSName
and inserted two questions/remarks:

   (TODO: Do we want to allow an empty extnValue (which is of type OCTET
   STRING), which would mean that the client is told to include an X.509
   extension of the given type and fill in the concrete value itself?)

   (TODO: Note that this mechanism does not support telling the client
   to include in the CSR a specific subject DN, simply because there is
   no OID for this.  I think we should better make this clear, or we
   have to define such an OID if setting a subject name should be
   supported.)

I also corrected the spelling of my (co-author's) name in presentations/ietf114-lamps-csrattrs.{fodp,pdf}.

    David

 


On Tue, 2022-07-19 at 20:58 +0200, David von Oheimb wrote:

Hi Michael, Sean, et al.,

 

on Sun, 2022-07-10 at 22:18 -0400, Michael Richardson wrote:

 

Sean, sorry to be asking this with less than 24h to ID cut-off.

I didn't want to post an updated ID until I had example code that produced

what I *thought* you are suggesting.  Moving a SEQ/SET around isn't that

hard... only now I've confused myself.

 

We had:

 

   CsrAttrs ::= SEQUENCE SIZE (0..MAX) OF AttrOrOID

 

   AttrOrOID ::= CHOICE (oid OBJECT IDENTIFIER,

                         attribute Attribute }

 

   Attribute { ATTRIBUTE:IOSet } ::= SEQUENCE {

        extType  ATTRIBUTE.&id({IOSet}),

        extAttr  SET SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{@type})

   }

 

Well, this definition is semantically identical to the original one.
So better not rename the two fields of the Attribute structure, i.e., we should stick with 'type' and 'values',
in particular since there may be attributes that are not X.509 extensions.


According to  <https://datatracker.ietf.org/doc/html/draft-richardson-lamps-rfc7030-csrattrs> https://datatracker.ietf.org/doc/html/draft-richardson-lamps-rfc7030-csrattrs
the only thing that is "changed" is the clarification that the attributes may contain entire X.509 extensions.

So BTW I believe we can and should claim that this is bit-on-the wire compatible with RFC 7030.

 

 

with the understanding that extAttr could be a SET of Extensions.

 

Better also state that in this case the type/extType field MUST bear the value extensionRequest (1.2.840.113549.1.9.14).

 

 

Each Extension is given by:

 

   Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension

 

The Extensions structure is only needed within certificates (where there is just one extensions field).
All needed here is the Extension structure - there are already more than enough of those sequences and sets around 

 

   Extension  ::=  SEQUENCE  {

        extnID      OBJECT IDENTIFIER,

        critical    BOOLEAN DEFAULT FALSE,

        extnValue   OCTET STRING

                    -- contains the DER encoding of an ASN.1 value

                    -- corresponding to the extension type identified

                    -- by extnID

        }

 

 

1) I'm not sure why I need a SET of a Sequence, unless your intent was that

   extAttr could be an *Extension* ??  I'm gonna go with yes here, but I

   didn't code that yet.

 

In my view, the set-valued 

 

               extAttr SET SIZE(1..MAX) OF ATTRIBUTE.&Type( <mailto:%7bIOSet%7d%7b@type> {IOSet}{@type})

(or better, as in the original definition in 7030):

               values SET SIZE(1..MAX) OF ATTRIBUTE.&Type( <mailto:%7bIOSet%7d%7b@type> {IOSet}{@type})

 

is not really needed because multiple attributes can be given anyway using multiple attributes, and each of them may then have a different type.
If multiple values are given as a set within a single attribute, all its elements must have the same type.
So in practice I suppose that for all attributes the SETs given within each of them usually will have just one value element.

 

 

2) I think that extnID would be things like subjectAltName,

   i.e. OID: 2.5.29.17

 

Right.

 

 

But, if so, what is extType for this?

 

The (ext)type is needed to provide the information, using "extensionRequest", that an X.509 extension is being given in this attribute.

 

 

 

ASN1 that I have right now, where I've put subjectAltName in twice:

 

obiwan-[projects/pandora/fountain](2.6.6) mcr 10396 %dumpasn1 tmp/csr_bulb1.der

  0  84: SEQUENCE {

  2  82:   SEQUENCE {

  4   3:     OBJECT IDENTIFIER subjectAltName (2 5 29 17)  <--- WHAT GOE, uS HERE?

Replace this by                         extensionRequest (1.2.840.113549.1.9.14)

 

 

  9  75:     SET {

 11  73:       SEQUENCE {   <--- SEQUENCE here might be undesired.

SEQUENCE here is fine, as demanded by the Extension structure.

 

 13   3:         OBJECT IDENTIFIER subjectAltName (2 5 29 17)

 18   3:         [0] {

The "[0] {" (and the closing 2}") is likely superfluous/wrong here.

 20   1:           BOOLEAN TRUE

       :           }

 23  61:         SEQUENCE {

 25  59:           [0] {

 27  57:             UTF8String

       :               ' <mailto:rfc8994+fd739fc23c3440112233445500000000+@acp.ex> rfc8994+fd739fc23c3440112233445500000000+@acp.ex'

       :               'ample.com'

       :             }

       :           }

This encoding of a SAN appears strange to me - which flavor of GeneralName are you aiming at?

 

       :         }

       :       }

       :     }

       :   }

 

- David