Lines Matching refs:srk
844 struct sk_resident_key *srk = NULL, **tmp; in read_rks() local
925 if ((srk = calloc(1, sizeof(*srk))) == NULL || in read_rks()
926 (srk->key.key_handle = calloc(1, in read_rks()
928 (srk->application = strdup(fido_credman_rp_id(rp, in read_rks()
934 srk->key.key_handle_len = fido_cred_id_len(cred); in read_rks()
935 memcpy(srk->key.key_handle, in read_rks()
937 srk->key.key_handle_len); in read_rks()
941 srk->alg = SSH_SK_ECDSA; in read_rks()
944 srk->alg = SSH_SK_ED25519; in read_rks()
952 if ((r = pack_public_key(srk->alg, cred, in read_rks()
953 &srk->key)) != 0) { in read_rks()
964 (*rksp)[(*nrksp)++] = srk; in read_rks()
965 srk = NULL; in read_rks()
971 if (srk != NULL) { in read_rks()
972 free(srk->application); in read_rks()
973 freezero(srk->key.public_key, srk->key.public_key_len); in read_rks()
974 freezero(srk->key.key_handle, srk->key.key_handle_len); in read_rks()
975 freezero(srk, sizeof(*srk)); in read_rks()