crypto: deduplicate public key parsing
This is a slight reduction in SLOC by deduplicating public key parsing in the crypto module as suggested in a comment in lines 3715 to 3717. There should be no functional difference.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines