version 1.12.4.1, 2007/11/06 23:07:33 |
version 1.15.4.1, 2009/02/08 18:42:15 |
Line 676 eay_get_x509subjectaltname(cert, altname |
|
Line 676 eay_get_x509subjectaltname(cert, altname |
|
{ |
{ |
plog(LLV_ERROR, LOCATION, NULL, |
plog(LLV_ERROR, LOCATION, NULL, |
"data is not terminated by NUL."); |
"data is not terminated by NUL."); |
hexdump(gen->d.ia5->data, gen->d.ia5->length + 1); |
racoon_hexdump(gen->d.ia5->data, gen->d.ia5->length + 1); |
goto end; |
goto end; |
} |
} |
|
|
Line 1294 eay_idea_encrypt(data, key, iv) |
|
Line 1294 eay_idea_encrypt(data, key, iv) |
|
vchar_t *res; |
vchar_t *res; |
IDEA_KEY_SCHEDULE ks; |
IDEA_KEY_SCHEDULE ks; |
|
|
idea_set_encrypt_key(key->v, &ks); |
idea_set_encrypt_key((unsigned char *)key->v, &ks); |
|
|
/* allocate buffer for result */ |
/* allocate buffer for result */ |
if ((res = vmalloc(data->l)) == NULL) |
if ((res = vmalloc(data->l)) == NULL) |
return NULL; |
return NULL; |
|
|
/* decryption data */ |
/* decryption data */ |
idea_cbc_encrypt(data->v, res->v, data->l, |
idea_cbc_encrypt((unsigned char *)data->v, (unsigned char *)res->v, data->l, |
&ks, iv->v, IDEA_ENCRYPT); |
&ks, (unsigned char *)iv->v, IDEA_ENCRYPT); |
|
|
return res; |
return res; |
} |
} |
Line 1314 eay_idea_decrypt(data, key, iv) |
|
Line 1314 eay_idea_decrypt(data, key, iv) |
|
vchar_t *res; |
vchar_t *res; |
IDEA_KEY_SCHEDULE ks, dks; |
IDEA_KEY_SCHEDULE ks, dks; |
|
|
idea_set_encrypt_key(key->v, &ks); |
idea_set_encrypt_key((unsigned char *)key->v, &ks); |
idea_set_decrypt_key(&ks, &dks); |
idea_set_decrypt_key(&ks, &dks); |
|
|
/* allocate buffer for result */ |
/* allocate buffer for result */ |
Line 1322 eay_idea_decrypt(data, key, iv) |
|
Line 1322 eay_idea_decrypt(data, key, iv) |
|
return NULL; |
return NULL; |
|
|
/* decryption data */ |
/* decryption data */ |
idea_cbc_encrypt(data->v, res->v, data->l, |
idea_cbc_encrypt((unsigned char *)data->v, (unsigned char *)res->v, data->l, |
&dks, iv->v, IDEA_DECRYPT); |
&dks, (unsigned char *)iv->v, IDEA_DECRYPT); |
|
|
return res; |
return res; |
} |
} |
Line 1392 eay_rc5_encrypt(data, key, iv) |
|
Line 1392 eay_rc5_encrypt(data, key, iv) |
|
RC5_32_KEY ks; |
RC5_32_KEY ks; |
|
|
/* in RFC 2451, there is information about the number of round. */ |
/* in RFC 2451, there is information about the number of round. */ |
RC5_32_set_key(&ks, key->l, key->v, 16); |
RC5_32_set_key(&ks, key->l, (unsigned char *)key->v, 16); |
|
|
/* allocate buffer for result */ |
/* allocate buffer for result */ |
if ((res = vmalloc(data->l)) == NULL) |
if ((res = vmalloc(data->l)) == NULL) |
return NULL; |
return NULL; |
|
|
/* decryption data */ |
/* decryption data */ |
RC5_32_cbc_encrypt(data->v, res->v, data->l, |
RC5_32_cbc_encrypt((unsigned char *)data->v, (unsigned char *)res->v, data->l, |
&ks, iv->v, RC5_ENCRYPT); |
&ks, (unsigned char *)iv->v, RC5_ENCRYPT); |
|
|
return res; |
return res; |
} |
} |
Line 1413 eay_rc5_decrypt(data, key, iv) |
|
Line 1413 eay_rc5_decrypt(data, key, iv) |
|
RC5_32_KEY ks; |
RC5_32_KEY ks; |
|
|
/* in RFC 2451, there is information about the number of round. */ |
/* in RFC 2451, there is information about the number of round. */ |
RC5_32_set_key(&ks, key->l, key->v, 16); |
RC5_32_set_key(&ks, key->l, (unsigned char *)key->v, 16); |
|
|
/* allocate buffer for result */ |
/* allocate buffer for result */ |
if ((res = vmalloc(data->l)) == NULL) |
if ((res = vmalloc(data->l)) == NULL) |
return NULL; |
return NULL; |
|
|
/* decryption data */ |
/* decryption data */ |
RC5_32_cbc_encrypt(data->v, res->v, data->l, |
RC5_32_cbc_encrypt((unsigned char *)data->v, (unsigned char *)res->v, data->l, |
&ks, iv->v, RC5_DECRYPT); |
&ks, (unsigned char *)iv->v, RC5_DECRYPT); |
|
|
return res; |
return res; |
} |
} |