Home Contents | # pki:matchWithPublicKey() | Cipher/PKI | Core4 Lua Commands

## SYNOPSIS

1. success = pki:matchWithPublicKey(pki_pub)
2. success = pki:matchWithPrivateKey(pki_priv)

## DESCRIPTION

Verifies that separately loaded public and private keys match.

The first form must have a private key loaded into the calling object and verifies for a match with a passed public key.

The second form must have a public key loaded into the calling object and verifies for a match with a passed private key.

## RETURN VALUE

On success, returns true.

In case of an error returns three values: nil, a string describing the error and a negative error code from the underlying mbed TLS implementation.