Lines Matching defs:key_data
150 bool dcrypt_openssl_key_string_get_info(const char *key_data, enum dcrypt_key_format *format_r, enum dcrypt_key_version *version_r,
993 buffer_t *key_data = t_buffer_create(128);
995 digalgo, rounds, key_data,
1004 const unsigned char *kd = buffer_free_without_data(&key_data);
1032 buffer_t *key_data = t_buffer_create(256);
1064 if (hex_to_binary(input[3], key_data) != 0) {
1120 input[5], rounds, key_data, error_r)) {
1147 input[5], rounds, key_data, error_r)) {
1155 const unsigned char *ptr = buffer_get_data(key_data, NULL);
1157 d2i_RSAPrivateKey(&rsa, &ptr, key_data->used) == NULL ||
1159 safe_memset(buffer_get_modifiable_data(key_data, NULL), 0, key_data->used);
1163 safe_memset(buffer_get_modifiable_data(key_data, NULL), 0, key_data->used);
1164 buffer_set_used_size(key_data, 0);
1179 BN_mpi2bn(key_data->data, key_data->used, point) == NULL) {
1180 safe_memset(buffer_get_modifiable_data(key_data, NULL), 0, key_data->used);
1185 safe_memset(buffer_get_modifiable_data(key_data, NULL), 0, key_data->used);
1186 buffer_set_used_size(key_data, 0);
1225 dcrypt_openssl_private_key_id(*key_r, "sha256", key_data, NULL);
1227 if (strcmp(binary_to_hex(key_data->data, key_data->used), input[len-1]) != 0) {
1820 bool dcrypt_openssl_key_string_get_info(const char *key_data, enum dcrypt_key_format *format_r, enum dcrypt_key_version *version_r,
1831 i_assert(key_data != NULL);
1834 if (strncmp(key_data, "-----BEGIN ", 11) == 0) {
1837 key_data += 11;
1838 if (strncmp(key_data, "RSA ", 4) == 0) {
1845 if (strncmp(key_data, "ENCRYPTED ", 10) == 0) {
1847 key_data += 10;
1849 if (strncmp(key_data, "PRIVATE KEY-----", 16) == 0)
1851 else if (strncmp(key_data, "PUBLIC KEY-----", 15) == 0)
1859 if (strncmp(key_data, "1:", 2) == 0) {
1864 } else if (strncmp(key_data, "2\t", 2) == 0) {
1870 const char **fields = t_strsplit(key_data, ":\t");