Use functions for storing OS key types

This allows the OS to be more flexible in determining the key type.
Use version instead of codename as key for f21+