1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: signaturetest.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmlsecurity.hxx"
35 #include <vcl/event.hxx>
36 #include <vcl/svapp.hxx>
37 #include <vcl/wrkwin.hxx>
38 #include <vcl/msgbox.hxx>
39 #include <vcl/fixed.hxx>
40 #include <vcl/edit.hxx>
41 #include <vcl/button.hxx>
42 #include <vcl/lstbox.hxx>
43 #include <svtools/filectrl.hxx>
44 #include <tools/urlobj.hxx>
45 #include <osl/file.hxx>
47 #include <svtools/docpasswdrequest.hxx>
49 #include <comphelper/processfactory.hxx>
50 #include <cppuhelper/servicefactory.hxx>
51 #include <cppuhelper/bootstrap.hxx>
52 #include <unotools/streamhelper.hxx>
54 #include <ucbhelper/contentbroker.hxx>
55 #include <ucbhelper/configurationkeys.hxx>
57 // Will be in comphelper if CWS MAV09 is integrated
58 #include <comphelper/storagehelper.hxx>
60 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
62 #include <xmlsecurity/xmlsignaturehelper.hxx>
63 #include <xmlsecurity/digitalsignaturesdialog.hxx>
64 #include <xmlsecurity/certificatechooser.hxx>
65 #include <xmlsecurity/biginteger.hxx>
67 #include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
69 using namespace ::com::sun::star
;
70 using namespace ::com::sun::star
;
74 #define TEXTFIELDWIDTH 80
75 #define TEXTFIELDSTARTX 10
80 #define FIXEDLINEHEIGHT 15
82 #define BUTTONWIDTH 50
83 #define BUTTONHEIGHT 22
84 #define BUTTONSPACE 20
86 #define LISTBOXHEIGHT 120
88 // #define TEST_IMPLEMENTATION_DIRECTLY
91 // -----------------------------------------------------------------------
95 uno::Reference
< lang::XMultiServiceFactory
> xMSF
;
98 uno::Reference
< uno::XComponentContext
> xCtx( cppu::defaultBootstrap_InitialComponentContext() );
101 DBG_ERROR( "Error creating initial component context!" );
105 xMSF
= uno::Reference
< lang::XMultiServiceFactory
>(xCtx
->getServiceManager(), uno::UNO_QUERY
);
109 DBG_ERROR( "No service manager!" );
114 uno::Sequence
< uno::Any
> aArgs( 2 );
115 aArgs
[ 0 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL
);
116 aArgs
[ 1 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE
);
117 sal_Bool bSuccess
= ::ucb::ContentBroker::initialize( xMSF
, aArgs
);
120 DBG_ERROR( "Error creating UCB!" );
125 catch ( uno::Exception
const & )
127 DBG_ERROR( "Exception during creation of initial component context!" );
130 comphelper::setProcessServiceFactory( xMSF
);
139 // -----------------------------------------------------------------------
141 class MyWin
: public WorkWindow
144 FixedLine maTokenLine
;
145 CheckBox maCryptoCheckBox
;
146 FixedText maFixedTextTokenName
;
147 FileControl maEditTokenName
;
148 FixedLine maTest1Line
;
149 FixedText maFixedTextXMLFileName
;
150 FileControl maEditXMLFileName
;
151 FixedText maFixedTextBINFileName
;
152 FileControl maEditBINFileName
;
153 FixedText maFixedTextSIGFileName
;
154 FileControl maEditSIGFileName
;
155 PushButton maSignButton
;
156 PushButton maVerifyButton
;
157 FixedLine maTest2Line
;
158 FixedText maFixedTextDOCFileName
;
159 FileControl maEditDOCFileName
;
160 PushButton maDigitalSignaturesButton
;
161 PushButton maVerifyDigitalSignaturesButton
;
162 FixedLine maHintLine
;
163 FixedText maHintText
;
165 DECL_LINK( CryptoCheckBoxHdl
, CheckBox
* );
166 DECL_LINK( SignButtonHdl
, Button
* );
167 DECL_LINK( VerifyButtonHdl
, Button
* );
168 DECL_LINK( DigitalSignaturesWithServiceHdl
, Button
* );
169 DECL_LINK( VerifyDigitalSignaturesHdl
, Button
* );
170 DECL_LINK( DigitalSignaturesWithTokenHdl
, Button
* );
171 DECL_LINK( StartVerifySignatureHdl
, void* );
174 MyWin( Window
* pParent
, WinBits nWinStyle
);
178 // -----------------------------------------------------------------------
182 MyWin
aMainWin( NULL
, WB_APP
| WB_STDWORK
| WB_3DLOOK
);
185 Application::Execute();
188 // -----------------------------------------------------------------------
190 MyWin::MyWin( Window
* pParent
, WinBits nWinStyle
) :
191 WorkWindow( pParent
, nWinStyle
),
196 maFixedTextXMLFileName( this ),
197 maEditXMLFileName( this, WB_BORDER
),
198 maFixedTextBINFileName( this ),
199 maEditBINFileName( this, WB_BORDER
),
200 maFixedTextSIGFileName( this ),
201 maEditSIGFileName( this, WB_BORDER
),
202 maFixedTextTokenName( this ),
203 maEditTokenName( this, WB_BORDER
),
204 maFixedTextDOCFileName( this ),
205 maEditDOCFileName( this, WB_BORDER
),
206 maSignButton( this ),
207 maVerifyButton( this ),
208 maDigitalSignaturesButton( this ),
209 maVerifyDigitalSignaturesButton( this ),
210 maHintText( this, WB_WORDBREAK
),
211 maCryptoCheckBox( this )
214 #ifdef TEST_IMPLEMENTATION_DIRECTLY
215 Size
aOutputSize( 400, 600 );
217 Size
aOutputSize( 400, 400 );
219 SetOutputSizePixel( aOutputSize
);
220 SetText( String( RTL_CONSTASCII_USTRINGPARAM( "XML Signature Test" ) ) );
224 maTokenLine
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, aOutputSize
.Width()-2*TEXTFIELDSTARTX
, FIXEDLINEHEIGHT
);
225 maTokenLine
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Crypto Settings" ) ) );
228 nY
+= EDITHEIGHT
*3/2;
230 maCryptoCheckBox
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, aOutputSize
.Width()-2*TEXTFIELDSTARTX
, FIXEDLINEHEIGHT
);
231 maCryptoCheckBox
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Use Default Token (NSS option only)" ) ) );
232 maCryptoCheckBox
.Check( TRUE
);
233 maEditTokenName
.Disable();
234 maFixedTextTokenName
.Disable();
235 maCryptoCheckBox
.SetClickHdl( LINK( this, MyWin
, CryptoCheckBoxHdl
) );
236 maCryptoCheckBox
.Show();
240 maFixedTextTokenName
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, TEXTFIELDWIDTH
, EDITHEIGHT
);
241 maFixedTextTokenName
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Crypto Token:" ) ) );
242 maFixedTextTokenName
.Show();
244 maEditTokenName
.SetPosSizePixel( TEXTFIELDSTARTX
+TEXTFIELDWIDTH
, nY
, EDITWIDTH
, EDITHEIGHT
);
245 maEditTokenName
.Show();
249 #ifdef TEST_IMPLEMENTATION_DIRECTLY
251 maTest1Line
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, aOutputSize
.Width()-2*TEXTFIELDSTARTX
, FIXEDLINEHEIGHT
);
252 maTest1Line
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Test simple files" ) ) );
255 nY
+= EDITHEIGHT
*3/2;
257 maFixedTextXMLFileName
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, TEXTFIELDWIDTH
, EDITHEIGHT
);
258 maFixedTextXMLFileName
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "XML File:" ) ) );
259 maFixedTextXMLFileName
.Show();
261 maEditXMLFileName
.SetPosSizePixel( TEXTFIELDSTARTX
+TEXTFIELDWIDTH
, nY
, EDITWIDTH
, EDITHEIGHT
);
262 maEditXMLFileName
.Show();
264 nY
+= EDITHEIGHT
*3/2;
266 maFixedTextBINFileName
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, TEXTFIELDWIDTH
, EDITHEIGHT
);
267 maFixedTextBINFileName
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Binary File:" ) ) );
268 maFixedTextBINFileName
.Show();
270 maEditBINFileName
.SetPosSizePixel( TEXTFIELDSTARTX
+TEXTFIELDWIDTH
, nY
, EDITWIDTH
, EDITHEIGHT
);
271 maEditBINFileName
.Show();
273 nY
+= EDITHEIGHT
*3/2;
275 maFixedTextSIGFileName
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, TEXTFIELDWIDTH
, EDITHEIGHT
);
276 maFixedTextSIGFileName
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Signature File:" ) ) );
277 maFixedTextSIGFileName
.Show();
279 maEditSIGFileName
.SetPosSizePixel( TEXTFIELDSTARTX
+TEXTFIELDWIDTH
, nY
, EDITWIDTH
, EDITHEIGHT
);
280 maEditSIGFileName
.Show();
284 maSignButton
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, BUTTONWIDTH
, BUTTONHEIGHT
);
285 maSignButton
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Sign" ) ) );
286 maSignButton
.SetClickHdl( LINK( this, MyWin
, SignButtonHdl
) );
289 maVerifyButton
.SetPosSizePixel( TEXTFIELDSTARTX
+BUTTONWIDTH
+BUTTONSPACE
, nY
, BUTTONWIDTH
, BUTTONHEIGHT
);
290 maVerifyButton
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Verify" ) ) );
291 maVerifyButton
.SetClickHdl( LINK( this, MyWin
, VerifyButtonHdl
) );
292 maVerifyButton
.Show();
296 #endif // TEST_IMPLEMENTATION_DIRECTLY
298 maTest2Line
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, aOutputSize
.Width()-2*TEXTFIELDSTARTX
, FIXEDLINEHEIGHT
);
299 maTest2Line
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Test Office Document" ) ) );
302 nY
+= EDITHEIGHT
*3/2;
305 maFixedTextDOCFileName
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, TEXTFIELDWIDTH
, EDITHEIGHT
);
306 maFixedTextDOCFileName
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Office File:" ) ) );
307 maFixedTextDOCFileName
.Show();
309 maEditDOCFileName
.SetPosSizePixel( TEXTFIELDSTARTX
+TEXTFIELDWIDTH
, nY
, EDITWIDTH
, EDITHEIGHT
);
310 maEditDOCFileName
.Show();
314 maDigitalSignaturesButton
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, BUTTONWIDTH
*2, BUTTONHEIGHT
);
315 maDigitalSignaturesButton
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Digital Signatures..." ) ) );
316 maDigitalSignaturesButton
.SetClickHdl( LINK( this, MyWin
, DigitalSignaturesWithServiceHdl
) );
317 maDigitalSignaturesButton
.Show();
319 maVerifyDigitalSignaturesButton
.SetPosSizePixel( TEXTFIELDSTARTX
+BUTTONWIDTH
*2+BUTTONSPACE
, nY
, BUTTONWIDTH
*2, BUTTONHEIGHT
);
320 maVerifyDigitalSignaturesButton
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Verify Signatures" ) ) );
321 maVerifyDigitalSignaturesButton
.SetClickHdl( LINK( this, MyWin
, VerifyDigitalSignaturesHdl
) );
322 maVerifyDigitalSignaturesButton
.Show();
326 maHintLine
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, aOutputSize
.Width()-2*TEXTFIELDSTARTX
, FIXEDLINEHEIGHT
);
331 maHintText
.SetPosSizePixel( TEXTFIELDSTARTX
, nY
, aOutputSize
.Width()-2*TEXTFIELDSTARTX
, aOutputSize
.Height()-nY
);
332 maHintText
.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Hint: Copy crypto files from xmlsecurity/tools/cryptoken/nss and sample files from xmlsecurity/tools/examples to <temp>/nss.\nThis location will be used from the demo as the default location." ) ) );
335 // Help the user with some default values
336 ::rtl::OUString aTempDirURL
;
337 ::osl::File::getTempDirURL( aTempDirURL
);
338 INetURLObject
aURLObj( aTempDirURL
);
339 aURLObj
.insertName( String( RTL_CONSTASCII_USTRINGPARAM( "nss" ) ), true );
340 ::rtl::OUString aNSSFolder
= aURLObj
.getFSysPath( INetURLObject::FSYS_DETECT
);
341 String
aDefaultXMLFileName( aNSSFolder
);
342 maEditXMLFileName
.SetText( aNSSFolder
+ String( RTL_CONSTASCII_USTRINGPARAM( "demo-sample.xml" ) ) );
343 maEditBINFileName
.SetText( aNSSFolder
+ String( RTL_CONSTASCII_USTRINGPARAM( "demo-sample.gif" ) ) );
344 maEditDOCFileName
.SetText( aNSSFolder
+ String( RTL_CONSTASCII_USTRINGPARAM( "demo-sample.sxw" ) ) );
345 maEditSIGFileName
.SetText( aNSSFolder
+ String( RTL_CONSTASCII_USTRINGPARAM( "demo-result.xml" ) ) );
346 maEditTokenName
.SetText( aNSSFolder
);
349 maEditTokenName
.SetText( String() );
350 maEditTokenName
.Disable();
351 maCryptoCheckBox
.Disable();
356 IMPL_LINK( MyWin
, CryptoCheckBoxHdl
, CheckBox
*, EMPTYARG
)
358 if ( maCryptoCheckBox
.IsChecked() )
360 maEditTokenName
.Disable();
361 maFixedTextTokenName
.Disable();
365 maEditTokenName
.Enable();
366 maFixedTextTokenName
.Enable();
371 IMPL_LINK( MyWin
, DigitalSignaturesWithServiceHdl
, Button
*, EMPTYARG
)
373 rtl::OUString aDocFileName
= maEditDOCFileName
.GetText();
374 uno::Reference
< embed::XStorage
> xStore
= ::comphelper::OStorageHelper::GetStorageFromURL(
375 aDocFileName
, embed::ElementModes::READWRITE
, comphelper::getProcessServiceFactory() );
377 uno::Reference
< security::XDocumentDigitalSignatures
> xD(
378 comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ) ), uno::UNO_QUERY
);
380 xD
->signDocumentContent( xStore
, NULL
);
386 IMPL_LINK( MyWin
, VerifyDigitalSignaturesHdl
, Button
*, EMPTYARG
)
388 rtl::OUString aDocFileName
= maEditDOCFileName
.GetText();
389 uno::Reference
< embed::XStorage
> xStore
= ::comphelper::OStorageHelper::GetStorageFromURL(
390 aDocFileName
, embed::ElementModes::READWRITE
, comphelper::getProcessServiceFactory() );
392 uno::Reference
< security::XDocumentDigitalSignatures
> xD(
393 comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ) ), uno::UNO_QUERY
);
396 uno::Sequence
< security::DocumentSignatureInformation
> aInfos
= xD
->verifyDocumentContentSignatures( xStore
, NULL
);
397 int nInfos
= aInfos
.getLength();
398 for ( int n
= 0; n
< nInfos
; n
++ )
400 security::DocumentSignatureInformation
& rInf
= aInfos
[n
];
401 String
aText( RTL_CONSTASCII_USTRINGPARAM( "The document is signed by\n\n " ) );
402 aText
+= String( rInf
.Signer
->getSubjectName() );
403 aText
+= String( RTL_CONSTASCII_USTRINGPARAM( "\n\n The signature is " ) );
404 if ( !rInf
.SignatureIsValid
)
405 aText
+= String( RTL_CONSTASCII_USTRINGPARAM( "NOT " ) );
406 aText
+= String( RTL_CONSTASCII_USTRINGPARAM( "valid" ) );
407 InfoBox( this, aText
).Execute();
417 #ifdef TEST_IMPLEMENTATION_DIRECTLY
419 IMPL_LINK( MyWin
, DigitalSignaturesWithTokenHdl
, Button
*, EMPTYARG
)
421 String aDocFileName
= maEditDOCFileName
.GetText();
422 String aTokenFileName
= maEditTokenName
.GetText();
424 DigitalSignaturesDialog
aSignaturesDialog( this, comphelper::getProcessServiceFactory(), SignatureModeDocumentContent
, false );
426 bool bInit
= aSignaturesDialog
.Init( aTokenFileName
);
429 ErrorBox( this, WB_OK
, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
433 uno::Reference
< embed::XStorage
> xStore
= ::comphelper::OStorageHelper::GetStorageFromURL(
434 aDocFileName
, embed::ElementModes::READWRITE
, comphelper::getProcessServiceFactory() );
436 aSignaturesDialog
.SetStorage( xStore
);
438 aSignaturesDialog
.Execute();
443 IMPL_LINK( MyWin
, SignButtonHdl
, Button
*, EMPTYARG
)
445 String aXMLFileName
= maEditXMLFileName
.GetText();
446 String aBINFileName
= maEditBINFileName
.GetText();
447 String aSIGFileName
= maEditSIGFileName
.GetText();
449 String aTokenFileName
;
450 if ( !maCryptoCheckBox
.IsChecked() )
451 aTokenFileName
= maEditTokenName
.GetText();
453 XMLSignatureHelper
aSignatureHelper( comphelper::getProcessServiceFactory() );
454 bool bInit
= aSignatureHelper
.Init( aTokenFileName
);
458 ErrorBox( this, WB_OK
, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
462 uno::Reference
< ::com::sun::star::security::XCertificate
> xCertToUse
;
463 CertificateChooser
aChooser( this, aSignatureHelper
.GetSecurityEnvironment(), SignatureInformations() );
464 if ( aChooser
.Execute() )
465 xCertToUse
= aChooser
.GetSelectedCertificate();
467 if ( !xCertToUse
.is() )
471 aSignatureHelper
.StartMission();
473 sal_Int32 nSecurityId
= aSignatureHelper
.GetNewSecurityId();
475 aSignatureHelper
.SetX509Certificate( nSecurityId
, xCertToUse
->getIssuerName(), bigIntegerToNumericString( xCertToUse
->getSerialNumber() ) );
477 aSignatureHelper
.AddForSigning( nSecurityId
, aXMLFileName
, aXMLFileName
, sal_False
);
478 aSignatureHelper
.AddForSigning( nSecurityId
, aBINFileName
, aBINFileName
, sal_True
);
480 SvFileStream
* pStream
= new SvFileStream( aSIGFileName
, STREAM_WRITE
);
481 SvLockBytesRef xLockBytes
= new SvLockBytes( pStream
, TRUE
);
482 uno::Reference
< io::XOutputStream
> xOutputStream
= new utl::OOutputStreamHelper( xLockBytes
);
483 bool bDone
= aSignatureHelper
.CreateAndWriteSignature( xOutputStream
);
485 aSignatureHelper
.EndMission();
489 ErrorBox( this, WB_OK
, String( RTL_CONSTASCII_USTRINGPARAM( "Error creating Signature!" ) ) ).Execute();
493 rtl::OUString
aInfo( String( RTL_CONSTASCII_USTRINGPARAM( "Signature successfully created!\n\n" ) ) );
494 // aInfo += getSignatureInformationmations( aSignatureHelper.getAllSignatureInformation(), aSignatureHelper.GetSecurityEnvironment() );
497 InfoBox( this, aInfo
).Execute();
500 // Check for more detailed results...
505 IMPL_LINK( MyWin
, VerifyButtonHdl
, Button
*, EMPTYARG
)
507 String aXMLFileName
= maEditXMLFileName
.GetText();
508 String aBINFileName
= maEditBINFileName
.GetText();
509 String aSIGFileName
= maEditSIGFileName
.GetText();
511 String aTokenFileName
;
512 if ( !maCryptoCheckBox
.IsChecked() )
513 aTokenFileName
= maEditTokenName
.GetText();
515 XMLSignatureHelper
aSignatureHelper( comphelper::getProcessServiceFactory() );
516 bool bInit
= aSignatureHelper
.Init( aTokenFileName
);
520 ErrorBox( this, WB_OK
, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
524 aSignatureHelper
.SetStartVerifySignatureHdl( LINK( this, MyWin
, StartVerifySignatureHdl
) );
526 aSignatureHelper
.StartMission();
528 SvFileStream
* pStream
= new SvFileStream( aSIGFileName
, STREAM_READ
);
529 pStream
->Seek( STREAM_SEEK_TO_END
);
530 ULONG nBytes
= pStream
->Tell();
531 pStream
->Seek( STREAM_SEEK_TO_BEGIN
);
532 SvLockBytesRef xLockBytes
= new SvLockBytes( pStream
, TRUE
);
533 uno::Reference
< io::XInputStream
> xInputStream
= new utl::OInputStreamHelper( xLockBytes
, nBytes
);
534 bool bDone
= aSignatureHelper
.ReadAndVerifySignature( xInputStream
);
535 xInputStream
->closeInput();
537 aSignatureHelper
.EndMission();
540 ErrorBox( this, WB_OK
, String( RTL_CONSTASCII_USTRINGPARAM( "Error in Signature!" ) ) ).Execute();
542 InfoBox( this, String( RTL_CONSTASCII_USTRINGPARAM( "Signatures verified without any problems!" ) ) ).Execute();
547 IMPL_LINK( MyWin
, StartVerifySignatureHdl
, void*, EMPTYARG
)
549 QueryBox
aQueryBox( this, WB_YES_NO
|WB_DEF_YES
, String( RTL_CONSTASCII_USTRINGPARAM( "Found Signature - Verify?" ) ) );
550 return ( aQueryBox
.Execute() == RET_YES
) ? 1 : 0;
554 #endif // #ifdef TEST_IMPLEMENTATION_DIRECTLY