Added hardcoded sequoia micalg ENGINE-633
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Mon, 23 Sep 2019 15:00:30 +0200
branchENGINE-633
changeset 408547e056f8a2d7
parent 4084 44135988583a
Added hardcoded sequoia micalg
src/pgp_sequoia.c
     1.1 --- a/src/pgp_sequoia.c	Mon Sep 23 14:56:17 2019 +0200
     1.2 +++ b/src/pgp_sequoia.c	Mon Sep 23 15:00:30 2019 +0200
     1.3 @@ -1594,7 +1594,7 @@
     1.4  
     1.5  PEP_STATUS pgp_sign_only(
     1.6      PEP_SESSION session, const char* fpr, const char *ptext,
     1.7 -    size_t psize, char **stext, size_t *ssize)
     1.8 +    size_t psize, char **stext, size_t *ssize, PEP_HASH_ALGO* micalg)
     1.9  {
    1.10      assert(session);
    1.11      assert(fpr && fpr[0]);
    1.12 @@ -1604,6 +1604,10 @@
    1.13      assert(ssize);
    1.14      *stext = NULL;
    1.15      *ssize = 0;
    1.16 +    
    1.17 +    // FIXME: Hardcoded for now because it's what sequoia uses. Change here if this changes. 
    1.18 +    if (micalg)
    1.19 +        *micalg = SHA512;
    1.20  
    1.21      PEP_STATUS status = PEP_STATUS_OK;
    1.22      pgp_error_t err = NULL;