Package uk.ac.starlink.auth.ssl

# Class BasicX509KeyManager

java.lang.Object
uk.ac.starlink.auth.ssl.BasicX509KeyManager

All Implemented Interfaces:
  `KeyManager`, `X509KeyManager`

public class BasicX509KeyManager extends Object implements X509KeyManager

## Constructor Summary

Constructors
Constructor
Description
`BasicX509KeyManager(X509KeyManager km, String alias)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`chooseClientAlias(String[] strings, Principal[] prncpls, Socket socket)`
`String`
`chooseServerAlias(String string, Principal[] prncpls, Socket socket)`
`X509Certificate[]`
`getCertificateChain(String alias)`
`String[]`
`getClientAliases(String keyType, Principal[] prncpls)`
`PrivateKey`
`getPrivateKey(String alias)`
`String[]`
`getServerAliases(String keyType, Principal[] prncpls)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### BasicX509KeyManager

public BasicX509KeyManager(X509KeyManager km, String alias)
Constructor.

Parameters:
  `km` - underlying KeyManager this class delegates to
  `alias` - the alias of the X509 certificate we always use

## Method Details

### chooseClientAlias

public String chooseClientAlias(String[] strings, Principal[] prncpls, Socket socket)

Specified by:
  `chooseClientAlias` in interface `X509KeyManager`

### chooseServerAlias

public String chooseServerAlias(String string, Principal[] prncpls, Socket socket)

Specified by:
  `chooseServerAlias` in interface `X509KeyManager`

### getCertificateChain

public X509Certificate[] getCertificateChain(String alias)

Specified by:
  `getCertificateChain` in interface `X509KeyManager`

### getClientAliases

public String[] getClientAliases(String keyType, Principal[] prncpls)

Specified by:
  `getClientAliases` in interface `X509KeyManager`

### getPrivateKey

public PrivateKey getPrivateKey(String alias)

Specified by:
  `getPrivateKey` in interface `X509KeyManager`

### getServerAliases

public String[] getServerAliases(String keyType, Principal[] prncpls)

Specified by:
  `getServerAliases` in interface `X509KeyManager`