Anonymous avatar Anonymous committed f2f4e45

tkr38: #i112307# fix nss test run and clean up sources

Comments (0)

Files changed (6)

xmlsecurity/qa/certext/SanCertExt.cxx

 
 #include "precompiled_xmlsecurity.hxx" 
 #include "sal/config.h"
+#include "test/officeconnection.hxx"
 
-#include "../../source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx"
 #include <com/sun/star/security/XSanExtension.hpp>
 #include <com/sun/star/security/ExtAltNameType.hpp>
 #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
+#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
 #include <com/sun/star/security/XCertificate.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/Reference.hxx"
 
 #include "cppuhelper/bootstrap.hxx"
 #include "cppunit/TestAssert.h"
 #include <neon/ne_ssl.h>
 
 using namespace com::sun::star;
-using ::com::sun::star::lang::XMultiServiceFactory; 
 
 #define OID_SUBJECT_ALTERNATIVE_NAME "2.5.29.17"
+#define SEINITIALIZER_COMPONENT "com.sun.star.xml.crypto.SEInitializer"
+
 
 namespace {
 
-class Test: public CppUnit::TestFixture {
+	class Test: public CppUnit::TestFixture {
 
-private:
+	private:
+		static uno::Sequence< security::CertAltNameEntry > altNames;
+		static bool runOnce;
 
-    static uno::Sequence< security::CertAltNameEntry > altNames;
+		uno::Reference< xml::crypto::XSecurityEnvironment > initUno();
+		void init();
+		rtl::OString getB64CertFromFile(const char filename[]);
+		test::OfficeConnection connection_;
 
-    void init(){
-        if (altNames.getLength() == 0){
-            cppu::defaultBootstrap_InitialComponentContext();
-            ne_ssl_certificate* cert = ne_ssl_cert_read("User_35_Root_11.crt");
-            char* certExportB64 = ne_ssl_cert_export(cert);
+	public:
 
-            uno::Reference< xml::crypto::XSecurityEnvironment > xSecurityEnv( new SecurityEnvironment_MSCryptImpl( uno::Reference< XMultiServiceFactory >() ) );
-            
-            uno::Reference< security::XCertificate > xCert = xSecurityEnv->createCertificateFromAscii( 
-                rtl::OStringToOUString( certExportB64, RTL_TEXTENCODING_ASCII_US ) );
+		Test();
 
-            uno::Sequence< uno::Reference< security::XCertificateExtension > > extensions = xCert->getExtensions();
-            for (sal_Int32 i = 0 ; i < extensions.getLength(); i++)
-            {
-                uno::Reference< security::XCertificateExtension >element = extensions[i];
+		~Test();
 
-                rtl::OString aId ( (const sal_Char *)element->getExtensionId().getArray(), element->getExtensionId().getLength());
-                if (aId.equals(OID_SUBJECT_ALTERNATIVE_NAME)) 
-                {
-                   uno::Reference< security::XSanExtension > sanExtension ( element, uno::UNO_QUERY );
-                   altNames = sanExtension->getAlternativeNames();
-                   break;
-                }
-            }
-        }
+		virtual void setUp();
 
-    }
+		virtual void tearDown();
 
-public:
-    void test_Others() {
-        init();
-        for(int n = 1; n < altNames.getLength(); n++)
-        {
-            if (altNames[n].Type ==  security::ExtAltNameType_OTHER_NAME)
-            {
-                ::com::sun::star::beans::NamedValue otherNameProp;
-                if (altNames[n].Value >>= otherNameProp) 
-                {
-                    //Name    
-                    CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("1.2.3.4"), otherNameProp.Name);
+		void test_Others();
 
-                    //Value
-                    uno::Sequence< sal_Int8 > ipAddress;
-                    otherNameProp.Value >>= ipAddress;
-                    CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( ipAddress.getLength() > 0 ) );
-                }
-            }
-        }
-    }
+		void test_RFC822();
 
-    void test_RFC822() {
-        init();
-        for(int n = 1; n < altNames.getLength(); n++)
-        {
-            if (altNames[n].Type ==  security::ExtAltNameType_RFC822_NAME)
-            {
-                rtl::OUString value;
-                altNames[n].Value >>= value;
-                //Value
-                CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("my@other.address"), value);
-            }
-        }
-    }
+		void test_DNS();
 
