@@ -42,8 +42,12 @@ IMPORTS
4242 at-x520OrganizationName, at-x520OrganizationalUnitName, at-x520Title,
4343 at-x520dnQualifier, at-x520SerialNumber, at-x520Pseudonym,
4444 at-domainComponent, at-emailAddress,
45- id-at-countryName, id-emailAddress,
46- ub-emailaddress-length,
45+ id-at-name, id-at-surname, id-at-givenName, id-at-initials, id-at-generationQualifier,
46+ id-at-commonName, id-at-localityName, id-at-stateOrProvinceName, id-at-organizationName,
47+ id-at-organizationalUnitName, id-at-title, id-at-countryName, id-at-serialNumber,
48+ id-at-pseudonym, id-emailAddress,
49+ ub-name, ub-common-name, ub-locality-name, ub-state-name, ub-organization-name,
50+ ub-organizational-unit-name, ub-title, ub-serial-number, ub-pseudonym, ub-emailaddress-length,
4751 Validity, Version, SubjectPublicKeyInfo,
4852 UniqueIdentifier,
4953 id-qt-unotice, id-qt-cps
@@ -137,32 +141,89 @@ OTPRelativeDistinguishedName ::=
137141 SET SIZE (1 .. MAX) OF SingleAttribute { {OTPSupportedAttributes} }
138142
139143OTPSupportedAttributes ATTRIBUTE ::= {
140- at-name | at-surname | at-givenName | at-initials |
141- at-generationQualifier | at-x520CommonName |
142- at-x520LocalityName | at-x520StateOrProvinceName |
143- at-x520OrganizationName | at-x520OrganizationalUnitName |
144- at-x520Title | at-x520dnQualifier | otp-at-x520countryName |
145- at-x520SerialNumber | at-x520Pseudonym | at-domainComponent |
144+ otp- at-name | otp- at-surname | otp- at-givenName | otp- at-initials |
145+ otp- at-generationQualifier | otp- at-x520CommonName |
146+ otp- at-x520LocalityName | otp- at-x520StateOrProvinceName |
147+ otp- at-x520OrganizationName | otp- at-x520OrganizationalUnitName |
148+ otp- at-x520Title | at-x520dnQualifier | otp-at-x520countryName |
149+ otp- at-x520SerialNumber | otp- at-x520Pseudonym | at-domainComponent |
146150 otp-at-emailAddress, .. . }
147151
148- otp-at-x520countryName ATTRIBUTE ::= {
149- TYPE OTP-X520countryName IDENTIFIED BY id-at-countryName }
152+ OTPDirectoryString{INTEGER :maxSize} ::= CHOICE {
153+ teletexString TeletexString (SIZE (0 .. maxSize)),
154+ printableString PrintableString (SIZE (0 .. maxSize)),
155+ bmpString BMPString(SIZE (0 .. maxSize)),
156+ universalString UniversalString(SIZE (0 .. maxSize)),
157+ -- Note: The tag was spelled as `uTF8String` in the
158+ -- RFC for unknown reason. That breaks backward
159+ -- for public_key.
160+ utf8String UTF8String(SIZE (0 .. maxSize))
161+ }
150162
151- otp-at-emailAddress ATTRIBUTE ::= {
152- TYPE OTP-emailAddress IDENTIFIED BY id-emailAddress }
163+ OTP-X520name ::= OTPDirectoryString { ub-name }
164+
165+ otp-at-name ATTRIBUTE ::= {
166+ TYPE OTP-X520name IDENTIFIED BY id-at-name }
167+
168+ otp-at-surname ATTRIBUTE ::= {
169+ TYPE OTP-X520name IDENTIFIED BY id-at-surname }
170+
171+ otp-at-givenName ATTRIBUTE ::= {
172+ TYPE OTP-X520name IDENTIFIED BY id-at-givenName }
173+
174+ otp-at-initials ATTRIBUTE ::= {
175+ TYPE OTP-X520name IDENTIFIED BY id-at-initials }
176+
177+ otp-at-generationQualifier ATTRIBUTE ::= {
178+ TYPE OTP-X520name IDENTIFIED BY id-at-generationQualifier }
179+
180+ otp-at-x520LocalityName ATTRIBUTE ::= {
181+ TYPE OTP-X520localityName IDENTIFIED BY id-at-localityName }
182+ OTP-X520localityName ::= OTPDirectoryString { ub-locality-name }
153183
154- -- We accept utf8String encoding of the US-ASCII
155- -- country name code and the mix up with other country code systems
156- -- that uses three characters instead of two.
184+ otp-at-x520StateOrProvinceName ATTRIBUTE ::= {
185+ TYPE OTP-X520stateOrProvinceName IDENTIFIED BY id-at-stateOrProvinceName }
186+ OTP-X520stateOrProvinceName ::= OTPDirectoryString { ub-state-name }
157187
188+ otp-at-x520CommonName ATTRIBUTE ::= {
189+ TYPE OTP-X520commonName IDENTIFIED BY id-at-commonName }
190+ OTP-X520commonName ::= OTPDirectoryString { ub-common-name }
191+
192+ otp-at-x520OrganizationName ATTRIBUTE ::= {
193+ TYPE OTP-X520organizationName IDENTIFIED BY id-at-organizationName }
194+ OTP-X520organizationName ::= OTPDirectoryString { ub-organization-name }
195+
196+ otp-at-x520OrganizationalUnitName ATTRIBUTE ::= {
197+ TYPE OTP-X520organizationalUnitName IDENTIFIED BY id-at-organizationalUnitName }
198+ OTP-X520organizationalUnitName ::= OTPDirectoryString { ub-organizational-unit-name }
199+
200+ otp-at-x520Title ATTRIBUTE ::= {
201+ TYPE OTP-X520title IDENTIFIED BY id-at-title }
202+ OTP-X520title ::= OTPDirectoryString { ub-title }
203+
204+ otp-at-x520countryName ATTRIBUTE ::= {
205+ TYPE OTP-X520countryName IDENTIFIED BY id-at-countryName }
206+ -- We accept utf8String encoding of the US-ASCII
207+ -- country name code and the mix up with other country code systems
208+ -- that uses three characters instead of two.
158209OTP-X520countryName ::= CHOICE {
159- correct PrintableString (SIZE (2 .. 3 )), -- Correct size is 2.
160- wrong UTF8String (SIZE (2 .. 3 ))
210+ correct PrintableString (SIZE ( 0 ) | SIZE (2 .. 3 )), -- Correct size is 2.
211+ wrong UTF8String (SIZE ( 0 ) | SIZE (2 .. 3 ))
161212}
162213
214+ otp-at-x520SerialNumber ATTRIBUTE ::= {
215+ TYPE OTP-X520serialNumber IDENTIFIED BY id-at-serialNumber }
216+ OTP-X520serialNumber ::= OTPDirectoryString { ub-serial-number }
217+
218+ otp-at-x520Pseudonym ATTRIBUTE ::= {
219+ TYPE OTP-X520pseudonym IDENTIFIED BY id-at-pseudonym }
220+ OTP-X520pseudonym ::= OTPDirectoryString { ub-pseudonym }
221+
222+ otp-at-emailAddress ATTRIBUTE ::= {
223+ TYPE OTP-emailAddress IDENTIFIED BY id-emailAddress }
163224OTP-emailAddress ::= CHOICE {
164- correct IA5String (SIZE (1 .. ub-emailaddress-length)),
165- wrong UTF8String
225+ correct IA5String (SIZE (0 .. ub-emailaddress-length)),
226+ wrong UTF8String
166227}
167228
168229-- We use this variation of SingleAttribute/AttributeTypeAndValue
0 commit comments