<commit_before>/*
 * Card profile information
 *
 * Copyright (C) 2002 <NAME> <<EMAIL>>
 */

#ifndef _OPENSC_PROFILE_H
#define _OPENSC_PROFILE_H

#include <openssl/rsa.h>
#include <openssl/dsa.h>
#include "opensc-pkcs15.h"

struct auth_info {
	struct auth_info *	next;
	unsigned int		type;		/* CHV, AUT, PRO */
	unsigned int		id;		/* CHV1, KEY0, ... */
	unsigned int		ref;
	size_t			key_len;
	u8			key[32];
};

struct file_info {
	char *			ident;
	struct file_info *	next;
	struct sc_file *	file;

	/* PKCS15 book-keeping info */
	struct {
		unsigned int	fileno;
		unsigned int	type;
	}			pkcs15;
};

/* For now, we assume the PUK always resides
 * in the same file as the PIN
 */
struct pin_info {
	char *			ident;
	unsigned int		id;		/* 1 == CHV1, 2 == CHV2 */
	struct pin_info *	next;
	struct file_info *	file;
	unsigned int		file_offset;
	unsigned int		attempt[2];

	struct sc_pkcs15_pin_info pkcs15;

	/* These are set while initializing the card */
	char *			secret[2];
};

struct prkey_info {
	char *			ident;
	struct prkey_info *	next;
	struct file_info *	file;
	unsigned int		type;
	unsigned int		index;	/* translates to file offset */
	struct sc_acl_entry *	key_acl;/* PINs for key usage */

	struct sc_pkcs15_prkey_info pkcs15;
};

struct sc_profile {
	char *			driver;

	struct file_info	mf_info;
	struct file_info	df_info;
	struct file_info *	ef_list;
	struct pin_info *	pin_list;
	struct auth_info *	auth_list;
	struct prkey_info *	prkey_list;

	unsigned int		pin_maxlen;
	unsigned int		pin_minlen;
	unsigned int		pin_pad_char;<commit_msg>- Added support for Juha's latest API changes<commit_after>/*
 * Card profile information
 *
 * Copyright (C) 2002 <NAME> <<EMAIL>>
 */

#ifndef _OPENSC_PROFILE_H
#define _OPENSC_PROFILE_H

#include <openssl/rsa.h>
#include <openssl/dsa.h>
#include "opensc-pkcs15.h"

struct auth_info {
	struct auth_info *	next;
	unsigned int		type;		/* CHV, AUT, PRO */
	unsigned int		id;		/* CHV1, KEY0, ... */
	unsigned int		ref;
	size_t			key_len;
	u8			key[32];
};

struct file_info {
	char *			ident;
	struct file_info *	next;
	struct sc_file *	file;

	/* PKCS15 book-keeping info */
	struct {
		unsigned int	fileno;
		unsigned int	type;
	}			pkcs15;
};

/* For now, we assume the PUK always resides
 * in the same file as the PIN
 */
struct pin_info {
	char *			ident;
	unsigned int		id;		/* 1 == CHV1, 2 == CHV2 */
	struct pin_info *	next;
	struct file_info *	file;
	unsigned int		file_offset;
	unsigned int		attempt[2];

	struct sc_pkcs15_object	pkcs15_obj;
	struct sc_pkcs15_pin_info pkcs15;

	/* These are set while initializing the card */
	char *			secret[2];
};

struct prkey_info {
	char *			ident;
	struct prkey_info *	next;
	struct file_info *	file;
	unsigned int		index;	/* translates to file offset */
	struct sc_acl_entry *	key_acl;/* PINs for key usage */

	struct sc_pkcs15_object	pkcs15_obj;
	struct sc_pkcs15_prkey_info pkcs15;
};

struct sc_profile {
	char *			driver;

	struct file_info	mf_info;
	struct file_info	df_info;
	struct file_info *	ef_list;
	struct pin_info *	pin_list;
	struct auth_info *	auth_list;
	struct prkey_info *	prkey_list;

	unsigned int		pin_maxlen;
	unsigned int		pin_minlen;
	unsigned int		pin_pad_char;
	unsigned int		rsa_access_flags;
	unsigned int		dsa_access_flags;
{'fraction_non_alphanumeric': 0.09794289223211544, 'fraction_numerical': 0.02026404666871354, 'mean_word_length': 3.6016949152542375, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5068985', 'n_tokens_mistral': 1376, 'n_tokens_neox': 1293, 'n_words': 363}