-    void test_DNS() {
-        init();
-        for(int n = 1; n < altNames.getLength(); n++)
-        {
-            if (altNames[n].Type ==  security::ExtAltNameType_DNS_NAME)
-            {
-                rtl::OUString value;
-                altNames[n].Value >>= value;
-                //Value
-                CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("alt.openoffice.org"), value);
-            }
-        }
-    }
+		void test_Direcory();
 
-    void test_Direcory() {
-        init();
-        for(int n = 1; n < altNames.getLength(); n++)
-        {
-            if (altNames[n].Type ==  security::ExtAltNameType_DIRECTORY_NAME)
-            {
-                uno::Sequence< sal_Int8 > value;
-                altNames[n].Value >>= value;
-                //Value
-                CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( value.getLength() > 0 ) );
-            }
-        }
-    }
+		void test_URI();
 
-    void test_URI() {
-        init();
-        for(int n = 1; n < altNames.getLength(); n++)
-        {
-            if (altNames[n].Type ==  security::ExtAltNameType_URL)
-            {
-                rtl::OUString value;
-                altNames[n].Value >>= value;
-                //Value
-                CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("http://my.url.here/"), value);
-            }
-        }
-    }
+		void test_IP();
 
-    void test_IP() {
-        init();
-        for(int n = 1; n < altNames.getLength(); n++)
-        {
-            if (altNames[n].Type ==  security::ExtAltNameType_IP_ADDRESS)
-            {
-                uno::Sequence< sal_Int8 > ipAddress;
-                altNames[n].Value >>= ipAddress;
-                //Value
-                CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( ipAddress.getLength() > 0 ) );
-            }
-        }
+		void test_RID();
 
-    }
+		void test_EDI();
 
-    void test_RID() {
-        init();
-        for(int n = 1; n < altNames.getLength(); n++)
-        {
-            if (altNames[n].Type ==  security::ExtAltNameType_REGISTERED_ID)
-            {
-                rtl::OUString value;
-                altNames[n].Value >>= value;
-                //Value
-                CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("1.2.3.4"), value);
-            }
-        }
+		void test_X400();
 
-    }
+		CPPUNIT_TEST_SUITE(Test);
+		CPPUNIT_TEST(test_Others);
+		CPPUNIT_TEST(test_RFC822);
+		CPPUNIT_TEST(test_DNS);
+		CPPUNIT_TEST(test_Direcory);
+		CPPUNIT_TEST(test_URI);
+		CPPUNIT_TEST(test_IP);
+		CPPUNIT_TEST(test_RID);
+		CPPUNIT_TEST(test_EDI);
+		CPPUNIT_TEST(test_X400);
+		CPPUNIT_TEST_SUITE_END();
+	};
 
-    void test_EDI() {
-        // Not implemented
-    }
+	uno::Sequence< security::CertAltNameEntry > Test::altNames;
+	bool Test::runOnce = false;
 
-    void test_X400() {
-        // Not implemented
-    }
+	CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
-    CPPUNIT_TEST_SUITE(Test);
-    CPPUNIT_TEST(test_Others);
-    CPPUNIT_TEST(test_RFC822);
-    CPPUNIT_TEST(test_DNS);
-    CPPUNIT_TEST(test_Direcory);
-    CPPUNIT_TEST(test_URI);
-    CPPUNIT_TEST(test_IP);
-    CPPUNIT_TEST(test_RID);
-    CPPUNIT_TEST(test_EDI);
-    CPPUNIT_TEST(test_X400);
-    CPPUNIT_TEST_SUITE_END();
-};
+	Test::Test()
+	{
+		if (runOnce)
+			return;
+		runOnce = true;
+		connection_.setUp();
+		init();
+	}
 
