I've downloaded the source and had a look, and it's not quite what I thought was going on. It turns out that nm-strongswan.c requires the pre-shared key to be 20 characters (in check_validity()).
I don't think this really makes sense: as a client, I'm not the guy who chose the key. I can understand why the server package might say "this is insecure; don't do it", but it's no business of the client. Rupert