targeted string re-work
Change-Id: Ib4a0e8fcd128c949034d2d183ff045bb433fce8b
This commit is contained in:
@@ -85,7 +85,7 @@ bool XMLSignatureHelper::Init()
|
||||
|
||||
void XMLSignatureHelper::ImplCreateSEInitializer()
|
||||
{
|
||||
rtl::OUString sSEInitializer(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_COMPONENT ));
|
||||
rtl::OUString sSEInitializer( SEINITIALIZER_COMPONENT );
|
||||
uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
|
||||
mxSEInitializer = uno::Reference< com::sun::star::xml::crypto::XSEInitializer > (
|
||||
xMCF->createInstanceWithContext( sSEInitializer, mxCtx ), uno::UNO_QUERY );
|
||||
@@ -166,8 +166,8 @@ uno::Reference<xml::sax::XDocumentHandler> XMLSignatureHelper::CreateDocumentHan
|
||||
*/
|
||||
uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
|
||||
uno::Reference< io::XActiveDataSource > xSaxWriter(
|
||||
xMCF->createInstanceWithContext(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
|
||||
"com.sun.star.xml.sax.Writer")), mxCtx ), uno::UNO_QUERY );
|
||||
xMCF->createInstanceWithContext(rtl::OUString(
|
||||
"com.sun.star.xml.sax.Writer"), mxCtx ), uno::UNO_QUERY );
|
||||
|
||||
DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" );
|
||||
|
||||
@@ -185,17 +185,17 @@ uno::Reference<xml::sax::XDocumentHandler> XMLSignatureHelper::CreateDocumentHan
|
||||
/*
|
||||
* write the xml context for signatures
|
||||
*/
|
||||
rtl::OUString tag_AllSignatures(RTL_CONSTASCII_USTRINGPARAM(TAG_DOCUMENTSIGNATURES));
|
||||
rtl::OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
|
||||
|
||||
SvXMLAttributeList *pAttributeList = new SvXMLAttributeList();
|
||||
rtl::OUString sNamespace;
|
||||
if (mbODFPre1_2)
|
||||
sNamespace = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NS_DOCUMENTSIGNATURES));
|
||||
sNamespace = rtl::OUString(NS_DOCUMENTSIGNATURES);
|
||||
else
|
||||
sNamespace = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NS_DOCUMENTSIGNATURES_ODF_1_2));
|
||||
sNamespace = rtl::OUString(NS_DOCUMENTSIGNATURES_ODF_1_2);
|
||||
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_XMLNS)),
|
||||
rtl::OUString(ATTR_XMLNS),
|
||||
sNamespace);
|
||||
|
||||
xDocHandler->startDocument();
|
||||
@@ -208,7 +208,7 @@ uno::Reference<xml::sax::XDocumentHandler> XMLSignatureHelper::CreateDocumentHan
|
||||
|
||||
void XMLSignatureHelper::CloseDocumentHandler( const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler )
|
||||
{
|
||||
rtl::OUString tag_AllSignatures(RTL_CONSTASCII_USTRINGPARAM(TAG_DOCUMENTSIGNATURES));
|
||||
rtl::OUString tag_AllSignatures(TAG_DOCUMENTSIGNATURES);
|
||||
xDocumentHandler->endElement( tag_AllSignatures );
|
||||
xDocumentHandler->endDocument();
|
||||
}
|
||||
@@ -265,7 +265,7 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const com::sun::star::uno::Refe
|
||||
uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
|
||||
uno::Reference< xml::sax::XParser > xParser(
|
||||
xMCF->createInstanceWithContext(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ), mxCtx ),
|
||||
rtl::OUString("com.sun.star.xml.sax.Parser" ), mxCtx ),
|
||||
uno::UNO_QUERY );
|
||||
|
||||
DBG_ASSERT( xParser.is(), "Can't create parser" );
|
||||
|
@@ -192,14 +192,14 @@ sal_Bool XSecController::convertDateTime( com::sun::star::util::DateTime& rDateT
|
||||
sHundredth = rString.copy(nPos2 + 1);
|
||||
sal_Int32 len = sHundredth.getLength();
|
||||
if (len == 1)
|
||||
sHundredth += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0"));
|
||||
sHundredth += rtl::OUString("0");
|
||||
if (len > 2)
|
||||
sHundredth = sHundredth.copy(0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
aTimeStr = rString.copy(nPos + 1);
|
||||
sHundredth = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0"));
|
||||
sHundredth = rtl::OUString("0");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -340,9 +340,9 @@ void XSecController::createXSecComponent( )
|
||||
* Email: michael.mi@sun.com
|
||||
******************************************************************************/
|
||||
{
|
||||
rtl::OUString sSAXEventKeeper(RTL_CONSTASCII_USTRINGPARAM( SAXEVENTKEEPER_COMPONENT ));
|
||||
rtl::OUString sXMLSignature(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_COMPONENT ));
|
||||
rtl::OUString sXMLDocument(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENTWRAPPER_COMPONENT ));
|
||||
rtl::OUString sSAXEventKeeper( SAXEVENTKEEPER_COMPONENT );
|
||||
rtl::OUString sXMLSignature( XMLSIGNATURE_COMPONENT );
|
||||
rtl::OUString sXMLDocument( XMLDOCUMENTWRAPPER_COMPONENT );
|
||||
|
||||
/*
|
||||
* marks all security components are not available.
|
||||
@@ -911,27 +911,26 @@ void XSecController::exportSignature(
|
||||
/*
|
||||
* defines all element tags in Signature element.
|
||||
*/
|
||||
rtl::OUString tag_Signature(RTL_CONSTASCII_USTRINGPARAM(TAG_SIGNATURE));
|
||||
rtl::OUString tag_SignedInfo(RTL_CONSTASCII_USTRINGPARAM(TAG_SIGNEDINFO));
|
||||
rtl::OUString tag_CanonicalizationMethod(RTL_CONSTASCII_USTRINGPARAM(TAG_CANONICALIZATIONMETHOD));
|
||||
rtl::OUString tag_SignatureMethod(RTL_CONSTASCII_USTRINGPARAM(TAG_SIGNATUREMETHOD));
|
||||
rtl::OUString tag_Reference(RTL_CONSTASCII_USTRINGPARAM(TAG_REFERENCE));
|
||||
rtl::OUString tag_Transforms(RTL_CONSTASCII_USTRINGPARAM(TAG_TRANSFORMS));
|
||||
rtl::OUString tag_Transform(RTL_CONSTASCII_USTRINGPARAM(TAG_TRANSFORM));
|
||||
rtl::OUString tag_DigestMethod(RTL_CONSTASCII_USTRINGPARAM(TAG_DIGESTMETHOD));
|
||||
rtl::OUString tag_DigestValue(RTL_CONSTASCII_USTRINGPARAM(TAG_DIGESTVALUE));
|
||||
rtl::OUString tag_SignatureValue(RTL_CONSTASCII_USTRINGPARAM(TAG_SIGNATUREVALUE));
|
||||
rtl::OUString tag_KeyInfo(RTL_CONSTASCII_USTRINGPARAM(TAG_KEYINFO));
|
||||
rtl::OUString tag_X509Data(RTL_CONSTASCII_USTRINGPARAM(TAG_X509DATA));
|
||||
rtl::OUString tag_X509IssuerSerial(RTL_CONSTASCII_USTRINGPARAM(TAG_X509ISSUERSERIAL));
|
||||
rtl::OUString tag_X509IssuerName(RTL_CONSTASCII_USTRINGPARAM(TAG_X509ISSUERNAME));
|
||||
rtl::OUString tag_X509SerialNumber(RTL_CONSTASCII_USTRINGPARAM(TAG_X509SERIALNUMBER));
|
||||
rtl::OUString tag_X509Certificate(RTL_CONSTASCII_USTRINGPARAM(TAG_X509CERTIFICATE));
|
||||
|
||||
rtl::OUString tag_Object(RTL_CONSTASCII_USTRINGPARAM(TAG_OBJECT));
|
||||
rtl::OUString tag_SignatureProperties(RTL_CONSTASCII_USTRINGPARAM(TAG_SIGNATUREPROPERTIES));
|
||||
rtl::OUString tag_SignatureProperty(RTL_CONSTASCII_USTRINGPARAM(TAG_SIGNATUREPROPERTY));
|
||||
rtl::OUString tag_Date(RTL_CONSTASCII_USTRINGPARAM(TAG_DATE));
|
||||
rtl::OUString tag_Signature(TAG_SIGNATURE);
|
||||
rtl::OUString tag_SignedInfo(TAG_SIGNEDINFO);
|
||||
rtl::OUString tag_CanonicalizationMethod(TAG_CANONICALIZATIONMETHOD);
|
||||
rtl::OUString tag_SignatureMethod(TAG_SIGNATUREMETHOD);
|
||||
rtl::OUString tag_Reference(TAG_REFERENCE);
|
||||
rtl::OUString tag_Transforms(TAG_TRANSFORMS);
|
||||
rtl::OUString tag_Transform(TAG_TRANSFORM);
|
||||
rtl::OUString tag_DigestMethod(TAG_DIGESTMETHOD);
|
||||
rtl::OUString tag_DigestValue(TAG_DIGESTVALUE);
|
||||
rtl::OUString tag_SignatureValue(TAG_SIGNATUREVALUE);
|
||||
rtl::OUString tag_KeyInfo(TAG_KEYINFO);
|
||||
rtl::OUString tag_X509Data(TAG_X509DATA);
|
||||
rtl::OUString tag_X509IssuerSerial(TAG_X509ISSUERSERIAL);
|
||||
rtl::OUString tag_X509IssuerName(TAG_X509ISSUERNAME);
|
||||
rtl::OUString tag_X509SerialNumber(TAG_X509SERIALNUMBER);
|
||||
rtl::OUString tag_X509Certificate(TAG_X509CERTIFICATE);
|
||||
rtl::OUString tag_Object(TAG_OBJECT);
|
||||
rtl::OUString tag_SignatureProperties(TAG_SIGNATUREPROPERTIES);
|
||||
rtl::OUString tag_SignatureProperty(TAG_SIGNATUREPROPERTY);
|
||||
rtl::OUString tag_Date(TAG_DATE);
|
||||
|
||||
const SignatureReferenceInformations& vReferenceInfors = signatureInfo.vSignatureReferenceInfors;
|
||||
SvXMLAttributeList *pAttributeList;
|
||||
@@ -941,13 +940,13 @@ void XSecController::exportSignature(
|
||||
*/
|
||||
pAttributeList = new SvXMLAttributeList();
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_XMLNS)),
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NS_XMLDSIG)));
|
||||
rtl::OUString(ATTR_XMLNS),
|
||||
rtl::OUString(NS_XMLDSIG));
|
||||
|
||||
if (!signatureInfo.ouSignatureId.isEmpty())
|
||||
{
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_ID)),
|
||||
rtl::OUString(ATTR_ID),
|
||||
rtl::OUString(signatureInfo.ouSignatureId));
|
||||
}
|
||||
|
||||
@@ -961,16 +960,16 @@ void XSecController::exportSignature(
|
||||
/* Write CanonicalizationMethod element */
|
||||
pAttributeList = new SvXMLAttributeList();
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_ALGORITHM)),
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ALGO_C14N)));
|
||||
rtl::OUString(ATTR_ALGORITHM),
|
||||
rtl::OUString(ALGO_C14N));
|
||||
xDocumentHandler->startElement( tag_CanonicalizationMethod, cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
|
||||
xDocumentHandler->endElement( tag_CanonicalizationMethod );
|
||||
|
||||
/* Write SignatureMethod element */
|
||||
pAttributeList = new SvXMLAttributeList();
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_ALGORITHM)),
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ALGO_RSASHA1)));
|
||||
rtl::OUString(ATTR_ALGORITHM),
|
||||
rtl::OUString(ALGO_RSASHA1));
|
||||
xDocumentHandler->startElement( tag_SignatureMethod, cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
|
||||
xDocumentHandler->endElement( tag_SignatureMethod );
|
||||
|
||||
@@ -989,7 +988,7 @@ void XSecController::exportSignature(
|
||||
*/
|
||||
{
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_URI)),
|
||||
rtl::OUString(ATTR_URI),
|
||||
refInfor.ouURI);
|
||||
}
|
||||
else
|
||||
@@ -998,8 +997,8 @@ void XSecController::exportSignature(
|
||||
*/
|
||||
{
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_URI)),
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CHAR_FRAGMENT))+refInfor.ouURI);
|
||||
rtl::OUString(ATTR_URI),
|
||||
rtl::OUString(CHAR_FRAGMENT)+refInfor.ouURI);
|
||||
}
|
||||
|
||||
xDocumentHandler->startElement( tag_Reference, cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
|
||||
@@ -1016,8 +1015,8 @@ void XSecController::exportSignature(
|
||||
{
|
||||
pAttributeList = new SvXMLAttributeList();
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_ALGORITHM)),
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ALGO_C14N)));
|
||||
rtl::OUString(ATTR_ALGORITHM),
|
||||
rtl::OUString(ALGO_C14N));
|
||||
xDocumentHandler->startElement(
|
||||
tag_Transform,
|
||||
cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
|
||||
@@ -1029,8 +1028,8 @@ void XSecController::exportSignature(
|
||||
/* Write DigestMethod element */
|
||||
pAttributeList = new SvXMLAttributeList();
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_ALGORITHM)),
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ALGO_XMLDSIGSHA1)));
|
||||
rtl::OUString(ATTR_ALGORITHM),
|
||||
rtl::OUString(ALGO_XMLDSIGSHA1));
|
||||
xDocumentHandler->startElement(
|
||||
tag_DigestMethod,
|
||||
cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
|
||||
@@ -1113,11 +1112,11 @@ void XSecController::exportSignature(
|
||||
/* Write SignatureProperty element */
|
||||
pAttributeList = new SvXMLAttributeList();
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_ID)),
|
||||
rtl::OUString(ATTR_ID),
|
||||
signatureInfo.ouPropertyId);
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_TARGET)),
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CHAR_FRAGMENT))+signatureInfo.ouSignatureId);
|
||||
rtl::OUString(ATTR_TARGET),
|
||||
rtl::OUString(CHAR_FRAGMENT)+signatureInfo.ouSignatureId);
|
||||
xDocumentHandler->startElement(
|
||||
tag_SignatureProperty,
|
||||
cssu::Reference< cssxs::XAttributeList > (pAttributeList));
|
||||
@@ -1126,14 +1125,14 @@ void XSecController::exportSignature(
|
||||
|
||||
pAttributeList = new SvXMLAttributeList();
|
||||
pAttributeList->AddAttribute(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ATTR_XMLNS))
|
||||
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":"))
|
||||
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NSTAG_DC)),
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NS_DC)));
|
||||
rtl::OUString(ATTR_XMLNS)
|
||||
+rtl::OUString(":")
|
||||
+rtl::OUString(NSTAG_DC),
|
||||
rtl::OUString(NS_DC));
|
||||
|
||||
xDocumentHandler->startElement(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NSTAG_DC))
|
||||
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":"))
|
||||
rtl::OUString(NSTAG_DC)
|
||||
+rtl::OUString(":")
|
||||
+tag_Date,
|
||||
cssu::Reference< cssxs::XAttributeList > (pAttributeList));
|
||||
|
||||
@@ -1153,8 +1152,8 @@ void XSecController::exportSignature(
|
||||
xDocumentHandler->characters( buffer.makeStringAndClear() );
|
||||
|
||||
xDocumentHandler->endElement(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NSTAG_DC))
|
||||
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":"))
|
||||
rtl::OUString(NSTAG_DC)
|
||||
+rtl::OUString(":")
|
||||
+tag_Date);
|
||||
}
|
||||
xDocumentHandler->endElement( tag_SignatureProperty );
|
||||
|
@@ -85,7 +85,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
|
||||
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
|
||||
xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
|
||||
xMCF->createInstanceWithContext(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SIGNATURECREATOR_COMPONENT)), mxCtx),
|
||||
rtl::OUString(SIGNATURECREATOR_COMPONENT), mxCtx),
|
||||
cssu::UNO_QUERY);
|
||||
|
||||
cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
|
||||
@@ -184,10 +184,10 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
|
||||
for(i=0; i<size; ++i)
|
||||
{
|
||||
SignatureReferenceInformation& refInfor = vReferenceInfors[i];
|
||||
refInfor.ouDigestValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CHAR_BLANK));
|
||||
refInfor.ouDigestValue = rtl::OUString(CHAR_BLANK);
|
||||
}
|
||||
|
||||
internalSignatureInfor.signatureInfor.ouSignatureValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CHAR_BLANK));
|
||||
internalSignatureInfor.signatureInfor.ouSignatureValue = rtl::OUString(CHAR_BLANK);
|
||||
|
||||
return xReferenceResolvedListener;
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
|
||||
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
|
||||
xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
|
||||
xMCF->createInstanceWithContext(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATUREVERIFIER_COMPONENT )), mxCtx),
|
||||
rtl::OUString( SIGNATUREVERIFIER_COMPONENT ), mxCtx),
|
||||
cssu::UNO_QUERY);
|
||||
|
||||
cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
|
||||
|
@@ -55,41 +55,41 @@ rtl::OUString certificateValidityToOUString( ::sal_Int32 certValidity ) {
|
||||
OUString aValidity ;
|
||||
|
||||
if( (certValidity & CertificateValidity::VALID) == CertificateValidity::VALID ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(VALID_STR )) ;
|
||||
aValidity = OUString(VALID_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::INVALID ) == CertificateValidity::INVALID ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(INVALID_STR )) ;
|
||||
aValidity = OUString(INVALID_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::UNTRUSTED ) == CertificateValidity::UNTRUSTED ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(UNTRUSTED_STR )) ;
|
||||
aValidity = OUString(UNTRUSTED_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::TIME_INVALID ) == CertificateValidity::TIME_INVALID ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(TIME_INVALID_STR )) ;
|
||||
aValidity = OUString(TIME_INVALID_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::NOT_TIME_NESTED ) == CertificateValidity::NOT_TIME_NESTED ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(NOT_NESTED_TIME_STR )) ;
|
||||
aValidity = OUString(NOT_NESTED_TIME_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::REVOKED ) == CertificateValidity::REVOKED ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(REVOKED_STR )) ;
|
||||
aValidity = OUString(REVOKED_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::UNKNOWN_REVOKATION ) == CertificateValidity::UNKNOWN_REVOKATION ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(UNKNOWN_REVOKATION_STR )) ;
|
||||
aValidity = OUString(UNKNOWN_REVOKATION_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::SIGNATURE_INVALID ) == CertificateValidity::SIGNATURE_INVALID ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(SIGNATURE_INVALID_STR )) ;
|
||||
aValidity = OUString(SIGNATURE_INVALID_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::EXTENSION_INVALID ) == CertificateValidity::EXTENSION_INVALID ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(EXTENSION_INVALID_STR )) ;
|
||||
aValidity = OUString(EXTENSION_INVALID_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::EXTENSION_UNKNOWN ) == CertificateValidity::EXTENSION_UNKNOWN ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(EXTENSION_UNKNOWN_STR )) ;
|
||||
aValidity = OUString(EXTENSION_UNKNOWN_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::ISSUER_UNKNOWN ) == CertificateValidity::ISSUER_UNKNOWN ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_UNKNOWN_STR )) ;
|
||||
aValidity = OUString(ISSUER_UNKNOWN_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::ISSUER_UNTRUSTED ) == CertificateValidity::ISSUER_UNTRUSTED ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_UNTRUSTED_STR )) ;
|
||||
aValidity = OUString(ISSUER_UNTRUSTED_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::ISSUER_INVALID ) == CertificateValidity::ISSUER_INVALID ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_INVALID_STR )) ;
|
||||
aValidity = OUString(ISSUER_INVALID_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::ROOT_UNKNOWN ) == CertificateValidity::ROOT_UNKNOWN ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_UNKNOWN_STR )) ;
|
||||
aValidity = OUString(ROOT_UNKNOWN_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::ROOT_UNTRUSTED ) == CertificateValidity::ROOT_UNTRUSTED ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_UNTRUSTED_STR )) ;
|
||||
aValidity = OUString(ROOT_UNTRUSTED_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::ROOT_INVALID ) == CertificateValidity::ROOT_INVALID ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_INVALID_STR )) ;
|
||||
aValidity = OUString(ROOT_INVALID_STR ) ;
|
||||
} else if( ( certValidity & CertificateValidity::CHAIN_INCOMPLETE ) == CertificateValidity::CHAIN_INCOMPLETE ) {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(CHAIN_INCOMPLETE_STR )) ;
|
||||
aValidity = OUString(CHAIN_INCOMPLETE_STR ) ;
|
||||
} else {
|
||||
aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(INVALID_STR )) ;
|
||||
aValidity = OUString(INVALID_STR ) ;
|
||||
}
|
||||
|
||||
return aValidity ;
|
||||
|
@@ -105,8 +105,8 @@ void Main();
|
||||
|
||||
// Init USB
|
||||
uno::Sequence< uno::Any > aArgs( 2 );
|
||||
aArgs[ 0 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL ));
|
||||
aArgs[ 1 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE ));
|
||||
aArgs[ 0 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY1_LOCAL );
|
||||
aArgs[ 1 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY2_OFFICE );
|
||||
sal_Bool bSuccess = ::ucb::ContentBroker::initialize( xMSF, aArgs );
|
||||
if ( !bSuccess )
|
||||
{
|
||||
|
Reference in New Issue
Block a user