Fix handling of long PSK identities

backport from c3b5d83

see #238
3 files changed