| 1 | package SBOM::CycloneDX::CryptoProperties::ProtocolProperties; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use SBOM::CycloneDX::Enum; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use SBOM::CycloneDX::List; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use Types::Standard qw(Str Enum InstanceOf); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | ▶ | use Types::TypeTiny qw(ArrayLike); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 1 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 1 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | |||||||||||
| 17 | 1 | extends 'SBOM::CycloneDX::Base'; | |||||||||
| 18 | |||||||||||
| 19 | 1 | has type => (is => 'rw', isa => Enum [SBOM::CycloneDX::Enum->values('PROTOCOL_TYPE')]); | |||||||||
| 20 | 1 | has version => (is => 'rw', isa => Str); | |||||||||
| 21 | |||||||||||
| 22 | has cipher_suites => ( | ||||||||||
| 23 | is => 'rw', | ||||||||||
| 24 | isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::CryptoProperties::CipherSuite']], | ||||||||||
| 25 | 0 | ▶ | default => sub { SBOM::CycloneDX::List->new } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 26 | 1 | ); | |||||||||
| 27 | |||||||||||
| 28 | has related_cryptographic_assets => ( | ||||||||||
| 29 | is => 'rw', | ||||||||||
| 30 | isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::CryptoProperties::RelatedCryptographicAsset']], | ||||||||||
| 31 | 0 | ▶ | default => sub { SBOM::CycloneDX::List->new } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 32 | 1 | ); | |||||||||
| 33 | |||||||||||
| 34 | 1 | has ikev2_transform_types => (is => 'rw', isa => InstanceOf ['SBOM::CycloneDX::CryptoProperties::Ikev2TransformType']); | |||||||||
| 35 | |||||||||||
| 36 | # [DEPRECATED 1.7] Bom-ref like | ||||||||||
| 37 | 0 | ▶ | has crypto_ref_array => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 38 | |||||||||||
| 39 | 0 | ▶ | sub TO_JSON { | ||||||||
|
Subroutine
TO_JSON: not called CC=7 SCAR=40.3
Pod
documented
| |||||||||||
| 40 | |||||||||||
| 41 | 0 | my $self = shift; | |||||||||
| 42 | |||||||||||
| 43 | 0 | my $json = {}; | |||||||||
| 44 | |||||||||||
| 45 | 0 | ▶ | $json->{type} = $self->type if $self->type; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 46 | 0 | ▶ | $json->{version} = $self->version if $self->version; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 47 | 0 | ▶ | $json->{cipherSuites} = $self->cipher_suites if @{$self->cipher_suites}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | 0 | ▶ | $json->{ikev2TransformTypes} = $self->ikev2_transform_types if $self->ikev2_transform_types; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 49 | 0 | ▶ | $json->{cryptoRefArray} = $self->crypto_ref_array if @{$self->crypto_ref_array}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 50 | 0 | ▶ | $json->{relatedCryptographicAssets} = $self->related_cryptographic_assets if @{$self->related_cryptographic_assets}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 51 | |||||||||||
| 52 | 0 | return $json; | |||||||||
| 53 | |||||||||||
| 54 | } | ||||||||||
| 55 | |||||||||||
| 56 | 1 | 1; | |||||||||
| 57 | |||||||||||
| 58 | =encoding utf-8 | ||||||||||
| 59 | |||||||||||
| 60 | =head1 NAME | ||||||||||
| 61 | |||||||||||
| 62 | SBOM::CycloneDX::CryptoProperties::ProtocolProperties - Protocol Properties | ||||||||||
| 63 | |||||||||||
| 64 | =head1 SYNOPSIS | ||||||||||
| 65 | |||||||||||
| 66 | SBOM::CycloneDX::CryptoProperties::ProtocolProperties->new(); | ||||||||||
| 67 | |||||||||||
| 68 | |||||||||||
| 69 | =head1 DESCRIPTION | ||||||||||
| 70 | |||||||||||
| 71 | L<SBOM::CycloneDX::CryptoProperties::ProtocolProperties> specifies properties specific | ||||||||||
| 72 | to cryptographic assets of type: "protocol". | ||||||||||
| 73 | |||||||||||
| 74 | =head2 METHODS | ||||||||||
| 75 | |||||||||||
| 76 | L<SBOM::CycloneDX::CryptoProperties::ProtocolProperties> inherits all methods from L<SBOM::CycloneDX::Base> | ||||||||||
| 77 | and implements the following new ones. | ||||||||||
| 78 | |||||||||||
| 79 | =over | ||||||||||
| 80 | |||||||||||
| 81 | =item SBOM::CycloneDX::CryptoProperties::ProtocolProperties->new( %PARAMS ) | ||||||||||
| 82 | |||||||||||
| 83 | Properties: | ||||||||||
| 84 | |||||||||||
| 85 | =over | ||||||||||
| 86 | |||||||||||
| 87 | =item * C<cipher_suites>, A list of cipher suites related to the protocol. | ||||||||||
| 88 | |||||||||||
| 89 | =item * C<crypto_ref_array>, [DEPRECATED] Use C<related_cryptographic_assets> instead. | ||||||||||
| 90 | A list of protocol-related cryptographic assets. | ||||||||||
| 91 | |||||||||||
| 92 | =item * C<ikev2_transform_types>, The IKEv2 transform types supported (types | ||||||||||
| 93 | 1-4), defined in RFC 7296 section 3.3.2 (L<https://www.ietf.org/rfc/rfc7296.html#section-3.3.2>), | ||||||||||
| 94 | and additional properties. | ||||||||||
| 95 | |||||||||||
| 96 | =item * C<related_cryptographic_assets>, A list of cryptographic assets related | ||||||||||
| 97 | to this component. | ||||||||||
| 98 | |||||||||||
| 99 | See L<SBOM::CycloneDX::CryptoProperties::RelatedCryptographicAsset> | ||||||||||
| 100 | |||||||||||
| 101 | =item * C<type>, The concrete protocol type. | ||||||||||
| 102 | |||||||||||
| 103 | =item * C<version>, The version of the protocol. | ||||||||||
| 104 | |||||||||||
| 105 | =back | ||||||||||
| 106 | |||||||||||
| 107 | =item $protocol_properties->cipher_suites | ||||||||||
| 108 | |||||||||||
| 109 | =item $protocol_properties->crypto_ref_array | ||||||||||
| 110 | |||||||||||
| 111 | =item $protocol_properties->ikev2_transform_types | ||||||||||
| 112 | |||||||||||
| 113 | =item $protocol_properties->related_cryptographic_assets | ||||||||||
| 114 | |||||||||||
| 115 | =item $protocol_properties->type | ||||||||||
| 116 | |||||||||||
| 117 | =item $protocol_properties->version | ||||||||||
| 118 | |||||||||||
| 119 | =back | ||||||||||
| 120 | |||||||||||
| 121 | |||||||||||
| 122 | |||||||||||
| 123 | =head1 SUPPORT | ||||||||||
| 124 | |||||||||||
| 125 | =head2 Bugs / Feature Requests | ||||||||||
| 126 | |||||||||||
| 127 | Please report any bugs or feature requests through the issue tracker | ||||||||||
| 128 | at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>. | ||||||||||
| 129 | You will be notified automatically of any progress on your issue. | ||||||||||
| 130 | |||||||||||
| 131 | =head2 Source Code | ||||||||||
| 132 | |||||||||||
| 133 | This is open source software. The code repository is available for | ||||||||||
| 134 | public review and contribution under the terms of the license. | ||||||||||
| 135 | |||||||||||
| 136 | L<https://github.com/giterlizzi/perl-SBOM-CycloneDX> | ||||||||||
| 137 | |||||||||||
| 138 | git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git | ||||||||||
| 139 | |||||||||||
| 140 | |||||||||||
| 141 | =head1 AUTHOR | ||||||||||
| 142 | |||||||||||
| 143 | =over 4 | ||||||||||
| 144 | |||||||||||
| 145 | =item * Giuseppe Di Terlizzi <gdt@cpan.org> | ||||||||||
| 146 | |||||||||||
| 147 | =back | ||||||||||
| 148 | |||||||||||
| 149 | |||||||||||
| 150 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 151 | |||||||||||
| 152 | This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi. | ||||||||||
| 153 | |||||||||||
| 154 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 155 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 156 | |||||||||||
| 157 | =cut | ||||||||||