|
|
@ -322,19 +322,138 @@ rfc5280.ORAddress = asn1.define('ORAddress', function() { |
|
|
|
|
|
|
|
var BuiltInStandardAttributes = |
|
|
|
rfc5280.BuiltInStandardAttributes = asn1.define('BuiltInStandardAttributes', function() { |
|
|
|
; |
|
|
|
this.seq().obj( |
|
|
|
this.key('countryName').optional().use(CountryName), |
|
|
|
this.key('administrationDomainName').optional().use(AdministrationDomainName), |
|
|
|
this.key('networkAddress').optional().use(NetworkAddress), |
|
|
|
this.key('terminalIdentifier').optional().use(TerminalIdentifier), |
|
|
|
this.key('privateDomainName').optional().use(PrivateDomainName), |
|
|
|
this.key('organizationName').optional().use(OrganizationName), |
|
|
|
this.key('numericUserIdentifier').optional().use(NumericUserIdentifier), |
|
|
|
this.key('personalName').optional().use(PersonalName), |
|
|
|
this.key('organizationalUnitNames').optional().use(OrganizationalUnitNames) |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
* For BuiltInStandardAttributes |
|
|
|
*/ |
|
|
|
|
|
|
|
var CountryName = |
|
|
|
rfc5280.CountryName = asn1.define('CountryName', function() { |
|
|
|
this.choice({ |
|
|
|
x121DccCode: this.numstr(), |
|
|
|
iso3166Alpha2Code: this.printstr() |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
var AdministrationDomainName = |
|
|
|
rfc5280.AdministrationDomainName = asn1.define('AdministrationDomainName', function() { |
|
|
|
this.choice({ |
|
|
|
numeric: this.numstr(), |
|
|
|
printable: this.printstr() |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
var NetworkAddress = |
|
|
|
rfc5280.NetworkAddress = asn1.define('NetworkAddress', function() { |
|
|
|
this.use(X121Address); |
|
|
|
}); |
|
|
|
|
|
|
|
var X121Address = |
|
|
|
rfc5280.X121Address = asn1.define('X121Address', function() { |
|
|
|
this.numstr(); |
|
|
|
}); |
|
|
|
|
|
|
|
var TerminalIdentifier = |
|
|
|
rfc5280.TerminalIdentifier = asn1.define('TerminalIdentifier', function() { |
|
|
|
this.printstr(); |
|
|
|
}); |
|
|
|
|
|
|
|
var PrivateDomainName = |
|
|
|
rfc5280.PrivateDomainName = asn1.define('PrivateDomainName', function() { |
|
|
|
this.choice({ |
|
|
|
numeric: this.numstr(), |
|
|
|
printable: this.printstr() |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
var OrganizationName = |
|
|
|
rfc5280.OrganizationName = asn1.define('OrganizationName', function() { |
|
|
|
this.printstr(); |
|
|
|
}); |
|
|
|
|
|
|
|
var NumericUserIdentifier = |
|
|
|
rfc5280.NumericUserIdentifier = asn1.define('NumericUserIdentifier', function() { |
|
|
|
this.numstr(); |
|
|
|
}); |
|
|
|
|
|
|
|
var PersonalName = |
|
|
|
rfc5280.PersonalName = asn1.define('PersonalName', function() { |
|
|
|
this.set().obj( |
|
|
|
this.key('surname').implicit().printstr(), |
|
|
|
this.key('givenName').implicit().printstr(), |
|
|
|
this.key('initials').implicit().printstr(), |
|
|
|
this.key('generationQualifier').implicit().printstr() |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
var OrganizationalUnitNames = |
|
|
|
rfc5280.OrganizationalUnitNames = asn1.define('OrganizationalUnitNames', function() { |
|
|
|
this.seqof(OrganizationalUnitName); |
|
|
|
}); |
|
|
|
|
|
|
|
var OrganizationalUnitName = |
|
|
|
rfc5280.OrganizationalUnitName = asn1.define('OrganizationalUnitName', function() { |
|
|
|
this.printstr(); |
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
* BuiltInDomainDefinedAttributes |
|
|
|
*/ |
|
|
|
|
|
|
|
var BuiltInDomainDefinedAttributes = |
|
|
|
rfc5280.BuiltInDomainDefinedAttributes = asn1.define('BuiltInDomainDefinedAttributes', function() { |
|
|
|
; |
|
|
|
this.seqof(BuiltInDomainDefinedAttribute); |
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
* For BuiltInDomainDefinedAttribute |
|
|
|
*/ |
|
|
|
|
|
|
|
var BuiltInDomainDefinedAttribute = |
|
|
|
rfc5280.BuiltInDomainDefinedAttribute = asn1.define('BuiltInDomainDefinedAttribute', function() { |
|
|
|
this.seq().obj( |
|
|
|
this.key('type').printstr(), |
|
|
|
this.key('value').printstr() |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
* ExtensionAttributes |
|
|
|
*/ |
|
|
|
|
|
|
|
var ExtensionAttributes = |
|
|
|
rfc5280.ExtensionAttributes = asn1.define('ExtensionAttributes', function() { |
|
|
|
; |
|
|
|
this.seqof(ExtensionAttribute); |
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
* For ExtensionAttributes |
|
|
|
*/ |
|
|
|
|
|
|
|
var ExtensionAttribute = |
|
|
|
rfc5280.ExtensionAttribute = asn1.define('ExtensionAttribute', function() { |
|
|
|
this.seq().obj( |
|
|
|
this.key('extensionAttributeType').implicit().int(), |
|
|
|
this.key('extensionAttributeValue').any().implicit().int() |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
* EDIPartyName |
|
|
|
*/ |
|
|
|
|
|
|
|
var EDIPartyName = |
|
|
|
rfc5280.EDIPartyName = asn1.define('EDIPartyName', function() { |
|
|
|
this.seq().obj( |
|
|
|