Changeset 4455:ac1b2db3dff9 in roaraudio


Ignore:
Timestamp:
10/09/10 23:29:17 (8 years ago)
Author:
phi
Branch:
default
Message:

bring up gcrypt if needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/crypto.c

    r4454 r4455  
    3636#include "libroar.h" 
    3737 
     38#ifdef ROAR_HAVE_LIBGCRYPT 
     39#include <gcrypt.h> 
     40#endif 
     41 
    3842int roar_crypto_init (void) { 
    3943 static int inited = 0; 
     
    4246  return 0; 
    4347 
     48#ifdef ROAR_HAVE_LIBGCRYPT 
     49 if ( !gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P) ) { 
     50  ROAR_INFO("roar_crypto_init(void): libgcrypt not yet inited, initing it now.", ROAR_DBG_INFO_INFO); 
     51  if ( !gcry_check_version(GCRYPT_VERSION) ) { 
     52   ROAR_ERR("roar_crypto_init(void): libgcrypt version missmatch"); 
     53   return -1; 
     54  } 
     55 
     56  // what about SECMEM? 
     57 
     58  gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); 
     59 } 
     60#endif 
     61 
    4462 inited = 1; 
    4563 return 0; 
Note: See TracChangeset for help on using the changeset viewer.