@Override
    @SuppressWarnings("unchecked")
    protected <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> aClass)
            throws InvalidParameterSpecException {
        if ((aClass != null) && aClass == PSSParameterSpec.class) {
            return (T) spec;
        } else {
            throw new InvalidParameterSpecException("Unsupported class: " + aClass);
        }
    }
AlgorithmParameters implementation for PSS.  The only supported encoding format is ASN.1
(with X.509 accepted as an alias), as specified in RFC 4055 section 3.1.
common/src/main/java/org/conscrypt/PSSParameters.java