Nelson B wrote:

> All 3 stack traces contained this subset:
> 
> PR_Assert+0x0000005E
> CERT_CheckCertValidTimes+0x000004D5
> NSS_PutEnv+0x0000C785
> NSS_PutEnv+0x0000AB8A
> NSS_PutEnv+0x000028B8
> NSS_PutEnv+0x000029F0
> NSS_PutEnv+0x00002AE8
> CERT_CertChainFromCert+0x0000005B
> NSS_CMSSignerInfo_IncludeCerts
> xsign_signature::start_signMessage(void)
> 
> All of the NSS_PutEnv symbols and CERT_ChecerCertValidTimes are incorrect.
> I don't know why you're getting the wrong symbols, since you do seem to
> have a debug build (witness the assertion failure, which should only
> happen in debug builds).
> 
> The actual stack trace for these events is apparently as follows:
> 
> PR_Assert
> CERT_KeyUsageAndTypeForCertUsage  line 1134
> nss3certificate_matchUsage
> nssCertificateArray_FindBestCertificate
> find_cert_issuer
> nssCertificate_BuildChain
> NSSCertificate_BuildChain
> CERT_CertChainFromCert+0x0000005B
> NSS_CMSSignerInfo_IncludeCerts
> xsign_signature::start_signMessage(void)
> 
> The assertion failure in CERT_KeyUsageAndTypeForCertUsage is asserting
> that the cert usage type that has been passed into that function is one
> of the enumerated cert usage types defined in NSS.  That value is
> passed right up the stack.  The usage value is passed to
> NSS_CMSSIgnerInfo_IncludeCerts and is passed from there all the way to
> CERT_KeyUsageAndTypeForCertUsage.
> 
> So, I must conclude that the function xsign_signature::start_signMessage
> has passed an invalid nss usage to NSS_CMSSignerInfo_IncludeCerts.
> 
> Which begs the question: what is xsign_signature::start_signMessage ??
> It's apprently not part of mozilla.  the lxr tool doesn't find it.
> 
> You mentioned that you have a plugin.  Where did it come from?
> What usage value does it pass to NSS_CMSSignerInfo_IncludeCerts?
> 

The plugin I have mentioned is a one developed at work. It is used to:
- list certs (software and in smart cards) so user can select one of them
- sign data with selected cert.

The function start_signMessage is an adaption of "signed_data" in Mozilla's 
smimetools. Actually the code is almost the same. I looked at the "cert 
usage" argument passed to the function call 
"NSS_CMSSignerInfo_IncludeCerts" and I found that it was:
pSignerCert->nsCertType. I replaced this value with "certUsageObjectSigner" 
and it worked !. It was possible to sign using a software or hw certificate 
(the "but..." comes later). Actually I do not know why we had the other 
value. Neither I understand why this was/is working with Mozilla 1.0 

The problem is now that if I have signed with a cert and I try to show the 
certificates to choose another one to sign later, then I get: see attached 
file "stacktrace1.txt". 

The functions:

xsign_certSelect::getCertificateList
xsign_certSelect::showModal
CXsignApi::selectCertificate
nsPluginInstance::xsign_SelectCertificate
nsXSignPeer::SelectCertificate

belongs to the plug-in. Mission: show a dialog with available certs so an 
user can choose one to sign data later. It seems to exist some problem with 
passwords... This was, though, working with Mozilla 1.0.

Regards,
/R





