sign_only sync
authorKrista Bennett <krista@pep-project.org>
Tue, 20 Nov 2018 15:02:43 +0100
branchsync
changeset 3139d9b3c218af20
parent 3138 13a1ac115f2d
child 3140 00a9ab97c594
child 3143 81c80e27cbf7
sign_only
src/pEpEngine.c
src/pEpEngine.h
test/src/SuiteMaker.cc
     1.1 --- a/src/pEpEngine.c	Tue Nov 20 13:57:47 2018 +0100
     1.2 +++ b/src/pEpEngine.c	Tue Nov 20 15:02:43 2018 +0100
     1.3 @@ -3869,6 +3869,28 @@
     1.4              keylist, ptext, psize, ctext, csize);
     1.5  }
     1.6  
     1.7 +PEP_STATUS sign_only(PEP_SESSION session, 
     1.8 +                     const char *data, 
     1.9 +                     size_t data_size, 
    1.10 +                     const char *fpr, 
    1.11 +                     char **sign, 
    1.12 +                     size_t *sign_size) {
    1.13 +    assert(session);
    1.14 +    assert(fpr);
    1.15 +    assert(data);
    1.16 +    assert(data_size);
    1.17 +    assert(sign);
    1.18 +    assert(sign_size);
    1.19 +
    1.20 +    if (!(session && fpr && data && data_size && sign && sign_size))
    1.21 +        return PEP_ILLEGAL_VALUE;
    1.22 +
    1.23 +    return session->cryptotech[PEP_crypt_OpenPGP].sign_only(session,
    1.24 +                                fpr, data, data_size, sign, sign_size);
    1.25 +                         
    1.26 +}
    1.27 +
    1.28 +
    1.29  
    1.30  DYNAMIC_API PEP_STATUS verify_text(
    1.31      PEP_SESSION session, const char *text, size_t size,
     2.1 --- a/src/pEpEngine.h	Tue Nov 20 13:57:47 2018 +0100
     2.2 +++ b/src/pEpEngine.h	Tue Nov 20 15:02:43 2018 +0100
     2.3 @@ -1371,7 +1371,14 @@
     2.4          PEP_SESSION session,
     2.5          const char *fpr,
     2.6          identity_list **identities);
     2.7 -
     2.8 +        
     2.9 +PEP_STATUS sign_only(PEP_SESSION session, 
    2.10 +                     const char *data, 
    2.11 +                     size_t data_size, 
    2.12 +                     const char *fpr, 
    2.13 +                     char **sign, 
    2.14 +                     size_t *sign_size);
    2.15 +                     
    2.16  #ifdef __cplusplus
    2.17  }
    2.18  #endif
     3.1 --- a/test/src/SuiteMaker.cc	Tue Nov 20 13:57:47 2018 +0100
     3.2 +++ b/test/src/SuiteMaker.cc	Tue Nov 20 15:02:43 2018 +0100
     3.3 @@ -31,6 +31,7 @@
     3.4  #include "HeaderKeyImportTests.h"
     3.5  #include "StringpairListTests.h"
     3.6  #include "TrustManipulationTests.h"
     3.7 +#include "SignOnlyTests.h"
     3.8  #include "EncryptAttachPrivateKeyTests.h"
     3.9  #include "BloblistTests.h"
    3.10  #include "KeyResetMessageTests.h"
    3.11 @@ -52,7 +53,6 @@
    3.12  #include "CrashdumpTests.h"
    3.13  #include "CaseAndDotAddressTests.h"
    3.14  #include "ExpiredSubkeyTests.h"
    3.15 -#include "LeastCommonDenomColorTests.h"
    3.16  #include "ExternalRevokeTests.h"
    3.17  #include "UserIDAliasTests.h"
    3.18  
    3.19 @@ -77,6 +77,7 @@
    3.20      "HeaderKeyImportTests",
    3.21      "StringpairListTests",
    3.22      "TrustManipulationTests",
    3.23 +    "SignOnlyTests",
    3.24      "EncryptAttachPrivateKeyTests",
    3.25      "BloblistTests",
    3.26      "KeyResetMessageTests",
    3.27 @@ -98,7 +99,6 @@
    3.28      "CrashdumpTests",
    3.29      "CaseAndDotAddressTests",
    3.30      "ExpiredSubkeyTests",
    3.31 -    "LeastCommonDenomColorTests",
    3.32      "ExternalRevokeTests",
    3.33      "UserIDAliasTests",
    3.34  };
    3.35 @@ -145,6 +145,8 @@
    3.36          *test_suite = new StringpairListTests(test_class_name, test_home);
    3.37      else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
    3.38          *test_suite = new TrustManipulationTests(test_class_name, test_home);
    3.39 +    else if (strcmp(test_class_name, "SignOnlyTests") == 0)
    3.40 +        *test_suite = new SignOnlyTests(test_class_name, test_home);
    3.41      else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
    3.42          *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
    3.43      else if (strcmp(test_class_name, "BloblistTests") == 0)
    3.44 @@ -187,8 +189,6 @@
    3.45          *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
    3.46      else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
    3.47          *test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
    3.48 -    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
    3.49 -        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
    3.50      else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
    3.51          *test_suite = new ExternalRevokeTests(test_class_name, test_home);
    3.52      else if (strcmp(test_class_name, "UserIDAliasTests") == 0)