-uno::Sequence< security::CertAltNameEntry > Test::altNames;
+	Test::~Test()
+	{
+		if (runOnce)
+		{
+			connection_.tearDown();
+			runOnce = false;
+		}
+	}
 
-CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+	
+	uno::Reference< xml::crypto::XSecurityEnvironment > Test::initUno()
+	{
+		uno::Reference< uno::XComponentContext > context(connection_.getComponentContext(), uno::UNO_QUERY_THROW);
+		uno::Reference< lang::XMultiServiceFactory > factory(context->getServiceManager(), uno::UNO_QUERY_THROW);
+		uno::Reference< xml::crypto::XSEInitializer > xSEInitializer(factory->createInstance(
+			rtl::OUString::createFromAscii( SEINITIALIZER_COMPONENT )),	uno::UNO_QUERY_THROW);
+		uno::Reference< xml::crypto::XXMLSecurityContext > xSecurityContext(
+			xSEInitializer->createSecurityContext(rtl::OUString()));
+		return xSecurityContext->getSecurityEnvironment();
+	}
 
+
+	void Test::init()
+	{
+		uno::Reference< xml::crypto::XSecurityEnvironment > xSecurityEnv = initUno();
+		rtl::OString b64Cert(getB64CertFromFile("User_35_Root_11.crt"));
+		uno::Reference< security::XCertificate > xCert = xSecurityEnv->createCertificateFromAscii( 
+			rtl::OStringToOUString( b64Cert, RTL_TEXTENCODING_ASCII_US ) );
+		uno::Sequence< uno::Reference< security::XCertificateExtension > > extensions = xCert->getExtensions();
+		for (sal_Int32 i = 0 ; i < extensions.getLength(); i++)
+		{
+			uno::Reference< security::XCertificateExtension >element = extensions[i];
+			rtl::OString aId ( (const sal_Char *)element->getExtensionId().getArray(), element->getExtensionId().getLength());
+			if (aId.equals(OID_SUBJECT_ALTERNATIVE_NAME)) 
+			{
+				uno::Reference< security::XSanExtension > sanExtension ( element, uno::UNO_QUERY );
+				altNames = sanExtension->getAlternativeNames();
+				break;
+			}
+		}
+	}
+
+	rtl::OString Test::getB64CertFromFile(const char filename[])
+	{
+		ne_ssl_certificate* cert = ne_ssl_cert_read(filename);
+		char* certExportB64 = ne_ssl_cert_export(cert);
+		rtl::OString certB64( certExportB64 );
+		return certB64;
+	}
+
+
+	void Test::setUp() {
+	}
+
+	void Test::tearDown() {
+	}
+
+	void Test::test_Others() {
+		CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) );
+		for(int n = 1; n < altNames.getLength(); n++)
+		{
+			if (altNames[n].Type ==  security::ExtAltNameType_OTHER_NAME)
+			{
+				::com::sun::star::beans::NamedValue otherNameProp;
+				if (altNames[n].Value >>= otherNameProp) 
+				{
+					CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("1.2.3.4"), otherNameProp.Name);
+					uno::Sequence< sal_Int8 > ipAddress;
+					otherNameProp.Value >>= ipAddress;
+					CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( ipAddress.getLength() > 0 ) );
+				}
+			}
+		}
+	}
+
+	void Test::test_RFC822() {
+		CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) );
+		for(int n = 1; n < altNames.getLength(); n++)
+		{
+			if (altNames[n].Type ==  security::ExtAltNameType_RFC822_NAME)
+			{
+				rtl::OUString value;
+				altNames[n].Value >>= value;
+				CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("my@other.address"), value);
+			}
+		}
+	}
+
+	void Test::test_DNS() {
+		CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) );
+		for(int n = 1; n < altNames.getLength(); n++)
+		{
+			if (altNames[n].Type ==  security::ExtAltNameType_DNS_NAME)
+			{
+				rtl::OUString value;
+				altNames[n].Value >>= value;
+				CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("alt.openoffice.org"), value);
+			}
+		}
+	}
+
+	void Test::test_Direcory() {
+		// Not implemented
+	}
+
+	void Test::test_URI() {
+		CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) );
+		for(int n = 1; n < altNames.getLength(); n++)
+		{
+			if (altNames[n].Type ==  security::ExtAltNameType_URL)
+			{
+				rtl::OUString value;
+				altNames[n].Value >>= value;
+				CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("http://my.url.here/"), value);
+			}
+		}
+	}
+
+	void Test::test_IP() {
+		CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) );
+		for(int n = 1; n < altNames.getLength(); n++)
+		{
+			if (altNames[n].Type ==  security::ExtAltNameType_IP_ADDRESS)
+			{
+				uno::Sequence< sal_Int8 > ipAddress;
+				altNames[n].Value >>= ipAddress;
+				CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( ipAddress.getLength() > 0 ) );
+			}
+		}
+
+	}
+
+	void Test::test_RID() {
+		CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) );
+		for(int n = 1; n < altNames.getLength(); n++)
+		{
+			if (altNames[n].Type ==  security::ExtAltNameType_REGISTERED_ID)
+			{
+				rtl::OUString value;
+				altNames[n].Value >>= value;
+				CPPUNIT_ASSERT( rtl::OUString::createFromAscii("1.2.3.4").equals(value));
+			}
+		}
+	}
+
+	void Test::test_EDI() {
+		// Not implemented
+	}
+
+	void Test::test_X400() {
+		// Not implemented
+	}
 }
