diff options
Diffstat (limited to 'sbin/ipsec/photurisd/identity.c')
-rw-r--r-- | sbin/ipsec/photurisd/identity.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sbin/ipsec/photurisd/identity.c b/sbin/ipsec/photurisd/identity.c index e4ec661fcaf..90f91f15a9f 100644 --- a/sbin/ipsec/photurisd/identity.c +++ b/sbin/ipsec/photurisd/identity.c @@ -1,5 +1,5 @@ /* - * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> + * Copyright 1997,1998 Niels Provos <provos@physnet.uni-hamburg.de> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: identity.c,v 1.5 1998/03/04 11:43:29 provos Exp $"; +static char rcsid[] = "$Id: identity.c,v 1.6 1998/05/18 21:25:30 provos Exp $"; #endif #define _IDENTITY_C_ @@ -350,9 +350,14 @@ get_secrets(struct stateob *st, int mode) } } - if((strlen(remote_secret) == 0 && (mode & ID_REMOTE)) || - (strlen(local_ident) == 0 && (mode & (ID_LOCAL|ID_LOCALPAIR))) ) { - log_error(0, "Can't find identities or secrets in get_secrets()"); + if(strlen(remote_secret) == 0 && (mode & ID_REMOTE)) { + log_error(0, "Can't find remote secret for %s in get_secrets()", + st->uSPIident+2); + return -1; + } + + if (strlen(local_ident) == 0 && (mode & (ID_LOCAL|ID_LOCALPAIR)) ) { + log_error(0, "Can't find local identity in get_secrets()"); return -1; } |