Issue 33927 - NT: cannot register xsec_xmlsec.dll
Summary: NT: cannot register xsec_xmlsec.dll
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Code
Component: code (show other issues)
Version: 680
Hardware: PC Windows NT
: P1 (highest) Trivial (vote)
Target Milestone: OOo 2.0
Assignee: afan
QA Contact: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-07 14:21 UTC by rt
Modified: 2004-10-08 12:38 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description rt 2004-09-07 14:21:12 UTC
xsec_xmlsec.dll is linked against xmlsec-mscrypto.dll out of module libxmlsec.
xmlsec-mscrypto.dll uses two functions (CryptContextAddRef and
CryptDuplicateKey)  out of advapi43.lib which are available in Windows 2000 and
later and Windows 98 and later, but not in NT 4. 
As our windows baseline is WIN98 and WIN NT4, this is a P1 issue.
Comment 1 rt 2004-09-07 14:23:41 UTC
Setting Kurt on CC.
Comment 2 malte_timmermann 2004-09-07 14:41:29 UTC
Andrew...
Comment 3 afan 2004-09-08 07:12:52 UTC
I don't know what will happened if I disable the codes with CryptContextAddRef and
CryptDuplicateKey, even I don't think it is possible. Is it possible to add the
advapi32.dll( from win 2k or win xp ) to staroffice program directory?
Comment 4 rt 2004-09-08 11:34:51 UTC
I strongly doubt that we may redistribute that windows library.
We have a clear baseline for all our major platforms and every developer has to
ensure that his code is compatible with this baseline. In this case that means
you must not use any windows API not available on NT4.
Comment 5 afan 2004-09-09 09:34:37 UTC
The CryptoContextAddRef and CryptoDuplicateKey have been replaced with some
similar private functions( I also afraid that it will cause some problems
unexpected ). And the securityenvironment component also have some changes,
without the two APIs, the methods( setCryptoProvider, adoptSymKey, adoptPubKey,
adoptPriKey ) of securityenvironment have some limitation comparing with
previous implementation.

1. After calling those methods, any action should not do over the
provider/symkey/pubkey/prikey, because it has been adopted into
securityenvironment component, its lifecyle will be managed by securityenvironment.
2. The current applications do not use the above methods.

Notes: WINNT 4.0 with SP6 support certificate management APIs. SP3 declared
support certificate management APIs. 
Comment 6 afan 2004-09-15 02:29:48 UTC
The bug has been fixed.
Comment 7 rt 2004-09-16 11:02:30 UTC
Sorry, the changed source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
does not fix this bug. Library wntmsci10.pro/bin/xsec_xmlsec.dll still gets
linked against xmlsec-mscrypto.dll (see xmlsecurity/util/makefile.mk, line 134:
.IF "$(CRYPTO_ENGINE)" == "mscrypto"
SHL2STDLIBS+= $(MSCRYPTOLIBS)
( $(MSCRYPTOLIBS) is defined in solenv/inc/libs.mk as MSCRYPTOLIBS=$(LIBXML2LIB)
$(XMLSECLIB) $(XMLSECLIB-MS) $(LIBPRE) crypt32.lib $(LIBPRE) advapi32.lib with
XMLSECLIB-MS=$(LIBPRE) xmlsec-mscrypto.lib )
I cannot just remove XMLSECLIB-MS from that macro, this would lead to quite some
unresolved external symbols. 
Therefore 'depends xsec_xmlsec.dll ' still tells me about unresolved imports
CryptContextAddRef and CryptDuplicateKey from advapi32.dll

So, what to do now?
Comment 8 rt 2004-09-16 11:06:09 UTC
Not fixed.
Smoketest on NT4 machines failes, we cannot release wntmsci10 for m54.
Comment 9 afan 2004-09-16 11:20:45 UTC
Do you have recheck out, rebuild and redeliver the external/libxmlsec? Any
result, let me know as soon as possible.
Comment 10 rt 2004-09-16 11:25:25 UTC
Sorry, no. No one told me that there was more involved than just that one file
in xmlsecurity. I'll try immediately.
Comment 11 afan 2004-09-16 11:39:24 UTC
What happened then?
Comment 12 rt 2004-09-16 11:56:47 UTC
I do not have a new install set yet, but according to 'depends' now it's OK.
Thank you, Andrew.

Rüdiger
Comment 13 rt 2004-09-16 15:55:38 UTC
Yes, now setup runs successfull on NT4 machines, everything can be registered.
Comment 14 rt 2004-10-08 12:38:14 UTC
Verified on master.
Comment 15 rt 2004-10-08 12:38:51 UTC
Closing.