Skip to content

Commit

Permalink
Merge pull request #4 from vanlooverenkoen/fix/distribution-points
Browse files Browse the repository at this point in the history
Removed the distribution points implementation
  • Loading branch information
vanlooverenkoen committed Dec 30, 2021
2 parents 1e58d8c + d94bd05 commit 3d5f44d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## 0.2.10

- Removed distribution points implementation.

## 0.2.9

- Fixed distribution points to use tags instead of indexes
Expand Down
26 changes: 2 additions & 24 deletions lib/src/extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -570,30 +570,8 @@ class DistributionPoint {
/// reasons [1] ReasonFlags OPTIONAL,
/// cRLIssuer [2] GeneralNames OPTIONAL }
factory DistributionPoint.fromAsn1(ASN1Sequence sequence) {
String? name;
List<DistributionPointReason>? reasons;
String? crlIssuer;
for (final element in sequence.elements) {
switch (element.tag) {
case 0xa0:
name = toDart(element);
break;
case 0xa1:
reasons = ((element as ASN1BitString)
.valueBytes()
.map((v) => DistributionPointReason.values[v])
.toList());
break;
case 0xa2:
crlIssuer = String.fromCharCodes(toDart(element));
break;
}
}
return DistributionPoint(
name: name,
reasons: reasons,
crlIssuer: crlIssuer,
);
// TODO Implement the correct behaviour here. We ignore it for now.
return DistributionPoint();
}
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: x509b
description: Dart library for parsing and working with X.509 certificates.
version: 0.2.9
version: 0.2.10
homepage: https://github.com/jeroentrappers/x509

environment:
Expand Down

0 comments on commit 3d5f44d

Please sign in to comment.