-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement aes128gcm, remove legacy code, add exactor agnostic client,…
… update docs, and more. (#30) * WIP : implementing ECE with ECE crate. Missing tests. Not compiling yet * Restaured front padding for both encryption methods * Removed structures that are no longer in use * Removed tests that are now handled by the rust_ece crate * Removed obsolete comment * Updated readme to include new standard * Removed tests that are covered in the rust-ece crate prepared tests for headers that are left to do * Implemented some of the headers tests * Fixed numbers with new double-padding (some small padding is added in the rust-ece crate) * Implemented last tests for aes128gcm * Cargo fmt * WIP : added option for testing in the example file * Cargo fmt * Remove padding from aes128Gcm. This allows for aes128Gcm to fully operate in all tested browsers, including edge. * Remove unneeded base64URL encoding. * Remove uses of aesgcm. * Fix tests, store VAPID keys as bytes, and add reusable VAPID builder. This commit will fix the base64 encoding issues by directly reading the PEM key as bytes instead of immediately encoding, allowing consumers to choose to base64 encode or not. * Fix doc-tests. * Remove FCM specific code. Use the autopush implementation for all connections. This is possible as web push has been standardised, leaving this legacy code redundant. The FCM crate should cover all uses of FCM by this crates consumers. * Use isahc as the default client backend. Add `hyper-client` feature to optionally use the old hyper client. Isach is runtime independent, allowing this crate to be used in non Tokio environments. The hyper client remains as a potentially faster and more maintained option. Isach is the default as I feel the crate should work out of the box on any async executor. * Update docs and README.md. Expose request_builder now that it's generic and documented. * Bump to v0.8 * Add method to get the public key from VAPID signature. * Add encryption test and change fake subs into real subs. * Fix final doc test. * Add migration info to README.md. Co-authored-by: John Tiesselune <[email protected]>
- Loading branch information
1 parent
85870ec
commit 4cac72a
Showing
18 changed files
with
569 additions
and
905 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "web-push" | ||
description = "Web push notification client with support for http-ece encryption and VAPID authentication." | ||
version = "0.7.3" | ||
version = "0.8.0" | ||
authors = ["Julius de Bruijn <[email protected]>"] | ||
license = "Apache-2.0" | ||
homepage = "https://github.com/pimeys/rust-web-push" | ||
|
@@ -15,23 +15,30 @@ edition = "2018" | |
[badges] | ||
travis-ci = { repository = "pimeys/rust-web-push" } | ||
|
||
[features] | ||
default = ["isahc"] | ||
hyper-client = ["hyper", "hyper-tls"] #use features = ["hyper-client"], default-features = false for about 300kb size decrease. | ||
|
||
[dependencies] | ||
futures = "^0.3" | ||
hyper = {version = "^0.14", features = ["client", "http1"]} | ||
hyper-tls = "^0.5" | ||
hyper = { version = "^0.14", features = ["client", "http1"], optional = true } | ||
hyper-tls = { version = "^0.5", optional = true } | ||
isahc = { version = "^1.4.0", optional = true } | ||
http = "^0.2" | ||
serde = "^1.0" | ||
serde_json = "^1.0" | ||
serde_derive = "^1.0" | ||
ring = "^0.16" | ||
ece = "^2.1.0" | ||
native-tls = "^0.2" | ||
base64 = "^0.13" | ||
openssl = "^0.10" | ||
time = {version = "^0.2", features = ["std"]} | ||
time = { version = "^0.2", features = ["std"] } | ||
lazy_static = "^1.4" | ||
chrono = "^0.4" | ||
log = "^0.4" | ||
|
||
[dev-dependencies] | ||
argparse = "^0.2" | ||
tokio = { version = "^1.1", features = ["macros","rt-multi-thread"] } | ||
regex = "^1.5" | ||
tokio = { version = "^1.1", features = ["macros", "rt-multi-thread"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.