1 | <?php |
||
19 | abstract class AttCertIssuer |
||
20 | { |
||
21 | /** |
||
22 | * Generate ASN.1 element. |
||
23 | * |
||
24 | * @return Element |
||
25 | */ |
||
26 | abstract public function toASN1(); |
||
27 | |||
28 | /** |
||
29 | * Check whether AttCertIssuer identifies given certificate. |
||
30 | * |
||
31 | * @param Certificate $cert |
||
32 | * @return bool |
||
33 | */ |
||
34 | abstract public function identifiesPKC(Certificate $cert): bool; |
||
35 | |||
36 | /** |
||
37 | * Initialize from distinguished name. |
||
38 | * |
||
39 | * This conforms to RFC 5755 which states that only v2Form must be used, |
||
40 | * and issuerName must contain exactly one GeneralName of DirectoryName |
||
41 | * type. |
||
42 | * |
||
43 | * @link https://tools.ietf.org/html/rfc5755#section-4.2.3 |
||
44 | * @param Name $name |
||
45 | * @return self |
||
46 | */ |
||
47 | public static function fromName(Name $name) |
||
51 | |||
52 | /** |
||
53 | * Initialize from an issuer's public key certificate. |
||
54 | * |
||
55 | * @param Certificate $cert |
||
56 | * @return self |
||
57 | */ |
||
58 | public static function fromPKC(Certificate $cert) |
||
62 | |||
63 | /** |
||
64 | * Initialize from ASN.1. |
||
65 | * |
||
66 | * @param UnspecifiedType $el CHOICE |
||
67 | * @throws \UnexpectedValueException |
||
68 | * @return self |
||
69 | */ |
||
70 | public static function fromASN1(UnspecifiedType $el) |
||
83 | } |
||
84 |