15 #define PRIVKEY_SEARCH_MIN_LENGTH (1 + 1 + 4 + 1)
28 if (!(
start[1] & 0x80)) {
33 const int lensize =
start[1] & 0x7f;
34 for (
i = 0;
i < lensize;
i++) {
37 return start + 2 + lensize;
45 #define KEY_MAX_LEN 26000
58 ptr = ptr + field_len;
72 int i,
k,
max, index, t;
75 const size_t old_nhits =
s->nhits;
76 const ut8 rsa_versionmarker[] = { 0x02, 0x01, 0x00, 0x02 };
77 const ut8 ecc_versionmarker[] = { 0x02, 0x01, 0x01, 0x04 };
78 const ut8 safecurves_versionmarker[] = { 0x02, 0x01, 0x00, 0x30 };
84 rz_list_foreach (
s->kws,
iter, kw) {
87 if (memcmp(
buf +
i, rsa_versionmarker,
sizeof(rsa_versionmarker)) &&
88 memcmp(
buf +
i, ecc_versionmarker,
sizeof(ecc_versionmarker)) &&
89 memcmp(
buf +
i, safecurves_versionmarker,
sizeof(safecurves_versionmarker))) {
100 for (
k =
i - 2;
k >=
i -
max;
k--) {
101 if (
buf[
k] == 0x30) {
115 return s->nhits - old_nhits;
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
static int check_fields(const ut8 *start)
RZ_API int rz_search_privkey_update(RzSearch *s, ut64 from, const ut8 *buf, int len)
#define PRIVKEY_SEARCH_MIN_LENGTH
static const ut8 * parse_next_field(const ut8 *start, ut32 *len)
RZ_API int rz_search_hit_new(RzSearch *s, RzSearchKeyword *kw, ut64 addr)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
ut64(WINAPI *w32_GetEnabledXStateFeatures)()