Home | History | Annotate | Download | only in openssh

Lines Matching defs:private

160 /* Use new OpenSSH private key format when writing SSH2 keys instead of PEM */
163 /* Cipher for new-format private keys */
299 #define SSH_COM_PRIVATE_BEGIN "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----"
570 do_convert_from_ssh2(struct passwd *pw, struct sshkey **k, int *private)
588 *private = 1;
613 if (*private)
623 do_convert_from_pkcs8(struct sshkey **k, int *private)
666 do_convert_from_pem(struct sshkey **k, int *private)
696 fatal("%s: unrecognised raw private key format", __func__);
703 int r, private = 0, ok = 0;
713 do_convert_from_ssh2(pw, &k, &private);
716 do_convert_from_pkcs8(&k, &private);
719 do_convert_from_pem(&k, &private);
725 if (!private) {
963 struct sshkey *private, *public;
988 if ((r = sshkey_generate(type, bits, &private)) != 0) {
994 if ((r = sshkey_from_private(private, &public)) != 0)
998 if ((r = sshkey_save_private(private, identity_file, "",
1002 sshkey_free(private);
1007 sshkey_free(private);
1249 struct sshkey *private;
1259 r = sshkey_load_private(identity_file, "", &private, &comment);
1268 &private, &comment);
1308 if ((r = sshkey_save_private(private, identity_file, passphrase1,
1314 sshkey_free(private);
1321 sshkey_free(private); /* Destroys contents */
1359 * Change the comment of a private key file.
1365 struct sshkey *private;
1378 &private, &comment)) == 0)
1381 printf("Cannot load private key \"%s\": %s.\n",
1394 &private, &comment)) != 0) {
1397 printf("Cannot load private key \"%s\": %s.\n",
1402 if (private->type != KEY_RSA1) {
1404 sshkey_free(private);
1416 sshkey_free(private);
1423 if ((r = sshkey_save_private(private, identity_file, passphrase,
1429 sshkey_free(private);
1435 if ((r = sshkey_from_private(private, &public)) != 0)
1437 sshkey_free(private);
1561 struct sshkey **keys = NULL, *public, *private = NULL;
1574 private = keys[i];
1581 return private;
2241 struct sshkey *private, *public;
2621 printf("Generating public/private %s key pair.\n",
2623 if ((r = sshkey_generate(type, bits, &private)) != 0) {
2627 if ((r = sshkey_from_private(private, &public)) != 0) {
2698 if ((r = sshkey_save_private(private, identity_file, passphrase1,
2710 /* Clear the private key and the random number generator. */
2711 sshkey_free(private);