merge sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Thu, 04 Jul 2019 21:34:44 +0200
branchsync
changeset 3899f37db118e0b0
parent 3898 af2d664f4eb6
parent 3894 9dbd6ed542da
child 3900 c8d13d59a185
merge
src/pgp_sequoia.c
     1.1 --- a/build-mac/pEpEngine.xcodeproj/project.pbxproj	Thu Jul 04 21:34:15 2019 +0200
     1.2 +++ b/build-mac/pEpEngine.xcodeproj/project.pbxproj	Thu Jul 04 21:34:44 2019 +0200
     1.3 @@ -1155,7 +1155,7 @@
     1.4  				ONLY_ACTIVE_ARCH = YES;
     1.5  				OTHER_CFLAGS = "-DSQLITE3_FROM_OS";
     1.6  				SDKROOT = iphoneos;
     1.7 -				VALID_ARCHS = "arm64 armv7s armv7";
     1.8 +				VALID_ARCHS = "$(VALID_ARCHS) x86_64";
     1.9  			};
    1.10  			name = Debug;
    1.11  		};
    1.12 @@ -1214,7 +1214,7 @@
    1.13  				OTHER_CFLAGS = "-DSQLITE3_FROM_OS";
    1.14  				SDKROOT = iphoneos;
    1.15  				VALIDATE_PRODUCT = YES;
    1.16 -				VALID_ARCHS = "arm64 armv7s armv7";
    1.17 +				VALID_ARCHS = "$(VALID_ARCHS) x86_64";
    1.18  			};
    1.19  			name = Release;
    1.20  		};
     2.1 --- a/src/pgp_sequoia.c	Thu Jul 04 21:34:15 2019 +0200
     2.2 +++ b/src/pgp_sequoia.c	Thu Jul 04 21:34:44 2019 +0200
     2.3 @@ -2580,6 +2580,22 @@
     2.4  
     2.5      // Is the TPK live?
     2.6      *expired = !pgp_tpk_alive_at(tpk, when);
     2.7 +#ifdef TRACING
     2.8 +    {
     2.9 +        char buffer[26];
    2.10 +        time_t now = time(NULL);
    2.11 +
    2.12 +        if (when == now || when == now - 1) {
    2.13 +            sprintf(buffer, "now");
    2.14 +        } else {
    2.15 +            struct tm tm;
    2.16 +            gmtime_r(&when, &tm);
    2.17 +            strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", &tm);
    2.18 +        }
    2.19 +
    2.20 +        T("TPK is %slive as of %s", *expired ? "not " : "", buffer);
    2.21 +    }
    2.22 +#endif
    2.23      if (*expired)
    2.24          goto out;
    2.25  
    2.26 @@ -2610,9 +2626,15 @@
    2.27  
    2.28      *expired = !(can_encrypt && can_sign && can_certify);
    2.29  
    2.30 +    T("Key can%s encrypt, can%s sign, can%s certify => %sexpired",
    2.31 +      can_encrypt ? "" : "not",
    2.32 +      can_sign ? "" : "not",
    2.33 +      can_certify ? "" : "not",
    2.34 +      *expired ? "" : "not ");
    2.35 +
    2.36   out:
    2.37      pgp_tpk_free(tpk);
    2.38 -    T("(%s) -> %s", fpr, pEp_status_to_string(status));
    2.39 +    T("(%s) -> %s (expired: %d)", fpr, pEp_status_to_string(status), *expired);
    2.40      return status;
    2.41  }
    2.42  
     3.1 --- a/src/status_to_string.h	Thu Jul 04 21:34:15 2019 +0200
     3.2 +++ b/src/status_to_string.h	Thu Jul 04 21:34:44 2019 +0200
     3.3 @@ -35,6 +35,7 @@
     3.4      case PEP_KEY_IMPORTED: return "PEP_KEY_IMPORTED";
     3.5      case PEP_NO_KEY_IMPORTED: return "PEP_NO_KEY_IMPORTED";
     3.6      case PEP_KEY_IMPORT_STATUS_UNKNOWN: return "PEP_KEY_IMPORT_STATUS_UNKNOWN";
     3.7 +    case PEP_SOME_KEYS_IMPORTED: return "PEP_SOME_KEYS_IMPORTED";
     3.8      
     3.9      case PEP_CANNOT_FIND_IDENTITY: return "PEP_CANNOT_FIND_IDENTITY";
    3.10      case PEP_CANNOT_SET_PERSON: return "PEP_CANNOT_SET_PERSON";