head	1.17;
access;
symbols
	TIGRIS_1_1_0RC2:1.12
	TIGRIS_1_1_0RC1:1.12
	TIGRIS_1_1:1.12.0.4
	TIGRIS_1_0_8:1.12
	TIGRIS_1_0_8RC3:1.12
	TIGRIS_1_0_8RC2:1.12
	TIGRIS_1_0_8RC1:1.12
	TIGRIS_1_0_7:1.12
	TIGRIS_1_0_7RC3:1.12
	TIGRIS_1_0_7RC2:1.12
	TIGRIS_1_0_7RC1:1.12
	TIGRIS_1_0_6:1.12
	TIGRIS_1_0_6RC5:1.12
	TIGRIS_1_0_6RC4:1.12
	TIGRIS_1_0_6RC3:1.12
	TIGRIS_1_0_6RC2:1.12
	TIGRIS_1_0_6RC1:1.12
	TIGRIS_1_0_5:1.12
	TIGRIS_1_0_5RC6:1.12
	TIGRIS_1_0_5RC5:1.12
	TIGRIS_1_0_5RC4:1.12
	TIGRIS_1_0_5RC3:1.12
	TIGRIS_1_0_5RC2:1.12
	TIGRIS_1_0_5RC1:1.12
	TIGRIS_1_0_4:1.12
	TIGRIS_1_0_3:1.12
	TIGRIS_1_0_2:1.12
	TIGRIS_1_0_1:1.12
	TIGRIS_1_0:1.12.0.6
	TIGRIS_1_0_0:1.12
	TIGRIS_1_0_0_RC1:1.12.0.2
	dlr:1.1.1
	TIGRIS_0_9_2_4:1.5
	TIGRIS_0_9_2_3:1.5
	HELM_PEER_PORT_BRANCH:1.1.1.1
	TURBINE_PEER:1.7
	TIGRIS_0_9_2_1:1.7
	TIGRIS_0_9_2:1.5.0.2
	TIGRIS_0_9_0:1.4.0.2;
locks; strict;
comment	@# @;


1.17
date	2001.08.11.09.08.08;	author dlr;	state Exp;
branches;
next	1.16;

1.16
date	2001.08.06.21.41.04;	author dlr;	state Exp;
branches;
next	1.15;

1.15
date	2001.05.23.01.50.21;	author dlr;	state Exp;
branches;
next	1.14;

1.14
date	2001.04.09.22.10.27;	author dlr;	state Exp;
branches;
next	1.13;

1.13
date	2001.04.09.18.53.21;	author dlr;	state Exp;
branches;
next	1.12;

1.12
date	2001.02.28.20.41.10;	author dlr;	state Exp;
branches;
next	1.11;

1.11
date	2001.02.28.20.40.18;	author dlr;	state Exp;
branches;
next	1.10;

1.10
date	2001.02.28.07.17.13;	author dlr;	state Exp;
branches;
next	1.9;

1.9
date	2001.02.28.07.14.43;	author dlr;	state Exp;
branches;
next	1.8;

1.8
date	2001.02.21.01.08.25;	author dlr;	state Exp;
branches;
next	1.7;

1.7
date	2001.01.26.18.29.09;	author edk;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2001.01.26.05.24.08;	author edk;	state dead;
branches;
next	1.5;

1.5
date	2000.12.22.03.53.58;	author dlr;	state Exp;
branches;
next	1.4;

1.4
date	2000.12.10.00.05.34;	author dlr;	state Exp;
branches;
next	1.3;

1.3
date	2000.12.06.22.21.49;	author dlr;	state Exp;
branches;
next	1.2;

1.2
date	2000.12.06.17.18.03;	author dlr;	state Exp;
branches;
next	1.1;

1.1
date	2000.12.04.23.46.59;	author dlr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2001.02.21.00.35.20;	author dlr;	state Exp;
branches;
next	;

1.7.2.1
date	2001.01.28.01.02.19;	author dlr;	state dead;
branches;
next	1.7.2.2;

1.7.2.2
date	2001.01.31.18.58.15;	author dlr;	state Exp;
branches;
next	1.7.2.3;

1.7.2.3
date	2001.02.08.20.44.28;	author dlr;	state Exp;
branches;
next	1.7.2.4;

1.7.2.4
date	2001.02.09.00.18.19;	author dlr;	state Exp;
branches;
next	1.7.2.5;

1.7.2.5
date	2001.02.15.20.50.44;	author leonardr;	state Exp;
branches;
next	;


desc
@@


