Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache the public keys once generated #11

Closed
fousa opened this issue Jan 2, 2019 · 3 comments
Closed

Cache the public keys once generated #11

fousa opened this issue Jan 2, 2019 · 3 comments

Comments

@fousa
Copy link
Collaborator

fousa commented Jan 2, 2019

The public keys are generated for the domain on every request. but I think we should cache the generated value so that the public key pinning process is optimised.

@fousa fousa changed the title Cache the public keys once generating Cache the public keys once generated Jan 2, 2019
@dgyesbreghs
Copy link
Contributor

We never know when they're going to update the certificates. So there is going to be a 'grey periode'. For example: when someone has stolen the private 🔑
Don't think this will improve the security/performance. Maybe I'm wrong 🤔

@fousa
Copy link
Collaborator Author

fousa commented Jan 2, 2019

Good point.

I was only planning to cache it in memory, I think Alamofire does the same but I'm not 100% sure. Not sure if calculating the public key on every request is a performance issue neither. To be examined.

@dgyesbreghs
Copy link
Contributor

I have checked the Alamofire source code and there are not caching it in memory.
https://github.com/Alamofire/Alamofire/blob/master/Source/ServerTrustEvaluation.swift
Maybe it's also a good idea to compare our implementation with the Alamofire implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants