summaryrefslogtreecommitdiffstats
path: root/third_party/heimdal/lib/asn1/pkcs10.asn1
blob: 04cda4e8d7057be945391ff222437fd52992f9e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- $Id$
PKCS10 DEFINITIONS ::=

BEGIN

IMPORTS
	Name, SubjectPublicKeyInfo, AlgorithmIdentifier, Attribute, Extensions
	FROM rfc2459
        HEIM_ANY FROM heim;

PKCS10-Version ::= INTEGER { pkcs10-v1(0) }

CertificationRequestInfo ::= SEQUENCE {
    version       PKCS10-Version,
    subject       Name,
    subjectPKInfo SubjectPublicKeyInfo,
    attributes    [0] IMPLICIT SET OF Attribute OPTIONAL 
}

CertificationRequest ::= SEQUENCE {
    certificationRequestInfo CertificationRequestInfo,
    signatureAlgorithm	     AlgorithmIdentifier,
    signature                BIT STRING
}

IOSCertificationRequestInfo ::= SEQUENCE {
    version       PKCS10-Version,
    subject       Name,
    subjectPKInfo SubjectPublicKeyInfo,
    attributes    [0] IMPLICIT SET OF CRIAttributeSet OPTIONAL 
}

IOSCertificationRequest ::= SEQUENCE {
    certificationRequestInfo IOSCertificationRequestInfo,
    signatureAlgorithm	     AlgorithmIdentifier,
    signature                BIT STRING
}

-- Copied from rfc2459.asn1 because we can't IMPORT classes and parameterized
-- types yet.
_ATTRIBUTE ::= CLASS {
    &id             OBJECT IDENTIFIER UNIQUE,
    &Type           OPTIONAL,
    &minCount       INTEGER DEFAULT 1,
    &maxCount       INTEGER OPTIONAL
}

id-pkcs9-extReq-copy OBJECT IDENTIFIER ::= {
 iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 14
}

-- Workaround compiler limitation:
CRIExtensions ::= Extensions

at-extReq _ATTRIBUTE ::= { &Type CRIExtensions, &id id-pkcs9-extReq-copy }
CRIAttributes _ATTRIBUTE ::= { at-extReq }
CRIAttributeSet{_ATTRIBUTE:AttrSet} ::= SEQUENCE {
    type      _ATTRIBUTE.&id({AttrSet}),
    values    SET --SIZE (1..MAX)-- OF _ATTRIBUTE.&Type({AttrSet}{@type})
}
CRIAttributeSet ::= CRIAttributeSet{CRIAttributes}

END