-
 CPPUNIT_PLUGIN_IMPLEMENT();

xmlsecurity/qa/certext/makefile.mk

 # for a copy of the LGPLv3 License.
 #
 #***********************************************************************/
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE 
 
 PRJ = ../..
 PRJNAME = xmlsecurity
 
 ENABLE_EXCEPTIONS = TRUE
 
-.IF "$(OS)" == "WNT"
-my_file = file:///
-.ELSE
-my_file = file://
-.END
-
-
 .INCLUDE: settings.mk
 .INCLUDE :	$(PRJ)$/util$/target.pmk
 
-.IF "$(SYSTEM_LIBXML)" == "YES"
-CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS)
-.ENDIF
-
-.IF "$(CRYPTO_ENGINE)" == "nss"
-
-.IF "$(WITH_MOZILLA)" == "NO" || "$(ENABLE_NSS_MODULE)"!="YES"
-.IF "$(SYSTEM_MOZILLA)" != "YES"
-@all:
-	@echo "No mozilla -> no nss -> no libxmlsec -> no xmlsecurity/nss"
-.ENDIF
-.ENDIF
-
-.IF "$(SYSTEM_MOZILLA)" != "YES"
-MOZ_INC = $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla
-NSS_INC = $(MOZ_INC)$/nss
-NSPR_INC = $(MOZ_INC)$/nspr
-.ELSE
-# MOZ_INC already defined from environment
-NSS_INC = $(MOZ_NSS_CFLAGS)
-NSPR_INC = $(MOZ_INC)$/nspr
-.ENDIF
-
-.IF "$(GUI)"=="UNX"
-.IF "$(COMNAME)"=="sunpro5"
-CFLAGS += -features=tmplife
-#This flag is needed to build mozilla 1.7 code
-.ENDIF		# "$(COMNAME)"=="sunpro5"
-.ENDIF
-
-.IF "$(GUI)" == "WNT"
-.IF "$(DBG_LEVEL)" == "0"
-INCPRE += \
--I$(MOZ_INC)$/profile \
--I$(MOZ_INC)$/string \
--I$(MOZ_INC)$/embed_base
-CFLAGS +=   -GR- -W3 -Gy -MD -UDEBUG
-.ELSE
-INCPRE += \
--I$(MOZ_INC)$/profile \
--I$(MOZ_INC)$/string \
--I$(MOZ_INC)$/embed_base
-CFLAGS += -Zi -GR- -W3 -Gy -MDd -UNDEBUG
-.ENDIF
-.ENDIF
-.IF "$(GUI)" == "UNX"
-INCPOST += \
-$(MOZ_INC)$/profile \
--I$(MOZ_INC)$/string \
--I$(MOZ_INC)$/embed_base
-.ENDIF
-
-CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT
-
-SOLARINC += \
- -I$(MOZ_INC) \
--I$(NSPR_INC) \
--I$(PRJ)$/source$/xmlsec
-
-.IF "$(SYSTEM_MOZILLA)" == "YES"
-SOLARINC += -DSYSTEM_MOZILLA $(NSS_INC)
-.ELSE
-SOLARINC += -I$(NSS_INC)
-.ENDIF
-.ENDIF
-
-
-
-
 CFLAGSCXX += $(CPPUNIT_CFLAGS)
 
 SHL1IMPLIB = i$(SHL1TARGET)
 	          $(CPPUHELPERLIB)	\
 	          $(SVLLIB)			\
 	          $(TOOLSLIB)	    \
