Search in sources :

Example 1 with TspInformationProvider

use of de.gematik.pki.tsl.TspInformationProvider in project ref-GemLibPki by gematik.

the class TucPki018Verifier method performTucPki18Checks.

/**
 * Verify given end-entity certificate against TucPki18 (Technical Use Case 18 "Zertifikatsprüfung in der TI", specified by gematik). If there is no {@link
 * GemPkiException} the verification process ends successfully.
 *
 * @param x509EeCert end-entity certificate to check
 * @return the determined {@link Admission}
 * @throws GemPkiException if the certificate is invalid
 */
public Admission performTucPki18Checks(@NonNull final X509Certificate x509EeCert) throws GemPkiException {
    log.debug("TucPki018Checks including OCSP");
    final TspServiceSubset tspServiceSubset = new TspInformationProvider(tspServiceList, productType).getTspServiceSubset(x509EeCert);
    if (withOcspCheck) {
        doOcsp(x509EeCert, tspServiceSubset);
    } else {
        throw new GemPkiException(productType, ErrorCode.SE_1039);
    }
    commonChecks(x509EeCert, tspServiceSubset);
    return tucPki018ProfileChecks(x509EeCert, tspServiceSubset);
}
Also used : TspInformationProvider(de.gematik.pki.tsl.TspInformationProvider) GemPkiException(de.gematik.pki.exception.GemPkiException) TspServiceSubset(de.gematik.pki.tsl.TspServiceSubset)

Aggregations

GemPkiException (de.gematik.pki.exception.GemPkiException)1 TspInformationProvider (de.gematik.pki.tsl.TspInformationProvider)1 TspServiceSubset (de.gematik.pki.tsl.TspServiceSubset)1