12 April 2014: The OpenOffice Wiki is not, and never was, affected by the heartbleed bug. Users' passwords are safe and wiki users do not need take any actions.

Certificate Detection

From Apache OpenOffice Wiki
Jump to: navigation, search

On Windows, OOo will use certificates from the personal key store.

On all other platforms, OOo detects the default mozilla profile.

Detection order is 1) Thunderbird 2) Mozilla 3) Firefox 4) Default (what ever that means...)

Unfortunately, there is no option to choose an other profile, but the location can be overwritten with the environment variable MOZILLA_CERTIFICATE_FOLDER

You can check the detection with this small basic script:

Option Explicit

Sub MozProfile
	Dim oMozBootstrap as Object
	Dim sMsg as String
	Dim sDefault as String

	oMozBootstrap = createUnoService( "com.sun.star.mozilla.MozillaBootstrap" )
	sMsg = "OpenOffice.org Mozilla Profile Detection" + Chr$(10) + Chr$(10)
	CheckMozProfile( oMozBootstrap, "Thunderbird", com.sun.star.mozilla.MozillaProductType.Thunderbird, sMsg, sDefault )
	sMsg = sMsg + Chr$(10)
	CheckMozProfile( oMozBootstrap, "Mozilla", com.sun.star.mozilla.MozillaProductType.Mozilla, sMsg, sDefault )
	sMsg = sMsg + Chr$(10)
	CheckMozProfile( oMozBootstrap, "Firefox", com.sun.star.mozilla.MozillaProductType.Firefox, sMsg, sDefault )
	sMsg = sMsg + Chr$(10)
	CheckMozProfile( oMozBootstrap, "Default", com.sun.star.mozilla.MozillaProductType.Default, sMsg, sDefault )
	sMsg = sMsg + Chr$(10)
	sMsg = sMsg + "The first detected path will be used for certificates:" + Chr$(10)
	if Len( sDefault ) > 0 Then
		sMsg = sMsg + sDefault
		sMsg = sMsg + "No profile found!"
	end if
	sMsg = sMsg + Chr$(10) + Chr$(10) + "You can overwrite the path with environment variable MOZILLA_CERTIFICATE_FOLDER" + Chr$(10) + " "
	MsgBox sMsg,64

End Sub

Sub CheckMozProfile( oMozBootstrap, TypeName, TypeID, sMsg, sDefault )
	Dim sProfile as String
	Dim sPath as String

	sMsg = sMsg + TypeName + ":" + Chr$(10) + "Profile name: "
	sProfile = 	oMozBootstrap.getDefaultProfile(TypeID)
	if Len( sProfile ) > 0 Then
		sMsg = sMsg + sProfile
		sPath = oMozBootstrap.getProfilePath(TypeID, sProfile )
		sMsg = sMsg + Chr$(10) + "Profile path: " + sPath + Chr$(10)
		if Len( sDefault ) = 0 Then
			sDefault = sPath
		end if
		sMsg = sMsg + "NOT FOUND" + Chr$(10)
End Sub

Launching this code gives all the information you need to modify the environment variable MOZILLA_CERTIFICATE_FOLDER :


If you want to choose FireFox launch

export MOZILLA_CERTIFICATE_FOLDER=~/.mozilla/firefox/u1f6p56r.default

before launching OOo or modify the soffice.sh file.

See also

Personal tools