tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Celik, Servet (ext MA)" <extern.servet.ce...@zivit.de>
Subject AW: AW: Using S/MIME encryption in Tomcat5.5 fails
Date Thu, 16 Oct 2008 15:07:35 GMT
Hi Martin, hi all,

Just to clarify again: 
When I run the mailer component as a standalone java application it works
fine. That's why I think the crypto package is alright.
Also I put a echo line into catalina.bat to dump the used endorsed-path. The
stdout says:
"Using JAVA_ENDORSED_DIRS
C:\Programme\apache-tomcat-5.5.25\common\endorsed", which is correct.

I assume, that there is something special about tomcat that I don't know.
Thus I still hope to find some hints here. It's also curious, that during
debugging the pointer never goes into the catch-block für
NoSuchProviderException, but to the Exception catch-block. But looking at
the exception makes sure, that it is of type NoSuchProviderException - WTF?
:)

Can it be, that there are dependencies between used jars, which cause that
curious behaviour. I'm totally clueless.

Cheers,
  Servet





> -----Ursprüngliche Nachricht-----
> Von: Martin Gainty [mailto:mgainty@hotmail.com] 
> Gesendet: Mittwoch, 15. Oktober 2008 16:50
> An: Tomcat Users List
> Betreff: RE: AW: Using S/MIME encryption in Tomcat5.5 fails
> 
> 
> 
> make sure TC knows where the endorsed folder is located e.g. 
> -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed
> 
> when you're using a new package the best way to achieve an 
> demonstrable functionality is to follow the provided sample 
> http://javamail-crypto.sourceforge.net
> This package is beta status so if it works great..if it 
> doesnt contact the projects comitters..
> 
> Martin 
> ______________________________________________ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to the 
> official business of Sender. This transmission is of a 
> confidential nature and Sender does not endorse distribution 
> to any party other than intended recipient. Sender does not 
> necessarily endorse content contained within this transmission. 
> 
> 
> > From: extern.servet.celik@zivit.de
> > To: users@tomcat.apache.org
> > Subject: AW: Using S/MIME encryption in Tomcat5.5 fails
> > Date: Wed, 15 Oct 2008 16:04:43 +0200
> > 
> > Hi, all!
> > 
> > What I did now:
> > I put the jars listed below into the endorsed directory.
> > Than I got rid of the NoSuchProviderException and run into a 
> > NullPointerException now. I set Debug-mode on and get the following 
> > cosole output (only first two rows):
> > 
> > ######
> > DEBUG: setDebug: JavaMail version 1.3.1
> > error loading provider info:  java.lang.NullPointerException 
> > java.lang.NullPointerException
> >         at 
> > 
> net.suberic.crypto.EncryptionManager.loadProviders(EncryptionManager.
> > java:48)
> >         at
> > 
> net.suberic.crypto.EncryptionManager.<clinit>(EncryptionManager.java:
> > 37)
> > ....
> > ....
> > ######
> > 
> > As I told before ... Any help would be apreciated.
> > 
> > Thanks and bye,
> >   servet
> > 
> > 
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: Martin Gainty [mailto:mgainty@hotmail.com]
> > > Gesendet: Montag, 13. Oktober 2008 18:56
> > > An: Tomcat Users List
> > > Betreff: RE: Using S/MIME encryption in Tomcat5.5 fails
> > > 
> > > 
> > > 
> > > I dont believe the default BC jars have S/MIME capability
> > > I would download bcmail<JDK>.jar and place in your /lib
> > > folder from http://www.bouncycastle.org/latest_releases.html
> > > 
> > > let me know if this helps..
> > > Martin
> > > ______________________________________________ 
> > > Disclaimer and confidentiality note 
> > > Everything in this e-mail and any attachments relates to the 
> > > official business of Sender. This transmission is of a 
> > > confidential nature and Sender does not endorse distribution 
> > > to any party other than intended recipient. Sender does not 
> > > necessarily endorse content contained within this transmission. 
> > > 
> > > 
> > > > From: extern.servet.celik@zivit.de
> > > > To: users@tomcat.apache.org
> > > > Subject: Using S/MIME encryption in Tomcat5.5 fails
> > > > Date: Mon, 13 Oct 2008 18:13:46 +0200
> > > > 
> > > > Hi *,
> > > > 
> > > > I try to encrypt outgoing mails from my webapplication with 
> > > > S/MIME.
> > > > 
> > > > Therefore I make use of the BouncyCastleProvider and created an
> > > > example according to http://javamail-crypto.sourceforge.net/. 
> > > > Afterwards I introduced Bouncycaste as securityprovider by 
> > > adding the
> > > > line
> > > > 
> > > 
> "security.provider.7=org.bouncycastle.jce.provider.BouncyCastleProvi
> > > de
> > > > r" to the file JAVA_HOME/jre/lib/security/java.security.
> > > > 
> > > > When I start the class as a standalone JavaApplication 
> everything
> > > > works fine, but putting it into my webapplication and 
> calling it 
> > > > raises a NoSuchProviderException
> > > > (DEBUG: setDebug: JavaMail version 1.3.1
> > > > java.security.NoSuchProviderException: No provider 
> configured for 
> > > > S/MIME at 
> > > > net.suberic.crypto.EncryptionManager.getEncryptionUtils(Unknown 
> > > > Source)).
> > > > 
> > > > Here is a list of libraries, that I include in the 
> lib-directory 
> > > > of
> > > > the created WAR-file:
> > > >  - activation.jar
> > > >  - bcmail-jdk15-141.jar
> > > >  - bcprov-ext-jdk15-141.jar
> > > >  - bcprov-jdk15-141.jar
> > > >  - cryptomail.jar
> > > >  - javamail-crypto_060622.jar
> > > >  - javamail-crypto-bouncycastle-smime_060622.jar
> > > >  - mail.jar
> > > >  - mailapi.jar
> > > >  - smtp.jar
> > > > 
> > > > I also tried to put them into commons/lib but the exception
> > > is still
> > > > thrown. I use Java1.5_14 and Tomcat5.5.
> > > > 
> > > > Thanks in advance for your effort. Any help will be apreciated.
> > > > 
> > > > Cheers,
> > > >   Servet
> > > > 
> > > >  
> > > > 
> > > > 
> > > 
> --------------------------------------------------------------------
> > > -
> > > > To start a new topic, e-mail: users@tomcat.apache.org
> > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail: users-help@tomcat.apache.org
> > > > 
> > > 
> > > _________________________________________________________________
> > > See how Windows connects the people, information, and fun
> > > that are part of your life. 
> > > http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/
> > > 
> > 
> > 
> ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> > 
> 
> _________________________________________________________________
> See how Windows Mobile brings your life together-at home, 
> work, or on the go. 
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message