Skip to content

Commit

Permalink
private key is not needed and not used when a signed csr is specified…
Browse files Browse the repository at this point in the history
… using -y
  • Loading branch information
mpeck12 committed May 14, 2015
1 parent dbd1512 commit 6eaac27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/client/estclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ int main (int argc, char **argv)
est_init_logger(EST_LOG_LVL_ERR, &test_logger_stdout);
}

if (!priv_key_file[0] && enroll) {
if (!priv_key_file[0] && enroll && !csr_file[0]) {
printf("\nA private key is required for enrolling. Creating a new RSA key pair since you didn't provide a key using the -x option.");
/*
* Create a private key that will be used for the
Expand All @@ -1072,7 +1072,7 @@ int main (int argc, char **argv)

}

if (enroll) {
if (enroll && !csr_file[0]) {
/* Read in the private key file */
priv_key = read_private_key(priv_key_file);
}
Expand Down

0 comments on commit 6eaac27

Please sign in to comment.