search for: key_data

Displaying 1 result from an estimated 1 matches for "key_data".

2010 Apr 09
4
Patch: support URLAUTH, BURL, CATENATE
...<openssl/hmac.h> + +#define URLAUTH_URLAUTH_INTERNAL_VERSION "d1" /* must be hex */ + +// compute the urlauth token using the INTERNAL mechanism +void urlauth_urlauth_generate_internal(const char *rump, + const buffer_t *key, + string_t *urlauth) +{ + const void *key_data; + size_t key_len = 0; + unsigned char mac[EVP_MAX_MD_SIZE]; + unsigned int mac_len = 0; + + // compute HMAC-SHA1 of rump with key + key_data = buffer_get_data(key, &key_len); + i_assert(key_len > 0); + HMAC(EVP_sha1(), key_data, key_len, (const unsigned char *) rump, + strlen(rump), ma...