Page MenuHomePhabricator

[Tunnelbroker] implement APNs Token generation and lifetime
ClosedPublic

Authored by kamil on Jun 28 2024, 4:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 3:12 PM
Unknown Object (File)
Tue, Nov 12, 2:52 PM
Unknown Object (File)
Tue, Nov 12, 2:26 PM
Unknown Object (File)
Tue, Nov 12, 1:03 PM
Unknown Object (File)
Tue, Nov 12, 12:56 PM
Unknown Object (File)
Tue, Nov 12, 11:48 AM
Unknown Object (File)
Tue, Nov 12, 10:50 AM
Unknown Object (File)
Tue, Nov 12, 5:59 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.Jun 28 2024, 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.Jul 1 2024, 2:08 AM