1.17
log
@Upgrading to Turbine 3.0-dev, Fulcrum 1.0, and Torque 1.0.
@
text
@/* ================================================================
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 * 
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * 
 * 3. The end-user documentation included with the redistribution, if
 * any, must include the following acknowlegement: "This product includes
 * software developed by CollabNet (http://www.collab.net/)."
 * Alternately, this acknowlegement may appear in the software itself, if
 * and wherever such third-party acknowlegements normally appear.
 * 
 * 4. The hosted project names must not be used to endorse or promote
 * products derived from this software without prior written
 * permission. For written permission, please contact info@@collab.net.
 * 
 * 5. Products derived from this software may not use the "Tigris" name
 * nor may "Tigris" appear in their names without prior written
 * permission of CollabNet.
 * 
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL COLLAB.NET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ====================================================================
 * 
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CollabNet.
 */

package org.tigris.helm.tool;

import java.util.*;
import java.security.Security;
import javax.servlet.ServletConfig;

import cryptix.provider.Cryptix;

import org.apache.fulcrum.BaseService;
import org.apache.commons.util.exception.NestableException;

import org.apache.turbine.util.Log;

/**
 * Initializes the JCE crytographic providers used by Tigris.
 *
 * @@author <a href="mailto:dlr@@collab.net">Daniel Rall</a>
 * @@version $Id: CryptoProviderService.java,v 1.16 2001/08/06 21:41:04 dlr Exp $
 */
public class CryptoProviderService extends BaseService
{
    /**
     * The name of this service.  Used to retrive it from the broker.
     */
    public static final String SERVICE_NAME = "CryptoProviderService";

    /**
     * The name of the MD5 message digest algorithm.
     */
    public static final String MD5 = "MD5";

    /**
     * The Cryptix JCE provider name.
     */
    public static final String CRYPTIX_PROVIDER = "Cryptix";

    /**
     * Performs intialization of this service.  Called during Fulcrum
     * initialization.  Should be configured to be initialized early.
     *
     * @@param config The configuration we're operating under.
     */
    public void init()
    {
        if (!isInitialized())
        {
            try
            {
                Security.addProvider(new Cryptix());
                setInit(true);
            }
            catch (Exception e)
            {
                Log.error(SERVICE_NAME + ": Cryptography provider " +
                          "initialization failed", e);
            }
        }
    }
}
@


1.16
log
@Removed excess import.
@
text
@d55 3
a57 2
import org.apache.turbine.services.*;
import org.apache.turbine.services.resources.*;
a58 1
import org.apache.turbine.util.TurbineException;
d64 1
a64 1
 * @@version $Id: CryptoProviderService.java,v 1.15 2001/05/23 01:50:21 dlr Exp $
d66 1
a66 1
public class CryptoProviderService extends TurbineBaseService
d84 2
a85 1
     * Called during <code>Turbine.init()</code> (i.e. early initialization).
d89 1
a89 1
    public void init(ServletConfig config)
d91 1
a91 1
        if (!getInit())
@


1.15
log
@Ported Helm from WebMacro to Velocity.
@
text
@a58 1
import org.apache.turbine.util.TurbineException;
d64 1
a64 1
 * @@version $Id: CryptoProviderService.java,v 1.14 2001/04/09 22:10:27 dlr Exp $
@


1.14
log
@Added initialization predicate to init().
@
text
@d58 2
d65 1
a65 1
 * @@version $Id: CryptoProviderService.java,v 1.13 2001/04/09 18:53:21 dlr Exp $
@


1.13
log
@Removed unnecessary default constructor.  It's generated by the
compiler, thank you very much.
@
text
@d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.12 2001/02/28 20:41:10 dlr Exp $
d89 1
a89 1
        try
