This commit is contained in:
Elias Bonnici 2024-04-18 11:48:55 +02:00
commit 11ccd2c077
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF
3 changed files with 5 additions and 2 deletions

View File

@ -278,6 +278,7 @@ class PivState with _$PivState {
bool get protectedKey => derivedKey || storedKey;
bool get needsAuth =>
!authenticated && metadata?.managementKeyMetadata.defaultValue != true;
bool get supportsMetadata => version.isAtLeast(5, 3);
factory PivState.fromJson(Map<String, dynamic> json) =>
_$PivStateFromJson(json);

View File

@ -146,7 +146,8 @@ class _PivScreenState extends ConsumerState<PivScreen> {
CertInfoTable(
selected.certInfo,
selected.metadata,
alwaysIncludePrivate: true,
alwaysIncludePrivate:
pivState.supportsMetadata,
),
const SizedBox(height: 16),
],

View File

@ -90,7 +90,8 @@ class SlotDialog extends ConsumerWidget {
child: CertInfoTable(
certInfo,
metadata,
alwaysIncludePrivate: true,
alwaysIncludePrivate:
pivState.supportsMetadata,
),
),
],