com.android.sdklib.internal.build
Class DebugKeyProvider

java.lang.Object
  extended by com.android.sdklib.internal.build.DebugKeyProvider

Deprecated. Use Android-Builder instead

@Deprecated
public class DebugKeyProvider
extends java.lang.Object

A provider of a dummy key to sign Android application for debugging purpose.

This provider uses a custom keystore to create and store a key with a known password.


Nested Class Summary
static interface DebugKeyProvider.IKeyGenOutput
          Deprecated.  
static class DebugKeyProvider.KeytoolException
          Deprecated.  
 
Constructor Summary
DebugKeyProvider(java.lang.String osKeyStorePath, java.lang.String storeType, DebugKeyProvider.IKeyGenOutput output)
          Deprecated. Creates a provider using a keystore at the given location.
 
Method Summary
 java.security.cert.Certificate getCertificate()
          Deprecated. Returns the debug Certificate to use to sign applications for debug purpose.
 java.security.PrivateKey getDebugKey()
          Deprecated. Returns the debug PrivateKey to use to sign applications for debug purpose.
static java.lang.String getDefaultKeyStoreOsPath()
          Deprecated. Returns the OS path to the default debug keystore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugKeyProvider

public DebugKeyProvider(java.lang.String osKeyStorePath,
                        java.lang.String storeType,
                        DebugKeyProvider.IKeyGenOutput output)
                 throws java.security.KeyStoreException,
                        java.security.NoSuchAlgorithmException,
                        java.security.cert.CertificateException,
                        java.security.UnrecoverableEntryException,
                        java.io.IOException,
                        DebugKeyProvider.KeytoolException,
                        com.android.prefs.AndroidLocation.AndroidLocationException
Deprecated. 
Creates a provider using a keystore at the given location.

The keystore, and a new random android debug key are created if they do not yet exist.

Password for the store/key is android, and the key alias is AndroidDebugKey.

Parameters:
osKeyStorePath - the OS path to the keystore, or null if the default one is to be used.
storeType - an optional keystore type, or null if the default is to be used.
output - an optional DebugKeyProvider.IKeyGenOutput object to get the stdout and stderr of the keytool process call.
Throws:
DebugKeyProvider.KeytoolException - If the creation of the debug key failed.
com.android.prefs.AndroidLocation.AndroidLocationException
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException
java.security.UnrecoverableEntryException
java.io.IOException
Method Detail

getDefaultKeyStoreOsPath

public static java.lang.String getDefaultKeyStoreOsPath()
                                                 throws DebugKeyProvider.KeytoolException,
                                                        com.android.prefs.AndroidLocation.AndroidLocationException
Deprecated. 
Returns the OS path to the default debug keystore.

Returns:
The OS path to the default debug keystore.
Throws:
DebugKeyProvider.KeytoolException
com.android.prefs.AndroidLocation.AndroidLocationException

getDebugKey

public java.security.PrivateKey getDebugKey()
                                     throws java.security.KeyStoreException,
                                            java.security.NoSuchAlgorithmException,
                                            java.security.UnrecoverableKeyException,
                                            java.security.UnrecoverableEntryException
Deprecated. 
Returns the debug PrivateKey to use to sign applications for debug purpose.

Returns:
the private key or null if its creation failed.
Throws:
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.UnrecoverableKeyException
java.security.UnrecoverableEntryException

getCertificate

public java.security.cert.Certificate getCertificate()
                                              throws java.security.KeyStoreException,
                                                     java.security.NoSuchAlgorithmException,
                                                     java.security.UnrecoverableKeyException,
                                                     java.security.UnrecoverableEntryException
Deprecated. 
Returns the debug Certificate to use to sign applications for debug purpose.

Returns:
the certificate or null if its creation failed.
Throws:
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.UnrecoverableKeyException
java.security.UnrecoverableEntryException