1*ec61c6edSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*ec61c6edSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*ec61c6edSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*ec61c6edSAndrew Rist * distributed with this work for additional information 6*ec61c6edSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*ec61c6edSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*ec61c6edSAndrew Rist * "License"); you may not use this file except in compliance 9*ec61c6edSAndrew Rist * with the License. You may obtain a copy of the License at 10*ec61c6edSAndrew Rist * 11*ec61c6edSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*ec61c6edSAndrew Rist * 13*ec61c6edSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*ec61c6edSAndrew Rist * software distributed under the License is distributed on an 15*ec61c6edSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ec61c6edSAndrew Rist * KIND, either express or implied. See the License for the 17*ec61c6edSAndrew Rist * specific language governing permissions and limitations 18*ec61c6edSAndrew Rist * under the License. 19*ec61c6edSAndrew Rist * 20*ec61c6edSAndrew Rist *************************************************************/ 21*ec61c6edSAndrew Rist 22*ec61c6edSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include <rtl/ustring.hxx> 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <cppuhelper/servicefactory.hxx> 27cdf0e10cSrcweir #include <xmlsecurity/xmlsignaturehelper.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir // Get the demo.rdb servcie manager... 30cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > CreateDemoServiceFactory(); 31cdf0e10cSrcweir 32cdf0e10cSrcweir // Ask user to show more signature details... 33cdf0e10cSrcweir void QueryPrintSignatureDetails( const SignatureInformations& SignatureInformations, ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > ); 34cdf0e10cSrcweir 35cdf0e10cSrcweir // Query value from user. 36cdf0e10cSrcweir int QuerySelectNumber( int nMin, int nMax ); 37cdf0e10cSrcweir 38cdf0e10cSrcweir // Ask to verify the signature 39cdf0e10cSrcweir long QueryVerifySignature(); 40cdf0e10cSrcweir 41cdf0e10cSrcweir // Open In/Output Stream 42cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > OpenInputStream( const ::rtl::OUString& rStreamName ); 43cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > OpenOutputStream( const ::rtl::OUString& rStreamName ); 44cdf0e10cSrcweir 45cdf0e10cSrcweir ::rtl::OUString getSignatureInformations( const SignatureInformations& SignatureInformations, ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment ); 46cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > getCertificateFromEnvironment( ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment, sal_Bool nType); 47