test_vcore_api_pkcs12.cpp
test_vcore_signature_data.cpp
test_vcore_signature_finder.cpp
+ test_vcore_signature_reader.cpp
test_cert_server_db.cpp
test_cert_server_logic.cpp
colour_log_formatter.cpp
data/server_without_pass_cert.pem
data/signer_cert.pem
data/trusted_cert.pem
+ data/signature/signature_token_identifier_invalid.xml
+ data/signature/signature_token_profile_invalid.xml
+ data/signature/signature_token_property_invalid.xml
+ data/signature/signature_token_role_invalid.xml
+ data/signature/signature_with_dsa_key.xml
+ data/signature/signature_with_rsa_key.xml
DESTINATION ${CERT_SVC_TESTS}/unit_test_data
)
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>PTzNKgBBJEV/YtJgOP9lkUMVy+IQ3b9gVn5eorv4e3s=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>slamUlCPsGfRZvSlot9sIUMiPSjVSPOeJ0I7X1yxvmE=</DigestValue>
+</Reference>
+<Reference URI="css%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0/mhZV4kwFnSzCSp45AhFjWaQnaie61uW8VeXioOLQg=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vPjxjOppORd6hn9Bw4sh06gqtDoJzoFbV/8e9FyIdvk=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>OYW0ozIt+YihibhXb3mmAtIpmp5rJFNpS6n0bcbqPpI=</DigestValue>
+</Reference>
+<Reference URI="js%2Fmain.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0oc6DiyrAj1HQFcu+27/BHCQKn3zBn9dKls96iQZ564=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+O946StYJMD1w5BSGQYpG4ULHC4AkHsAL7UATxj8UBqm1aYr9w70Cl9kBnvcu9UJ4qMLs1x3rpBlu
+oPh5Nx9pOIxe505x4v4Q+bKsh9sQcTbh9uwiyajD6ATvTmfh1w5YCCEbdRgCZ6UbTWw5PMMoNnoU
+YbgHcqkzfwdo8U5WN9o=
+</SignatureValue>
+<Object Id="prop">
+<SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties">
+<SignatureProperty Id="profile" Target="#DistributorSignature">
+<dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile>
+</SignatureProperty>
+<SignatureProperty Id="role" Target="#DistributorSignature">
+<dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role>
+</SignatureProperty>
+<SignatureProperty Id="identifier" Target="#DistributorSignature">
+<dsp:Identifier>jD6ATvTmfh1w5</dsp:Identifier>
+<dsp:Identifier>jD6ATvTmfh1w5</dsp:Identifier>
+</SignatureProperty>
+</SignatureProperties>
+</Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>PTzNKgBBJEV/YtJgOP9lkUMVy+IQ3b9gVn5eorv4e3s=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>slamUlCPsGfRZvSlot9sIUMiPSjVSPOeJ0I7X1yxvmE=</DigestValue>
+</Reference>
+<Reference URI="css%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0/mhZV4kwFnSzCSp45AhFjWaQnaie61uW8VeXioOLQg=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vPjxjOppORd6hn9Bw4sh06gqtDoJzoFbV/8e9FyIdvk=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>OYW0ozIt+YihibhXb3mmAtIpmp5rJFNpS6n0bcbqPpI=</DigestValue>
+</Reference>
+<Reference URI="js%2Fmain.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0oc6DiyrAj1HQFcu+27/BHCQKn3zBn9dKls96iQZ564=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+O946StYJMD1w5BSGQYpG4ULHC4AkHsAL7UATxj8UBqm1aYr9w70Cl9kBnvcu9UJ4qMLs1x3rpBlu
+oPh5Nx9pOIxe505x4v4Q+bKsh9sQcTbh9uwiyajD6ATvTmfh1w5YCCEbdRgCZ6UbTWw5PMMoNnoU
+YbgHcqkzfwdo8U5WN9o=
+</SignatureValue>
+<Object Id="prop">
+<SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties">
+<SignatureProperty Id="profile" Target="#DistributorSignature">
+<dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile>
+<dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile>
+</SignatureProperty>
+<SignatureProperty Id="role" Target="#DistributorSignature">
+<dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role>
+</SignatureProperty>
+<SignatureProperty Id="identifier" Target="#DistributorSignature">
+<dsp:Identifier></dsp:Identifier>
+</SignatureProperty>
+</SignatureProperties>
+</Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>PTzNKgBBJEV/YtJgOP9lkUMVy+IQ3b9gVn5eorv4e3s=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>slamUlCPsGfRZvSlot9sIUMiPSjVSPOeJ0I7X1yxvmE=</DigestValue>
+</Reference>
+<Reference URI="css%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0/mhZV4kwFnSzCSp45AhFjWaQnaie61uW8VeXioOLQg=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vPjxjOppORd6hn9Bw4sh06gqtDoJzoFbV/8e9FyIdvk=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>OYW0ozIt+YihibhXb3mmAtIpmp5rJFNpS6n0bcbqPpI=</DigestValue>
+</Reference>
+<Reference URI="js%2Fmain.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0oc6DiyrAj1HQFcu+27/BHCQKn3zBn9dKls96iQZ564=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+O946StYJMD1w5BSGQYpG4ULHC4AkHsAL7UATxj8UBqm1aYr9w70Cl9kBnvcu9UJ4qMLs1x3rpBlu
+oPh5Nx9pOIxe505x4v4Q+bKsh9sQcTbh9uwiyajD6ATvTmfh1w5YCCEbdRgCZ6UbTWw5PMMoNnoU
+YbgHcqkzfwdo8U5WN9o=
+</SignatureValue>
+<Object Id="prop">
+<SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties">
+<SignatureProperty Id="profile" Target="#DistributorSignature">
+<dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile>
+</SignatureProperty>
+<SignatureProperty Id="role" Target="#DistributorSignature">
+<dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role>
+</SignatureProperty>
+<SignatureProperty Id="identifier" Target="#DistributorSignature">
+<dsp:Identifier></dsp:Identifier>
+</SignatureProperty>
+</SignatureProperties>
+<SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties">
+<SignatureProperty Id="identifier" Target="#DistributorSignature">
+<dsp:Identifier></dsp:Identifier>
+</SignatureProperty>
+</SignatureProperties>
+</Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>PTzNKgBBJEV/YtJgOP9lkUMVy+IQ3b9gVn5eorv4e3s=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>slamUlCPsGfRZvSlot9sIUMiPSjVSPOeJ0I7X1yxvmE=</DigestValue>
+</Reference>
+<Reference URI="css%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0/mhZV4kwFnSzCSp45AhFjWaQnaie61uW8VeXioOLQg=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vPjxjOppORd6hn9Bw4sh06gqtDoJzoFbV/8e9FyIdvk=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>OYW0ozIt+YihibhXb3mmAtIpmp5rJFNpS6n0bcbqPpI=</DigestValue>
+</Reference>
+<Reference URI="js%2Fmain.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0oc6DiyrAj1HQFcu+27/BHCQKn3zBn9dKls96iQZ564=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+O946StYJMD1w5BSGQYpG4ULHC4AkHsAL7UATxj8UBqm1aYr9w70Cl9kBnvcu9UJ4qMLs1x3rpBlu
+oPh5Nx9pOIxe505x4v4Q+bKsh9sQcTbh9uwiyajD6ATvTmfh1w5YCCEbdRgCZ6UbTWw5PMMoNnoU
+YbgHcqkzfwdo8U5WN9o=
+</SignatureValue>
+<Object Id="prop">
+<SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties">
+<SignatureProperty Id="profile" Target="#DistributorSignature">
+<dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile>
+</SignatureProperty>
+<SignatureProperty Id="role" Target="#DistributorSignature">
+<dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role>
+<dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role>
+</SignatureProperty>
+<SignatureProperty Id="identifier" Target="#DistributorSignature">
+<dsp:Identifier></dsp:Identifier>
+</SignatureProperty>
+</SignatureProperties>
+</Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>PTzNKgBBJEV/YtJgOP9lkUMVy+IQ3b9gVn5eorv4e3s=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>slamUlCPsGfRZvSlot9sIUMiPSjVSPOeJ0I7X1yxvmE=</DigestValue>
+</Reference>
+<Reference URI="css%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0/mhZV4kwFnSzCSp45AhFjWaQnaie61uW8VeXioOLQg=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vPjxjOppORd6hn9Bw4sh06gqtDoJzoFbV/8e9FyIdvk=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>OYW0ozIt+YihibhXb3mmAtIpmp5rJFNpS6n0bcbqPpI=</DigestValue>
+</Reference>
+<Reference URI="js%2Fmain.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0oc6DiyrAj1HQFcu+27/BHCQKn3zBn9dKls96iQZ564=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+O946StYJMD1w5BSGQYpG4ULHC4AkHsAL7UATxj8UBqm1aYr9w70Cl9kBnvcu9UJ4qMLs1x3rpBlu
+oPh5Nx9pOIxe505x4v4Q+bKsh9sQcTbh9uwiyajD6ATvTmfh1w5YCCEbdRgCZ6UbTWw5PMMoNnoU
+YbgHcqkzfwdo8U5WN9o=
+</SignatureValue>
+<KeyInfo>
+<KeyValue>
+<DSAKeyValue>
+<P>2KXJLXrgp+GYi6K4YQc=</P>
+<Q>2KXJLXrgp+GYi6K4YQc=</Q>
+<G>2KXJLXrgp+GYi6K4YQc=</G>
+<Y>2KXJLXrgp+GYi6K4YQc=</Y>
+<J>2KXJLXrgp+GYi6K4YQc=</J>
+<Seed>2KXJLXrgp+GYi6K4YQc=</Seed>
+<PgenCounter>1234</PgenCounter>
+</DSAKeyValue>
+</KeyValue>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>PTzNKgBBJEV/YtJgOP9lkUMVy+IQ3b9gVn5eorv4e3s=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>slamUlCPsGfRZvSlot9sIUMiPSjVSPOeJ0I7X1yxvmE=</DigestValue>
+</Reference>
+<Reference URI="css%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0/mhZV4kwFnSzCSp45AhFjWaQnaie61uW8VeXioOLQg=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vPjxjOppORd6hn9Bw4sh06gqtDoJzoFbV/8e9FyIdvk=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>OYW0ozIt+YihibhXb3mmAtIpmp5rJFNpS6n0bcbqPpI=</DigestValue>
+</Reference>
+<Reference URI="js%2Fmain.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0oc6DiyrAj1HQFcu+27/BHCQKn3zBn9dKls96iQZ564=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+O946StYJMD1w5BSGQYpG4ULHC4AkHsAL7UATxj8UBqm1aYr9w70Cl9kBnvcu9UJ4qMLs1x3rpBlu
+oPh5Nx9pOIxe505x4v4Q+bKsh9sQcTbh9uwiyajD6ATvTmfh1w5YCCEbdRgCZ6UbTWw5PMMoNnoU
+YbgHcqkzfwdo8U5WN9o=
+</SignatureValue>
+<KeyInfo>
+<KeyValue>
+<RSAKeyValue>
+<Modulus>
+BB4CBE573984434AF7465D03ECBAEBE4B2D1E9C3D60A590C18794FD44FD2846CA6D26FE638CD
+4EC7906D08B449939D3976FA27B890765042B51DF8DD1A48133F079AB072EE6498EE6830A14E
+043E9A78093494780B8A726BEB34E9E04E9E47BFB3607F4D934C738B2B78592E919AC9A0EF8B
+23590793DDA9074186890A8F3033
+</Modulus>
+<Exponent>AQAB</Exponent>
+</RSAKeyValue>
+</KeyValue>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
const std::string WgtNoDistPath =
std::string(TESTAPP_RES_DIR) + "unit_test_data/wgt_no_dist_signature";
+}
+
+namespace SignatureTest {
+ const std::string SignatureWithRsaKeyPath =
+ std::string(TESTAPP_RES_DIR) + "unit_test_data/signature_with_rsa_key.xml";
+
+ const std::string SignatureWithDsaKeyPath =
+ std::string(TESTAPP_RES_DIR) + "unit_test_data/signature_with_dsa_key.xml";
+
+ const std::string SignatureTokenRoleInvalidPath =
+ std::string(TESTAPP_RES_DIR) + "unit_test_data/signature_token_role_invalid.xml";
+
+ const std::string SignatureTokenProfileInvalidPath =
+ std::string(TESTAPP_RES_DIR) + "unit_test_data/signature_token_profile_invalid.xml";
+
+ const std::string SignatureTokenIdentifierInvalidPath =
+ std::string(TESTAPP_RES_DIR) + "unit_test_data/signature_token_identifier_invalid.xml";
+
+ const std::string SignatureTokenPropertyInvalidPath =
+ std::string(TESTAPP_RES_DIR) + "unit_test_data/signature_token_property_invalid.xml";
}
\ No newline at end of file
extern const std::string WgtValidPath;
extern const std::string WgtWrongFormatDistPath;
extern const std::string WgtNoDistPath;
-}
\ No newline at end of file
+}
+
+namespace SignatureTest {
+ extern const std::string SignatureWithRsaKeyPath;
+ extern const std::string SignatureWithDsaKeyPath;
+ extern const std::string SignatureTokenRoleInvalidPath;
+ extern const std::string SignatureTokenProfileInvalidPath;
+ extern const std::string SignatureTokenIdentifierInvalidPath;
+ extern const std::string SignatureTokenPropertyInvalidPath;
+}
--- /dev/null
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <vcore/SaxReader.h>
+#include "vcore/SignatureData.h"
+#include <vcore/SignatureReader.h>
+#include "test_constant.h"
+#include "test_common.h"
+#include "test_macros.h"
+#include <cstring>
+
+using namespace ValidationCore;
+using namespace std;
+
+BOOST_AUTO_TEST_SUITE(VCORE_SIGNARURE_READER_TEST)
+
+NEGATIVE_TEST_CASE(T_signature_reader_rsa_key_value_no_implement)
+{
+ SignatureData signatureData;
+ SignatureReader xml;
+
+ signatureData = SignatureData(SignatureTest::SignatureWithRsaKeyPath, 1);
+ xml.initialize(signatureData, SIGNATURE_SCHEMA_PATH);
+
+ BOOST_CHECK_THROW(xml.read(signatureData), ParserSchemaException::CertificateLoaderError);
+}
+
+NEGATIVE_TEST_CASE(T_signature_reader_dsa_key_value_no_implement)
+{
+ SignatureData signatureData;
+ SignatureReader xml;
+
+ signatureData = SignatureData(SignatureTest::SignatureWithDsaKeyPath, 1);
+ xml.initialize(signatureData, SIGNATURE_SCHEMA_PATH);
+
+ BOOST_CHECK_THROW(xml.read(signatureData), ParserSchemaException::CertificateLoaderError);
+}
+
+NEGATIVE_TEST_CASE(T_signature_reader_token_role_invalid)
+{
+ SignatureData signatureData;
+ SignatureReader xml;
+
+ signatureData = SignatureData(SignatureTest::SignatureTokenRoleInvalidPath, 1);
+ xml.initialize(signatureData, SIGNATURE_SCHEMA_PATH);
+
+ BOOST_CHECK_THROW(xml.read(signatureData), ParserSchemaException::UnsupportedValue);
+}
+
+NEGATIVE_TEST_CASE(T_signature_reader_token_profile_invalid)
+{
+ SignatureData signatureData;
+ SignatureReader xml;
+
+ signatureData = SignatureData(SignatureTest::SignatureTokenProfileInvalidPath, 1);
+ xml.initialize(signatureData, SIGNATURE_SCHEMA_PATH);
+
+ BOOST_CHECK_THROW(xml.read(signatureData), ParserSchemaException::UnsupportedValue);
+}
+
+NEGATIVE_TEST_CASE(T_signature_reader_token_identifier_invalid)
+{
+ SignatureData signatureData;
+ SignatureReader xml;
+
+ signatureData = SignatureData(SignatureTest::SignatureTokenIdentifierInvalidPath, 1);
+ xml.initialize(signatureData, SIGNATURE_SCHEMA_PATH);
+
+ BOOST_CHECK_THROW(xml.read(signatureData), ParserSchemaException::UnsupportedValue);
+}
+
+NEGATIVE_TEST_CASE(T_signature_reader_token_properties_invalid)
+{
+ SignatureData signatureData;
+ SignatureReader xml;
+
+ signatureData = SignatureData(SignatureTest::SignatureTokenPropertyInvalidPath, 1);
+ xml.initialize(signatureData, SIGNATURE_SCHEMA_PATH);
+
+ BOOST_CHECK_THROW(xml.read(signatureData), ParserSchemaException::UnsupportedValue);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file