# KeystoreList()

Lists all aliases in a Java keystore.

**Requires Extension:** [Crypto Extension](https://download.lucee.org/#17AB52DE-B300-A94B-E058FC978BE4542D)

```
KeystoreList( keystore=string, keystorePassword=string, keystoreType=string );
```

**Returns:** array

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| keystore | string | Yes | Path to keystore file |  |
| keystorePassword | string | Yes | Password for the keystore |  |
| keystoreType | string | No | Keystore type (JKS, PKCS12). Auto-detected if omitted. |  |

# Examples

```cfml
// List all key aliases in a PKCS#12 keystore
// Auto-detects the keystore type from the .p12 file extension
aliases = KeystoreList( "/path/to/keystore.p12", "keystorePassword" );
// e.g. [ "mykey", "secondkey" ]

// Use this to check what's in a keystore before extracting keys
for ( alias in aliases ) {
	result = GetKeyPairFromKeystore(
		"/path/to/keystore.p12",
		"keystorePassword",
		"keystorePassword",
		alias
	);
	// process each key pair...
}
```







# Categories

[Cryptography](../../categories/crypto.md)

# See Also

[GenerateKeystore()](generatekeystore.md), [GetKeyPairFromKeystore()](getkeypairfromkeystore.md)