Changeset 4454:8d5b183324bc in roaraudio


Ignore:
Timestamp:
10/09/10 23:01:26 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

implemented a overall crypto init function

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/libroar.h

    r4446 r4454  
    119119#include "stack.h" 
    120120#include "buffer.h" 
     121#include "crypto.h" 
    121122#include "random.h" 
    122123#include "hash.h" 
  • libroar/Makefile

    r4446 r4454  
    88VIO_BRIDGE=vio_bio.o vio_stdio.o 
    99VIO=$(VIO_META) $(VIO_BRIDGE) vio_cmd.o vio_magic.o vio_pipe.o vio_socket.o vio_winsock.o vio_stack.o vio_jumbo.o vio_proto.o vio_dstr.o vio_tantalos.o vio_rtp.o vio_buffer.o vio_buffer_store.o 
    10 CRYPTO=random.o hash.o 
     10CRYPTO=crypto.o random.o hash.o 
    1111OBJS=libroar.o config.o debug.o error.o basic.o stream.o client.o simple.o auth.o socket.o ctl.o buffer.o meta.o file.o acl.o cdrom.o pinentry.o sshaskpass.o $(VIO) stack.o slp.o nnode.o roardl.o roarx11.o beep.o proto.o env.o keyval.o vs.o ltm.o notify.o notify_proxy.o asyncctl.o enumdev.o serverinfo.o $(CRYPTO) 
    1212 
  • libroar/hash.c

    r4453 r4454  
    135135 
    136136int          roar_ht_is_supported(const int    ht) { 
     137 roar_crypto_init(); 
     138 
    137139#ifdef ROAR_HAVE_LIBGCRYPT 
    138140 if ( roar_ht2gcrypt_tested(ht) == -1 ) 
     
    146148 
    147149int roar_hash_buffer(void * digest, const void * data, size_t datalen, int algo) { 
     150 roar_crypto_init(); 
     151 
    148152 return roar_hash_salted_buffer(digest, data, datalen, algo, NULL, 0); 
    149153} 
     
    152156static inline int roar_hash_salted_buffer_gcrypt(void * digest, const void * data, size_t datalen, int algo, const void * salt, size_t saltlen) { 
    153157 gcry_md_hd_t hdl; 
     158 
     159 roar_crypto_init(); 
    154160 
    155161 algo = roar_ht2gcrypt_tested(algo); 
  • libroar/random.c

    r4447 r4454  
    4747 
    4848 // add stuff here needed to bring up random source. 
     49 roar_crypto_init(); 
    4950 
    5051 inited = 1; 
Note: See TracChangeset for help on using the changeset viewer.