-	          $(COMPHELPERLIB)
-	          
-	
-	
-.IF "$(OS)"=="SOLARIS"
-SHL1STDLIBS +=-ldl
-.ENDIF
-
-.IF "$(SYSTEM_MOZILLA)" == "YES"
-.IF "$(NSPR_LIB)" != ""
-SHL1STDLIBS += $(NSPR_LIB)
-.ENDIF
-.IF "$(NSS_LIB)" != ""
-SHL1STDLIBS += $(NSS_LIB)
-.ENDIF
-.ENDIF
-
-.IF "$(CRYPTO_ENGINE)" == "mscrypto"
-SHL1STDLIBS+= $(MSCRYPTOLIBS)
-.ELSE
-CDEFS += -DNSS_ENGINE
-SHL1STDLIBS+= $(NSSCRYPTOLIBS)
-.ENDIF	
-
-.IF "$(ENABLE_NSS_MODULE)"=="YES" || "$(SYSTEM_MOZILLA)" == "YES"
-
-SHL1LIBS= \
-	$(SLB)$/xs_comm.lib
-
-.IF "$(CRYPTO_ENGINE)" == "mscrypto"
-SHL1LIBS += \
-	$(SLB)$/xs_mscrypt.lib
-.ELSE
-SHL1LIBS += \
-	$(SLB)$/xs_nss.lib
-.ENDIF
-
-.ENDIF	
+	          $(COMPHELPERLIB) \
+	          $(TESTLIB)
 
 SHL1TARGET = qa_CertExt
 SHL1VERSIONMAP = $(PRJ)/qa/certext/export.map
 SLOFILES = $(SLO)/SanCertExt.obj
 
 .INCLUDE: target.mk
+.INCLUDE: installationtest.mk
 
-ALLTAR : test
+ALLTAR : cpptest
 
-test .PHONY : $(SHL1TARGETN)
-    $(CPPUNITTESTER) $(SHL1TARGETN) \
-        -env:UNO_TYPES=$(my_file)$(SOLARBINDIR)/types.rdb
+cpptest : $(SHL1TARGETN)
+
+CPPTEST_LIBRARY = $(SHL1TARGETN)
+
+.END

xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx

             case CERT_ALT_NAME_DIRECTORY_NAME :
                 {
                     arrCertAltNameEntry[i].Type = ExtAltNameType_DIRECTORY_NAME;
-                    
-                    Sequence< sal_Int8 > directoryName( pEntry->DirectoryName.cbData ) ;
-		            for( unsigned int n = 0; n < pEntry->DirectoryName.cbData ; n++ )
-			            directoryName[n] = *( pEntry->DirectoryName.pbData + n ) ;
-                    
-                    arrCertAltNameEntry[i].Value <<= directoryName;
                     break;
                 }
             case CERT_ALT_NAME_URL :

xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx

         return length;
     }
 
