public function loadKeys($configuredKeys, string $usage = null) : void
    {
        foreach ($configuredKeys as $keyData) {
            if (isset($keyData['X509Certificate'])) {
                $key = new X509($keyData);
            } else {
                $key = new Key($keyData);
            }

            if ($usage && !$key->canBeUsedFor($usage)) {
                continue;
            }

            $this->loadedKeys->add($key);
        }
    }
public function loadKeys($configuredKeys, string $usage = null) : void
    {
        foreach ($configuredKeys as $keyData) {
            if (isset($keyData['X509Certificate'])) {
                $key = new X509($keyData);
            } else {
                $key = new Key($keyData);
            }

            if ($usage && !$key->canBeUsedFor($usage)) {
                continue;
            }

            $this->loadedKeys->add($key);
        }
    }
public function loadKeys ( $ configuredKeys , string $ usage = null ) : void { foreach ( $ configuredKeys as $ keyData ) { if ( isset ( $ keyData [ 'X509Certificate' ] ) ) { $ key = new X509 ( $ keyData ) ; } else { $ key = new Key ( $ keyData ) ; } if ( $ usage && ! $ key -> canBeUsedFor ( $ usage ) ) { continue ; } $ this -> loadedKeys -> add ( $ key ) ; } }
Loads the keys given, optionally excluding keys when a usage is given and they
are not configured to be used with the usage given

@param array|\Traversable $configuredKeys
@param string|null $usage
@return void
Loads the keys given optionally excluding keys when a usage is given and they are not configured to be used with the usage given