Issues (15)

src/structures/Common.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace vakata\asn1\structures;
4
5
use \vakata\asn1\ASN1;
0 ignored issues
show
The type \vakata\asn1\ASN1 was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class Common
8
{
9
    public static function AlgorithmIdentifier()
10
    {
11
        return [
12
            'tag' => ASN1::TYPE_SEQUENCE,
13
            'children' => [
14
                "algorithm" => [
15
                    'tag' => ASN1::TYPE_OBJECT_IDENTIFIER
16
                ],
17
                'parameters' => [
18
                    'tag' => ASN1::TYPE_ANY,
19
                    'optional' => true
20
                ]
21
            ]
22
        ];
23
    }
24
    public static function RDNSequence()
25
    {
26
        return [
27
            'tag' => ASN1::TYPE_SEQUENCE,
28
            'repeat' => [
29
                'tag' => ASN1::TYPE_SET,
30
                'repeat' => [
31
                    'tag' => ASN1::TYPE_SEQUENCE,
32
                    'children' => [
33
                        'key' => [
34
                            'tag' => ASN1::TYPE_OBJECT_IDENTIFIER
35
                        ],
36
                        'value' => [
37
                            'tag' => ASN1::TYPE_ANY,
38
                            'optional' => true
39
                        ]
40
                    ]
41
                ]
42
            ]
43
        ];
44
    }
45
    public static function extensions()
46
    {
47
        return [
48
            'tag' => ASN1::TYPE_SEQUENCE,
49
            'repeat' => [
50
                'tag' => ASN1::TYPE_SEQUENCE,
51
                'children' => [
52
                    'extnID' => [ 'tag' => ASN1::TYPE_OBJECT_IDENTIFIER ],
53
                    'critical' => [ 'tag' => ASN1::TYPE_BOOLEAN, 'optional' => true ],
54
                    'extnValue' => [ 'tag' => ASN1::TYPE_OCTET_STRING, 'der' => true ]
55
                ]
56
            ],
57
            'optional' => true
58
        ];
59
    }
60
}
61