-    static SECStatus DestroyGeneralName(CERTGeneralName *name)
-    {
-        CERTGeneralName    *first;
-        CERTGeneralName    *next = NULL;
-
-        first = name;
-        do {
-            next = CERT_GetNextGeneralName(name);
-            PORT_Free(name);
-            name = next;
-        } while (name != first);
-        return SECSuccess;
-
-    }
 }
 
 //Methods from XSanExtension
                 case certX400Address: {
                     // unsupported
                     arrCertAltNameEntry[i].Type = ExtAltNameType_X400_ADDRESS;
-                    arrCertAltNameEntry[i].value <<= Any.VOID;
                     break;
                                       }
                 case certDirectoryName: {
-                    arrCertAltNameEntry[i].Type = ExtAltNameType_DIRECTORY_NAME;
-
-                    char * directoryName = CERT_NameToAscii(&current->name.directoryName);
-
-                    arrCertAltNameEntry[i].Value <<= ::rtl::OUString::createFromAscii(directoryName);
-
-                    PORT_Free(directoryName);
+					// unsupported
+					arrCertAltNameEntry[i].Type = ExtAltNameType_DIRECTORY_NAME;
                     break;
                                         }
                 case certEDIPartyName:  {
                     // unsupported
                     arrCertAltNameEntry[i].Type = ExtAltNameType_EDI_PARTY_NAME;
-                    arrCertAltNameEntry[i].Value <<= Any.VOID;
                     break;
                                         }
                 case certURI:
                                     }
                 case certRegisterID:
                     arrCertAltNameEntry[i].Type = ExtAltNameType_REGISTERED_ID;
-                    arrCertAltNameEntry[i].Value <<= ::rtl::OUString::createFromAscii(CERT_GetOidString(&current->name.other));
+
+
+					rtl::OString nssOid = ::rtl::OString(CERT_GetOidString(&current->name.other));
+					rtl::OString unoOid = removeOIDFromString(nssOid);
+                    arrCertAltNameEntry[i].Value <<= rtl::OStringToOUString( unoOid, RTL_TEXTENCODING_ASCII_US );
                     break;
             }
-
-
-            //    break;
-
             current = CERT_GetNextGeneralName(current);
         }
 
     return m_Entries;
 }
 
+::rtl::OString SanExtensionImpl :: removeOIDFromString( const ::rtl::OString &oidString)
+	{
+		::rtl::OString objID;
+		::rtl::OString oid("OID.");
+		if (oidString.match(oid))
+			objID = oidString.copy(oid.getLength());
+		else
+			objID = oidString;
+		return objID;
+
+	}
 //Helper method
 void SanExtensionImpl :: setCertExtn( ::com::sun::star::uno::Sequence< sal_Int8 > extnId, ::com::sun::star::uno::Sequence< sal_Int8 > extnValue, sal_Bool critical ) {
     m_critical = critical ;

xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx

 		sal_Bool m_critical ;
 		::com::sun::star::uno::Sequence< sal_Int8 > m_xExtnId ;
 		::com::sun::star::uno::Sequence< sal_Int8 > m_xExtnValue ;
+        ::com::sun::star::uno::Sequence< com::sun::star::security::CertAltNameEntry > m_Entries;
 
-        ::com::sun::star::uno::Sequence< com::sun::star::security::CertAltNameEntry > m_Entries;
+		::rtl::OString removeOIDFromString( const ::rtl::OString &oid);
 
 	public :
 		SanExtensionImpl() ;

xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx

             else
                 objID = oidString;
 
-            if ( objId.equals("2.5.29.17") )
+            if ( objID.equals("2.5.29.17") )
                 pExtn = (CertificateExtension_XmlSecImpl*) new SanExtensionImpl() ;
             else 
 			    pExtn = new CertificateExtension_XmlSecImpl() ;
 				crit = sal_False ;
 			else
 				crit = ( (*extns)->critical.data[0] == 0xFF ) ? sal_True : sal_False ;
-			pExtn->setCertExtn( (*extns)->value.data, (*extns)->value.len, (unsigned char*)objId.getStr(), objId.getLength(), crit ) ;
+			pExtn->setCertExtn( (*extns)->value.data, (*extns)->value.len, (unsigned char*)objID.getStr(), objID.getLength(), crit ) ;
 
 			xExtns[len] = pExtn ;
 		}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.