RSA_free(public_key);
key_free(public);
do_fingerprint(struct passwd *pw){	FILE *f;	BIGNUM *e, *n;	RSA *public_key;	char *comment = NULL, *cp, *ep, line[16*1024];	int i, skip = 0, num = 1, invalid = 1;	unsigned int ignore;	struct stat st;	if (!have_identity)		ask_filename(pw, "Enter file in which the key is");	if (stat(identity_file, &st) < 0) {		perror(identity_file);		exit(1);	}		public_key = RSA_new();	if (load_public_key(identity_file, public_key, &comment)) {		printf("%d %s %s\n", BN_num_bits(public_key->n),		    fingerprint(public_key->e, public_key->n),		    comment);		RSA_free(public_key);		exit(0);	}	RSA_free(public_key);	f = fopen(identity_file, "r");	if (f != NULL) {		n = BN_new();		e = BN_new();		while (fgets(line, sizeof(line), f)) {			i = strlen(line) - 1;			if (line[i] != '\n') {				error("line %d too long: %.40s...", num, line);				skip = 1;				continue;			}			num++;			if (skip) {				skip = 0;				continue;			}			line[i] = '\0';			/* Skip leading whitespace, empty and comment lines. */			for (cp = line; *cp == ' ' || *cp == '\t'; cp++)				;			if (!*cp || *cp == '\n' || *cp == '#')				continue ;			i = strtol(cp, &ep, 10);			if (i == 0 || ep == NULL || (*ep != ' ' && *ep != '\t')) {				int quoted = 0;				comment = cp;				for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) {					if (*cp == '\\' && cp[1] == '"')						cp++;	/* Skip both */					else if (*cp == '"')						quoted = !quoted;				}				if (!*cp)					continue;				*cp++ = '\0';			}			ep = cp;			if (auth_rsa_read_key(&cp, &ignore, e, n)) {				invalid = 0;				comment = *cp ? cp : comment;				printf("%d %s %s\n", BN_num_bits(n),				    fingerprint(e, n),				    comment ? comment : "no comment");			}		}		BN_free(e);		BN_free(n);		fclose(f);	}	if (invalid) {		printf("%s is not a valid key file.\n", identity_file);		exit(1);	}	exit(0);}