web-push-libs / vapid

Apps and Libraries to support WebPush VAPID
Mozilla Public License 2.0
88 stars 27 forks source link

Variable renaming in Python tests #83

Closed mohawk2 closed 4 years ago

mohawk2 commented 4 years ago

I'm quite new to crypto, and I'm porting py_vapid. I found the variable names slightly confusing and feel these ones are a bit clearer - there's no such thing as data without a format, and these names now all include a format. They also specify whether the variable is for public or private key.

mohawk2 commented 4 years ago

Also, the allegedly DER-encoded value is actually Base64-encoded DER. That's quite misleading, and also means the module isn't actually correctly reading DER! If you'd like me to do anything about that, either by updating the comments, or the code/docs, let me know.

@jrconlin

mohawk2 commented 4 years ago

All good points! In the Perl side, the PEM wants BEGIN EC PRIVATE KEY, which is different from here. It's all fun and games.

I have changed the var names per your suggestion.

jrconlin commented 4 years ago

Cool. Thanks for this!