private_key = RSA_new();
do_change_comment(struct passwd *pw){	char new_comment[1024], *comment;	RSA *private_key;	char *passphrase;	struct stat st;	FILE *f;	char *tmpbuf;	if (!have_identity)		ask_filename(pw, "Enter file in which the key is");	if (stat(identity_file, &st) < 0) {		perror(identity_file);		exit(1);	}	/*	 * Try to load the public key from the file the verify that it is	 * readable and of the proper format.	 */	public_key = RSA_new();	if (!load_public_key(identity_file, public_key, NULL)) {		printf("%s is not a valid key file.\n", identity_file);		exit(1);	}	private_key = RSA_new();	if (load_private_key(identity_file, "", private_key, &comment))		passphrase = xstrdup("");	else {		if (identity_passphrase)			passphrase = xstrdup(identity_passphrase);		else if (identity_new_passphrase)			passphrase = xstrdup(identity_new_passphrase);		else			passphrase = read_passphrase("Enter passphrase: ", 1);		/* Try to load using the passphrase. */		if (!load_private_key(identity_file, passphrase, private_key, &comment)) {			memset(passphrase, 0, strlen(passphrase));			xfree(passphrase);			printf("Bad passphrase.\n");			exit(1);		}	}	printf("Key now has comment '%s'\n", comment);	if (identity_comment) {		strlcpy(new_comment, identity_comment, sizeof(new_comment));	} else {		printf("Enter new comment: ");		fflush(stdout);		if (!fgets(new_comment, sizeof(new_comment), stdin)) {			memset(passphrase, 0, strlen(passphrase));			RSA_free(private_key);			exit(1);		}		if (strchr(new_comment, '\n'))			*strchr(new_comment, '\n') = 0;	}	/* Save the file using the new passphrase. */	if (!save_private_key(identity_file, passphrase, private_key, new_comment)) {		printf("Saving the key failed: %s: %s.\n",		       identity_file, strerror(errno));		memset(passphrase, 0, strlen(passphrase));		xfree(passphrase);		RSA_free(private_key);		xfree(comment);		exit(1);	}	memset(passphrase, 0, strlen(passphrase));	xfree(passphrase);	RSA_free(private_key);	strlcat(identity_file, ".pub", sizeof(identity_file));	f = fopen(identity_file, "w");	if (!f) {		printf("Could not save your public key in %s\n", identity_file);		exit(1);	}	fprintf(f, "%d ", BN_num_bits(public_key->n));	tmpbuf = BN_bn2dec(public_key->e);	fprintf(f, "%s ", tmpbuf);	free(tmpbuf);	tmpbuf = BN_bn2dec(public_key->n);	fprintf(f, "%s %s\n", tmpbuf, new_comment);	free(tmpbuf);	fclose(f);	xfree(comment);	printf("The comment in your key file has been changed.\n");	exit(0);}