aboutsummaryrefslogtreecommitdiff
path: root/src/pki_gcrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pki_gcrypt.c')
-rw-r--r--src/pki_gcrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c
index c2668315..28b4badb 100644
--- a/src/pki_gcrypt.c
+++ b/src/pki_gcrypt.c
@@ -808,7 +808,7 @@ ssh_key pki_key_dup(const ssh_key key, int demote)
ssh_string_fill(y, (char *)tmp, size);
gcry_sexp_release(sexp);
- if (!demote && (key->flags == SSH_KEY_FLAG_PRIVATE)) {
+ if (!demote && (key->flags & SSH_KEY_FLAG_PRIVATE)) {
sexp = gcry_sexp_find_token(key->dsa, "x", 0);
if (sexp == NULL) {
goto fail;
@@ -877,7 +877,7 @@ ssh_key pki_key_dup(const ssh_key key, int demote)
ssh_string_fill(e, (char *)tmp, size);
gcry_sexp_release(sexp);
- if (!demote && (key->flags == SSH_KEY_FLAG_PRIVATE)) {
+ if (!demote && (key->flags & SSH_KEY_FLAG_PRIVATE)) {
sexp = gcry_sexp_find_token(key->rsa, "d", 0);
if (sexp == NULL) {
goto fail;