Changeset View
Changeset View
Standalone View
Standalone View
b/g10/pubkey-enc.c
Context not available. | |||||
* which should have been allocated in secure memory by the caller. | * which should have been allocated in secure memory by the caller. | ||||
*/ | */ | ||||
gpg_error_t | gpg_error_t | ||||
get_session_key (PKT_pubkey_enc * k, DEK * dek) | get_session_key (ctrl_t ctrl, PKT_pubkey_enc * k, DEK * dek) | ||||
{ | { | ||||
PKT_public_key *sk = NULL; | PKT_public_key *sk = NULL; | ||||
int rc; | int rc; | ||||
Context not available. | |||||
{ | { | ||||
free_public_key (sk); | free_public_key (sk); | ||||
sk = xmalloc_clear (sizeof *sk); | sk = xmalloc_clear (sizeof *sk); | ||||
rc = enum_secret_keys (&enum_context, sk); | rc = enum_secret_keys (ctrl, &enum_context, sk); | ||||
if (rc) | if (rc) | ||||
{ | { | ||||
rc = GPG_ERR_NO_SECKEY; | rc = GPG_ERR_NO_SECKEY; | ||||
Context not available. | |||||
else if (gpg_err_code (rc) == GPG_ERR_FULLY_CANCELED) | else if (gpg_err_code (rc) == GPG_ERR_FULLY_CANCELED) | ||||
break; /* Don't try any more secret keys. */ | break; /* Don't try any more secret keys. */ | ||||
} | } | ||||
enum_secret_keys (&enum_context, NULL); /* free context */ | enum_secret_keys (ctrl, &enum_context, NULL); /* free context */ | ||||
} | } | ||||
leave: | leave: | ||||
Context not available. |