SSL Pinning with Public Key does not work at all

Fixing SSL Pinning Public Key mode: SecKey cannot be compared with isEqual because it is no Objective C object an therefore has no valid hash which is used for comparison by ObjC Runtime.