src/pEpEngine.c
branchsequoia_windows
changeset 3911 7505db47bc5f
parent 3906 1a00a4b3ff54
parent 3910 1e9cd9e6cd29
child 3966 67a11b194bbb
     1.1 --- a/src/pEpEngine.c	Tue Jul 09 10:54:21 2019 +0200
     1.2 +++ b/src/pEpEngine.c	Tue Jul 09 11:14:01 2019 +0200
     1.3 @@ -4251,27 +4251,8 @@
     1.4      if (!(session && pattern && keylist))
     1.5          return PEP_ILLEGAL_VALUE;
     1.6  
     1.7 -    PEP_STATUS status = session->cryptotech[PEP_crypt_OpenPGP].find_keys(session, pattern,
     1.8 -                                                                         keylist);
     1.9 -                                                                         
    1.10 -#ifndef USE_GPG
    1.11 -    if (*keylist == NULL) {
    1.12 -        // we have a problem, in that older GPG keys with no username associated don't 
    1.13 -        // quote out the address-as-username, meaning the uid is non-standard.
    1.14 -        // sequoia then stores the whole uid string for lookup, so we try again here with 
    1.15 -        // a whole-uid-pattern:
    1.16 -        if (strchr(pattern, '@')) {
    1.17 -            char* new_pattern = calloc(2*strlen(pattern) + 4, 1);
    1.18 -            int n = sprintf(new_pattern, "%s <%s>", pattern, pattern);
    1.19 -            if (n > 0)
    1.20 -                status = session->cryptotech[PEP_crypt_OpenPGP].find_keys(session, new_pattern,
    1.21 -                                                                          keylist);
    1.22 -            free(new_pattern);                                                                      
    1.23 -        }    
    1.24 -    }
    1.25 -#endif 
    1.26 -    
    1.27 -    return status;
    1.28 +    return session->cryptotech[PEP_crypt_OpenPGP].find_keys(session, pattern,
    1.29 +            keylist);
    1.30  }
    1.31  
    1.32