PKCS15DEFINITIONS DEFINITIONS ::= BEGIN	
    
    TokenInfo ::= SEQUENCE {
            version				INTEGER,
            serialNumber		OCTET STRING,
            manufacturerID		UTF8String,
            label			[0]	IMPLICIT UTF8String,          
            tokenflags			TokenFlags
    } 

    TokenInfoT61 ::= SEQUENCE {
            version			INTEGER,
            serialNumber	OCTET STRING,
            manufacturerID	T61String, 
            label			T61String,                   
            tokenflags		TokenFlags
    } 
						
    TokenFlags ::= BIT STRING {
	        readonly		(0),
	        loginRequired	(1),
	        prnGeneration	(2),
	        eidCompliant	(3)
	 }
   
	CertificateObject ::= SEQUENCE {
				commonObjectAttributes		CommonObjectAttributes,
				classAttributes				CommonCertificateAttributes,
				typeAttributes			[1] X509CertificateAttributes
	}    
	
	CertificateObjectCERES ::= SEQUENCE {
				commonObjectAttributes		CommonObjectAttributes,
				classAttributes				CommonCertificateAttributes,
				typeAttributes			[1] IMPLICIT X509CertificateAttributesCeres
	}    
	
	CommonObjectAttributes ::= SEQUENCE {
				label		LabelCERES OPTIONAL,		
				flags  		CommonObjectFlags OPTIONAL,
				authId 		OCTET STRING OPTIONAL
	} 
  
	CommonObjectFlags ::= BIT STRING {
				private		(0),
				modifiable 	(1)
	}
		
	CommonCertificateAttributes ::= SEQUENCE {
				iD 				OCTET STRING
	}

	X509CertificateAttributes ::= SEQUENCE {
				value				Path,
				subject  			ANY, -- OPTIONAL,			
				issuer 			[0] ANY,
				serialNumber 		CertificateSerialNumber
	}	
	
	X509CertificateAttributesCeres ::= SEQUENCE {
				value				Path,						
				issuer 			[0] EXPLICIT ANY,
				subject  		[1]	EXPLICIT ANY, 	
				serialNumber 		CertificateSerialNumber
	}		
		
	CertificateSerialNumber ::= INTEGER

	Path ::= SEQUENCE {
				path 		OCTET STRING,
				index  		INTEGER OPTIONAL,
				length 		[0] IMPLICIT INTEGER OPTIONAL
	}

	Label ::= UTF8String
	LabelCERES ::= CHOICE {
				tipoutf8string		UTF8String,
				tipot61string		T61String
	}    
			
	PrivateKeyObject ::= SEQUENCE {
				commonObjectAttributes	CommonObjectAttributes,
				classAttributes			CommonKeyAttributes,
				subClassAttributes 	[0] ANY OPTIONAL,
				typeAttributes		[1] PrivateRSAKeyAttributes
	}
	
	PrivateKeyObjectCERES ::= SEQUENCE {
				commonObjectAttributes	CommonObjectAttributes,
				classAttributes			CommonKeyAttributes,
				subClassAttributes 	[0] ANY OPTIONAL,
				typeAttributes		[1] IMPLICIT PrivateRSAKeyAttributes
	}
						
	CommonKeyAttributes ::= SEQUENCE {
				iD 		 		OCTET STRING,
				usage 	 		KeyUsageFlags,
				native	 		BOOLEAN, -- DEFAULT TRUE,
				accessFlags		KeyAccessFlags OPTIONAL,
				keyReference 	INTEGER, -- OPTIONAL
				startDate		GeneralizedTime OPTIONAL,
				endDate		[0]	ANY OPTIONAL
	}
		
	KeyUsageFlags ::= BIT STRING {
				encrypt 			(0),
				decrypt 			(1),
				sign 				(2),
				signRecover 		(3),
				wrap 				(4),
				unwrap 				(5),
				verify 				(6),
				verifyRecover		(7),
				derive 				(8),
				nonRepudiation		(9)
	}
	
	KeyAccessFlags ::= BIT STRING {
				sensitive  			(0),
				extractable 		(1),
				alwaysSensitive 	(2),
				neverExtractable	(3),
				local				(4)
	}
							
	PrivateRSAKeyAttributes ::= SEQUENCE {
				value 			Path,
				modulusLength 	INTEGER
	} 		
	
	PublicKeyObject ::= SEQUENCE {
				commonObjectAttributes	CommonObjectAttributes,
				classAttributes			CommonKeyAttributes,
				subClassAttributes 	[0] ANY OPTIONAL,
				typeAttributes		[1] PublicRSAKeyAttributes
	}
	
	PublicKeyObjectCERES ::= SEQUENCE {
				commonObjectAttributes	CommonObjectAttributes,
				classAttributes			CommonKeyAttributes,
				subClassAttributes 	[0] ANY OPTIONAL,
				typeAttributes		[1] IMPLICIT PublicRSAKeyAttributes
	}
	
	PublicRSAKeyAttributes ::= SEQUENCE {
				value 			Path,
				modulusLength 	INTEGER
	} 
	
	DataObject ::= SEQUENCE {
				commonObjectAttributes	CommonObjectAttributes,
				classAttributes			CommonDataObjectAttributes,
				subClassAttributes 		[0] ANY OPTIONAL,
				typeAttributes			[1] Path
	}
	
	CommonDataObjectAttributes ::= SEQUENCE {
				applicationName			LabelCERES OPTIONAL,
				applicationOID 			OBJECT IDENTIFIER OPTIONAL
    }
    
    PKCS15UnusedSpace ::= SEQUENCE {
	            path				Path,
	            authID				ANY OPTIONAL
    } 
    
END	




