zaru / webpush

webpush, Encryption Utilities for Web Push protocol
MIT License
396 stars 73 forks source link

Fix vapid key to_pem #97

Open collimarco opened 3 years ago

collimarco commented 3 years ago

Due to upstream changes in the OpenSSL library, Ruby 2.6.7, 2.7 and all later versions break the method VapidKey#to_pem of this library.

You can read more here: https://github.com/ruby/openssl/issues/437

Without this fix, in the new Ruby versions, the to_pem method would return the private key two times instead of the key pair (private key + public key).

Please merge this fix as soon as possible. Thank you!

collimarco commented 2 years ago

@zaru Can you please merge this important bug fix? We have been using our branch for almost 2 years in production, so it's safe to merge.