d91 10
a100 7
            Security.addProvider(new Cryptix());
            setInit(true);
        }
        catch (Exception e)
        {
            Log.error(SERVICE_NAME +
                      ": Cryptography provider initialization failed", e);
@


1.12
log
@Indicate which service is logging.
@
text
@d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.11 2001/02/28 20:40:18 dlr Exp $
a80 9

    /**
     * Default constructor.
     */
    public CryptoProviderService()
        throws Exception
    {
        super();
    }
@


1.11
log
@This bit of logging is handled nicely by Turbine.
@
text
@d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.10 2001/02/28 07:17:13 dlr Exp $
d105 2
a106 1
            Log.error("Cryptography provider initialization failed", e);
@


1.10
log
@Added service name.
@
text
@d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.9 2001/02/28 07:14:43 dlr Exp $
a99 1
            Log.info(SERVICE_NAME + " early init()");
@


1.9
log
@Added to JavaDoc of init(ServletConfig).
@
text
@d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.8 2001/02/21 01:08:25 dlr Exp $
d68 5
d100 1
a100 1
            Log.info("CryptoProviderService early init()");
@


1.8
log
@This is the highest revision from the HELM_PEER_PORT_BRANCH.  The previous import caused too many conflicts to resolve manually
@
text
@d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.7.2.5 2001/02/15 20:50:44 leonardr Exp $
d87 1
a87 1
     * Called during <code>Turbine.init()</code>.
@


1.7
log
@readding all the files as part of the process of returning to the way
things were as of tuesday
@
text
@d2 1
a2 1
 * Copyright (c) 2000 CollabNet.  All rights reserved.
a54 2
import org.webmacro.util.Log;

d57 1
a57 1
//import org.apache.turbine.util.Log;
d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.5 2000/12/22 03:53:58 dlr Exp $
a77 5
     * The log file.
     */
    private static Log log = new Log("crypto", "CryptoProviderService");

    /**
d80 1
a80 1
    public CryptoProviderService ()
d91 1
a91 1
    public void init (ServletConfig config)
d95 1
a95 2
            //Log.note("CryptoProviderService early init()");
            log.info("CryptoProviderService early init()");
d101 1
a101 5
            //Log.error("Cannot initialize CryptoProviderService");
            //Log.error(e);
            log.error("Cryptography provider addition failed: " +
                      e.getMessage());
            log.exception(e);
@


1.7.2.1
log
@Porting to the Turbine Peer system.  -dlr and leonardr
@
text
@d65 1
a65 1
 * @@version $Id: CryptoProviderService.java,v 1.7 2001/01/26 18:29:09 edk Exp $
@


1.7.2.2
log
@Ported CryptoProviderService.
@
text
@d55 2
d59 1
a59 1
import org.apache.turbine.util.Log;
d65 1
a65 1
 * @@version $Id: CryptoProviderService.java,v 1.5 2000/12/22 03:53:58 dlr Exp $
d80 5
d102 2
a103 1
            Log.note("CryptoProviderService early init()");
d109 5
a113 1
            Log.error("Cryptography provider initialization failed", e);
@


1.7.2.3
log
@Log.note() has been deprecated in favor of info() and debug().
@
text
@d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.7.2.2 2001/01/31 18:58:15 dlr Exp $
d95 1
a95 1
            Log.info("CryptoProviderService early init()");
@


1.7.2.4
log
@Whitespace change.
@
text
@d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.7.2.3 2001/02/08 20:44:28 dlr Exp $
d80 1
a80 1
    public CryptoProviderService()
d91 1
a91 1
    public void init(ServletConfig config)
@


1.7.2.5
log
@Normalized copyright dates.
@
text
@d2 1
a2 1
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
d63 1
a63 1
 * @@version $Id: CryptoProviderService.java,v 1.7.2.4 2001/02/09 00:18:19 dlr Exp $
@


1.6
log
@revert this stuff to its state as of 2001/01/24 12:42:00 GMT -- with
the following exceptions, which have some different modifications so
they'll work with changes which have happened in joist:

ProjectNewsEdit.java
SkinManager.java
SkinStyleElementValueManager.java
StyleElementManager.java
StyleManager.java

it compiles.  i dunno if it works, though.
@
text
@@


1.5
log
@Reduced the scope of the import to nab only what is needed.
@
text
@d65 1
a65 1
 * @@version $Id: CryptoProviderService.java,v 1.4 2000/12/10 00:05:34 dlr Exp $
@


1.4
log
@TODO item implemented.
@
text
@d51 1
a51 1
import javax.servlet.*;
d65 1
a65 1
 * @@version $Id: CryptoProviderService.java,v 1.3 2000/12/06 22:21:49 dlr Exp $
@


1.3
log
@Added JavaDoc.
@
text
@a62 1
 * TODO: Initialize all desired Turbine services.
d65 1
a65 1
 * @@version $Id: CryptoProviderService.java,v 1.2 2000/12/06 17:18:03 dlr Exp $
d115 1
a115 1
    } 
@


1.2
log
@Make use of WM logging facility (for now).
@
text
@d66 1
a66 1
 * @@version $Id: CryptoProviderService.java,v 1.1 2000/12/04 23:46:59 dlr Exp $
d80 3
@


1.1
log
@Initializes the JCE crytographic providers used by Tigris.  (Or, it
will once all Turbine services are init'd by Tigris.)
@
text
@d55 2
d59 1
a59 1
import org.apache.turbine.util.*;
d66 1
a66 1
 * @@version $Id: $
d80 2
d100 2
a101 1
            Log.note("CryptoProviderService early init()");
d107 5
a111 2
            Log.error("Cannot initialize CryptoProviderService");
            Log.error(e);
@


1.1.1.1
log
@Replacing the HEAD with the HELM_PEER_PORT_BRANCH.
@
text
@d2 1
a2 1
 * Copyright (c) 2000-2001 CollabNet.  All rights reserved.
d51 1
a51 1
import javax.servlet.ServletConfig;
d57 1
a57 1
import org.apache.turbine.util.Log;
d61 1
d64 1
a64 1
 * @@version $Id: CryptoProviderService.java,v 1.7.2.5 2001/02/15 20:50:44 leonardr Exp $
d81 1
a81 1
    public CryptoProviderService()
d92 1
a92 1
    public void init(ServletConfig config)
d96 1
a96 1
            Log.info("CryptoProviderService early init()");
d102 2
a103 1
            Log.error("Cryptography provider initialization failed", e);
d105 1
a105 1
    }
@


