fixing COM-41
authorVolker Birk <vb@pep-project.org>
Thu, 24 Nov 2016 13:25:32 +0100
changeset 221d9cda05e4fce
parent 220 92489901bb81
child 222 789fece963be
fixing COM-41
CpEpEngine.cpp
     1.1 --- a/CpEpEngine.cpp	Wed Nov 23 22:05:36 2016 +0100
     1.2 +++ b/CpEpEngine.cpp	Thu Nov 24 13:25:32 2016 +0100
     1.3 @@ -784,9 +784,7 @@
     1.4  		return E_OUTOFMEMORY;
     1.5  
     1.6  	// COM-41: Enhanced PEP status handling
     1.7 -	if ((status > PEP_STATUS_OK && status < PEP_UNENCRYPTED) ||
     1.8 -		status < PEP_STATUS_OK ||
     1.9 -		status >= PEP_TRUSTWORD_NOT_FOUND)
    1.10 +	if ((status != PEP_STATUS_OK) && (status < PEP_UNENCRYPTED || status >= PEP_TRUSTWORD_NOT_FOUND))
    1.11  		return FAIL("Failure to encrypt message", status);
    1.12  
    1.13  	// Statii like PEP_UNENCRYPTED due to no private key