Page MenuHomePhabricator

[Tunnelbroker] implement APNs Token generation and lifetime
ClosedPublic

Authored by kamil on Fri, Jun 28, 4:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 12:47 AM
Unknown Object (File)
Sat, Jun 29, 12:47 AM
Unknown Object (File)
Sat, Jun 29, 12:47 AM
Unknown Object (File)
Sat, Jun 29, 12:46 AM
Subscribers

Details

Summary

Implementing what is described in Apple's Establishing a token-based connection to APNs.

Config in tests is randomly generated.

Depends on D12609

Test Plan

Tests, later in the task tested actual communication with APNs.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Fri, Jun 28, 6:26 AM
kamil added inline comments.
services/tunnelbroker/src/notifs/apns/token.rs
83 ↗(On Diff #41788)

Apple key is in PKCS#8 form.

Nice job with the Arc<RwLock>!

services/tunnelbroker/src/notifs/apns/token.rs
6 ↗(On Diff #41788)

Up to you, but we have the chrono crate which might be more handy.
Not worth changing though, std::time works well too, I just find it a bit less convenient

This revision is now accepted and ready to land.Mon, Jul 1, 2:08 AM