Mercurial > openid
comparison src/c/openid.c @ 38:8d23d76b5d48
Stop setting an id callback
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Mon, 16 May 2011 22:31:26 -0400 |
parents | f129ddee75f3 |
children | 5415f1ded564 |
comparison
equal
deleted
inserted
replaced
37:e31baf0f275e | 38:8d23d76b5d48 |
---|---|
37 pthread_mutex_lock(&locks[n]); | 37 pthread_mutex_lock(&locks[n]); |
38 else | 38 else |
39 pthread_mutex_unlock(&locks[n]); | 39 pthread_mutex_unlock(&locks[n]); |
40 } | 40 } |
41 | 41 |
42 static unsigned long id_function() { | |
43 return pthread_self(); | |
44 } | |
45 | |
46 uw_unit uw_OpenidFfi_init(uw_context ctx) { | 42 uw_unit uw_OpenidFfi_init(uw_context ctx) { |
47 int nl = CRYPTO_num_locks(), i; | 43 int nl = CRYPTO_num_locks(), i; |
48 locks = malloc(sizeof(pthread_mutex_t) * nl); | 44 locks = malloc(sizeof(pthread_mutex_t) * nl); |
49 for (i = 0; i < nl; ++i) | 45 for (i = 0; i < nl; ++i) |
50 pthread_mutex_init(&locks[i], NULL); | 46 pthread_mutex_init(&locks[i], NULL); |
51 | 47 |
52 CRYPTO_set_locking_callback(locking_function); | 48 CRYPTO_set_locking_callback(locking_function); |
53 CRYPTO_set_id_callback(id_function); | |
54 curl_global_init(CURL_GLOBAL_ALL); | 49 curl_global_init(CURL_GLOBAL_ALL); |
55 | 50 |
56 BN_hex2bn(&default_prime, DEFAULT_PRIME); | 51 BN_hex2bn(&default_prime, DEFAULT_PRIME); |
57 BN_dec2bn(&default_generator, DEFAULT_GENERATOR); | 52 BN_dec2bn(&default_generator, DEFAULT_GENERATOR); |
58 | 53 |