Commit 6e604468 authored by berge's avatar berge
Browse files

Changed PSO types

parent aa8f3b9a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -180,10 +180,10 @@
				// the correct Certificate must be passed as parameter in the external function
				// in order to verify IS and DV and link CAVA certificates.
				// FIXME : ifpresent, ifchosen
				v_certificate := v_psoCommand.payload.performSecurityOperationData.psoVerifyCertificate
									.psoVerifyCertificateOverFullTemplate.smCertificate.tlvValue;  
				v_signature := v_psoCommand.payload.performSecurityOperationData.psoVerifyCertificate
									.psoVerifyCertificateOverFullTemplate.smDigitalSignature.tlvValue;
				//v_certificate := v_psoCommand.payload.performSecurityOperationData.psoVerifyCertificate
				//					.psoVerifyCertificateOverFullTemplate.cvCertificateBody.tlvValue;  
				//v_signature := v_psoCommand.payload.performSecurityOperationData.psoVerifyCertificate
				//					.psoVerifyCertificateOverFullTemplate.cvDigitalSignature.tlvValue;
				if (f_verifyCertificate(v_signature, f_getDstCertificate())) {
					// store certificate 
					v_chr := ""; //FIXME
+133 −6
Original line number Diff line number Diff line
@@ -898,12 +898,8 @@ module ePassport_Types {
				    }
				    
				    type set PsoVerifyCertificateOverFullTemplate { // 0xBE
				    	SmPlainValue smPlainValue optional,
				    	SmCryptographicChecksum smCryptographicChecksum optional,
				    	SmHashCode smHashCode optional,
				    	SmCertificate smCertificate optional,
				    	SmPublicKey smPublicKey optional,
				    	SmDigitalSignature smDigitalSignature optional					    
				    	CvCertificateBody cvCertificateBody,
				    	CvDigitalSignature cvDigitalSignature					    
				    }
				
					type octetstring PsoComputeDigitalSignatureOverData; // 0x9A
@@ -1073,6 +1069,8 @@ module ePassport_Types {
			group DataObjects { // TLVs !!

				type Oct1 TlvType;
				type Oct2 TlvType2;
				
				type integer TlvLength // variable-length encoding (ISO/IEC 7816-4 5.2.2.2 Table 8)
				with {
					variant
@@ -1081,6 +1079,135 @@ module ePassport_Types {
					"decode=EPassportCodecHelper.decodeTlvLength();"
				}

				group CvCertificateGroup {
				    
				    type record CvCertificate {
				     	TlvType2 tlvType,
				     	TlvLength tlvLength,
				     	CvCertificateValue tlvValue	   
				    }
				    with {
    					variant "present=bytes(1,2,0x7f21)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
				    
				    type set CvCertificateValue {
				     	CvCertificateBody cvCertificateBody,
				     	CvDigitalSignature cvDigitalSignature				        
				    }
    				
				    type record CvCertificateBody {
				     	TlvType2 tlvType,
				    	TlvLength tlvLength,
				     	CvCertificateBodyValue tlvValue   
				    }
				    with {
    					variant "present=bytes(1,2,0x7f4e)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
				    
				    type set CvCertificateBodyValue {
				        CvCertificateProfileIdentifier cvCertificateProfileIdentifier,
				        CvCertificationAuthorityReference cvCertificationAuthorityReference,
				        CvPublicKey cvPublicKey,
				        CvCertificateHolderReference cvCertificateHolderReference,
				        CvCertificateHolderAuthorizationTemplate cvCertificateHolderAuthorizationTemplate,
				        CvCertificateEffectiveDate cvCertificateEffectiveDate,
				        CvCertificateExpirationDate cvCertificateExpirationDate	        
				    }
				    
				    type record CvCertificateProfileIdentifier {
				    	TlvType2 tlvType,
				    	TlvLength tlvLength,
				     	octetstring tlvValue   
				    }
				    with {
    					variant "present=bytes(1,2,0x5f29)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
				    
			        type record CvCertificationAuthorityReference {
				    	TlvType tlvType,
				    	TlvLength tlvLength,
				     	octetstring tlvValue   
				    }
				    with {
    					variant "present=bytes(1,0x42)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
    				
			        type record CvPublicKey {
				    	TlvType2 tlvType,
				    	TlvLength tlvLength,
				     	octetstring tlvValue   
				    }
				    with {
    					variant "present=bytes(1,2,0x7f49)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
    				
			        type record CvCertificateHolderReference {
				    	TlvType2 tlvType,
				    	TlvLength tlvLength,
				     	octetstring tlvValue   
				    }
				    with {
    					variant "present=bytes(1,2,0x5f20)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
    				
			        type record CvCertificateHolderAuthorizationTemplate {
				    	TlvType2 tlvType,
				    	TlvLength tlvLength,
				     	octetstring tlvValue   
				    }
				    with {
    					variant "present=bytes(1,2,0x7f4c)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
    				
			        type record CvCertificateEffectiveDate {
				    	TlvType2 tlvType,
				    	TlvLength tlvLength,
				     	octetstring tlvValue   
				    }
				    with {
    					variant "present=bytes(1,2,0x5f25)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
    				
			        type record CvCertificateExpirationDate {
				    	TlvType2 tlvType,
				    	TlvLength tlvLength,
				     	octetstring tlvValue   
				    }
				    with {
    					variant "present=bytes(1,2,0x5f24)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
    								    
				    type record CvDigitalSignature {
				        TlvType2 tlvType,
				    	TlvLength tlvLength,
				     	octetstring tlvValue 
				    }
				    with {
    					variant "present=bytes(1,2,0x5f37)";
    					variant (tlvLength)	"intTag='tlvLength'";
    					variant (tlvValue)	"length=getIntTag('tlvLength');unsigned;";
    				}
				    
				} // end CvCertificateGroup

    			group SecureMessagingDataObjects {
    			    
    			    type record SmPlainValue {