> --
> Nelson B
> Please don't reply to the email address shown.  It's purely a spam
> catcher.
Program ./mozilla-bin (pid = 18009) received Segmentation fault signal.
Stack:
nsProfileLock::FatalSignalHandler(int, siginfo *, void *)+0x00000186 
[/home/rago/software/mozilla/dist/bin/components/libprofile.so +0x00028C06]
pthread_kill+0x00000260 [/lib/libpthread.so.0 +0x00009CB0]
__libc_sigaction+0x00000130 [/lib/libc.so.6 +0x0002E7F0]
PK11_ChangePW+0x00000148 [/home/rago/software/mozilla/dist/bin/libnss3.so +0x0003E8B8]
PK11_SetPasswordFunc+0x00000124 [/home/rago/software/mozilla/dist/bin/libnss3.so 
+0x0003E9F4]
PK11_Authenticate+0x00000049 [/home/rago/software/mozilla/dist/bin/libnss3.so 
+0x0003E159]
PK11_DeleteTokenCertAndKey+0x000005CD [/home/rago/software/mozilla/dist/bin/libnss3.so 
+0x0002781D]
PK11_ListCerts+0x0000004A [/home/rago/software/mozilla/dist/bin/libnss3.so +0x0002B45A]
xsign_certSelect::getCertificateList(void)+0x00000125 
[/home/rago/xsign-client/Obj/linux/moz/build-gtk-nss/libnsXSign.so +0x0001BAC5]
xsign_certSelect::showModal(void)+0x00000048 
[/home/rago/xsign-client/Obj/linux/moz/build-gtk-nss/libnsXSign.so +0x0001D138]
CXsignApi::selectCertificate(void)+0x000000CD 
[/home/rago/xsign-client/Obj/linux/moz/build-gtk-nss/libnsXSign.so +0x00015A9D]
nsPluginInstance::xsign_SelectCertificate(void)+0x00000054 
[/home/rago/xsign-client/Obj/linux/moz/build-gtk-nss/libnsXSign.so +0x00012DD4]
nsXSignPeer::SelectCertificate(int *)+0x00000029 
[/home/rago/xsign-client/Obj/linux/moz/build-gtk-nss/libnsXSign.so +0x00011C59]
XPTC_InvokeByIndex+0x00000028 [/home/rago/software/mozilla/dist/bin/libxpcom.so 
+0x00125A08]
XPCWrappedNative::CallMethod(XPCCallContext &, XPCWrappedNative::CallMode)+0x0000143C 
[/home/rago/software/mozilla/dist/bin/components/libxpconnect.so +0x0007A7DC]
XPC_WN_CallMethod(JSContext *, JSObject *, unsigned int, long *, long *)+0x000001AE 
[/home/rago/software/mozilla/dist/bin/components/libxpconnect.so +0x00083A9E]
js_Invoke+0x00000ADB [/home/rago/software/mozilla/dist/bin/libmozjs.so +0x0004CFFB]
js_Interpret+0x0000E042 [/home/rago/software/mozilla/dist/bin/libmozjs.so +0x0005C232]
js_Invoke+0x00000B58 [/home/rago/software/mozilla/dist/bin/libmozjs.so +0x0004D078]
js_InternalInvoke+0x000000EF [/home/rago/software/mozilla/dist/bin/libmozjs.so 
+0x0004D3FF]
JS_CallFunctionValue+0x00000035 [/home/rago/software/mozilla/dist/bin/libmozjs.so 
+0x0001A0B5]
nsJSContext::CallEventHandler(void *, void *, unsigned int, void *, int *, 
int)+0x00000235 [/home/rago/software/mozilla/dist/bin/components/libjsdom.so 
+0x00062545]
nsJSEventListener::HandleEvent(nsIDOMEvent *)+0x00000CA5 
[/home/rago/software/mozilla/dist/bin/components/libjsdom.so +0x000AF475]
nsEventListenerManager::HandleEventSubType(nsListenerStruct *, nsIDOMEvent *, 
nsIDOMEventTarget *, unsigned int, unsigned int)+0x0000044E 
[/home/rago/software/mozilla/dist/bin/components/libgkcontent.so +0x0025524E]
nsEventListenerManager::HandleEvent(nsIPresContext *, nsEvent *, nsIDOMEvent **, 
nsIDOMEventTarget *, unsigned int, nsEventStatus *)+0x000009B8 
[/home/rago/software/mozilla/dist/bin/components/libgkcontent.so +0x00255CA8]
nsGenericElement::HandleDOMEvent(nsIPresContext *, nsEvent *, nsIDOMEvent **, unsigned 
int, nsEventStatus *)+0x00000D5A 
[/home/rago/software/mozilla/dist/bin/components/libgkcontent.so +0x0050D66A]
nsHTMLInputElement::HandleDOMEvent(nsIPresContext *, nsEvent *, nsIDOMEvent **, 
unsigned int, nsEventStatus *)+0x00000B02 
[/home/rago/software/mozilla/dist/bin/components/libgkcontent.so +0x002BCAC2]
PresShell::HandleEventInternal(nsEvent *, nsIView *, unsigned int, nsEventStatus 
*)+0x000001A3 [/home/rago/software/mozilla/dist/bin/components/libgklayout.so 
+0x001C2293]
PresShell::HandleEventWithTarget(nsEvent *, nsIFrame *, nsIContent *, unsigned int, 
nsEventStatus *)+0x00000042 
[/home/rago/software/mozilla/dist/bin/components/libgklayout.so +0x001C20C2]
nsEventStateManager::CheckForAndDispatchClick(nsIPresContext *, nsMouseEvent *, 
nsEventStatus *)+0x0000029C 
[/home/rago/software/mozilla/dist/bin/components/libgkcontent.so +0x002673CC]
nsEventStateManager::PostHandleEvent(nsIPresContext *, nsEvent *, nsIFrame *, 
nsEventStatus *, nsIView *)+0x000008B5 
[/home/rago/software/mozilla/dist/bin/components/libgkcontent.so +0x00263BC5]
PresShell::HandleEventInternal(nsEvent *, nsIView *, unsigned int, nsEventStatus 
*)+0x0000043E [/home/rago/software/mozilla/dist/bin/components/libgklayout.so 
+0x001C252E]
PresShell::HandleEvent(nsIView *, nsGUIEvent *, nsEventStatus *, int, int 
&)+0x00000CB9 [/home/rago/software/mozilla/dist/bin/components/libgklayout.so 
+0x001C1DB9]
nsViewManager::HandleEvent(nsView *, nsGUIEvent *, int)+0x00000462 
[/home/rago/software/mozilla/dist/bin/components/libgkview.so +0x0001D6E2]
nsView::HandleEvent(nsViewManager *, nsGUIEvent *, int)+0x00000029 
[/home/rago/software/mozilla/dist/bin/components/libgkview.so +0x0000F449]
nsViewManager::DispatchEvent(nsGUIEvent *, nsEventStatus *)+0x00000B76 
[/home/rago/software/mozilla/dist/bin/components/libgkview.so +0x0001CA86]
_init+0x0000064B [/home/rago/software/mozilla/dist/bin/components/libgkview.so 
+0x0000EC77]
nsWidget::DispatchEvent(nsGUIEvent *, nsEventStatus &)+0x00000175 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so +0x000461A5]
nsWidget::DispatchWindowEvent(nsGUIEvent *)+0x0000002F 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so +0x00045D4F]
nsWidget::DispatchMouseEvent(nsMouseEvent &)+0x00000048 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so +0x00046268]
nsWidget::OnButtonReleaseSignal(_GdkEventButton *)+0x0000019A 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so 
+0x000470FA]nsWindow::OnButtonReleaseSignal(_GdkEventButton *)+0x0000005E 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so 
+0x0004CD3E]nsWindow::HandleGDKEvent(_GdkEvent *)+0x000000C3 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so +0x0004D0F3]
handle_gdk_event(_GdkEvent *, void *)+0x00000757 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so +0x0003D0F7]
handle_gdk_event(_GdkEvent *, void *)+0x00000444 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so +0x0003CDE4]
gdk_wm_protocols_filter+0x00000354 [/usr/lib/libgdk-1.2.so.0 +0x00017DD4]
g_get_current_time+0x00000166 [/usr/lib/libglib-1.2.so.0 +0x00010C46]
g_get_current_time+0x00000793 [/usr/lib/libglib-1.2.so.0 +0x00011273]
g_main_run+0x0000008C [/usr/lib/libglib-1.2.so.0 +0x0001143C]
gtk_main+0x000000CC [/usr/lib/libgtk-1.2.so.0 +0x0009276C]
nsAppShell::Run(void)+0x00000065 
[/home/rago/software/mozilla/dist/bin/components/libwidget_gtk.so +0x00031AD5]
nsAppShellService::Run(void)+0x00000042 
[/home/rago/software/mozilla/dist/bin/components/libnsappshell.so +0x0003C5C2]
getCountry(nsAString const &, nsAString &)+0x000027FA [./mozilla-bin +0x00016ABA]
main+0x0000022D [./mozilla-bin +0x0001794D]
__libc_start_main+0x000000BE [/lib/libc.so.6 +0x0001D7EE]
Sleeping for 5 minutes.

Reply via email to