Skip to content

Commit

Permalink
Add support for new certificate type (passes)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Vandriel committed Apr 25, 2017
1 parent 60288f8 commit 9371147
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Change Log

### master (unreleased)

* Add support for new certificate type (passes)

### 0.7.4 (2017-01-16)

* Add support for handshake error (internal error)
Expand Down
8 changes: 7 additions & 1 deletion Classes/NWSecTools.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ typedef NS_ENUM(NSInteger, NWCertType) {
kNWCertTypeVoIPServices = 7,
/** WatchKit Services. */
kNWCertTypeWatchKitServices = 8,
/** Pass Type ID. */
kNWCertTypePasses = 9,
/** Unknown. */
kNWCertTypeUnknown = 9,
kNWCertTypeUnknown = 10,
};


Expand Down Expand Up @@ -139,6 +141,7 @@ + (NWEnvironmentOptions)environmentOptionsForCertificate:(NWCertificateRef)certi
case kNWCertTypeWebProduction:
case kNWCertTypeVoIPServices:
case kNWCertTypeWatchKitServices:
case kNWCertTypePasses:
return NWEnvironmentOptionAny;
case kNWCertTypeNone:
case kNWCertTypeUnknown:
Expand All @@ -158,6 +161,7 @@ + (BOOL)isPushCertificate:(NWCertificateRef)certificate
case kNWCertTypeWebProduction:
case kNWCertTypeVoIPServices:
case kNWCertTypeWatchKitServices:
case kNWCertTypePasses:
return YES;
case kNWCertTypeNone:
case kNWCertTypeUnknown:
Expand All @@ -177,6 +181,7 @@ + (NSString *)prefixWithCertType:(NWCertType)type
case kNWCertTypeWebProduction: return @"Website Push ID: ";
case kNWCertTypeVoIPServices: return @"VoIP Services: ";
case kNWCertTypeWatchKitServices: return @"WatchKit Services: ";
case kNWCertTypePasses: return @"Pass Type ID: ";
case kNWCertTypeNone:
case kNWCertTypeUnknown:
break;
Expand Down Expand Up @@ -346,6 +351,7 @@ + (NWEnvironment)environmentForCertificate:(NWCertificateRef)certificate
case kNWCertTypeWebProduction:
case kNWCertTypeVoIPServices:
case kNWCertTypeWatchKitServices:
case kNWCertTypePasses:
case kNWCertTypeNone:
case kNWCertTypeUnknown:
break;
Expand Down

0 comments on commit 9371147

Please sign in to comment.