Search in sources :

Example 1 with SCMGetCrlsResponseProto

use of org.apache.hadoop.hdds.protocol.proto.SCMSecurityProtocolProtos.SCMGetCrlsResponseProto in project ozone by apache.

the class SCMSecurityProtocolServerSideTranslatorPB method getCrls.

public SCMGetCrlsResponseProto getCrls(SCMGetCrlsRequestProto request) throws IOException {
    List<CRLInfo> crls = impl.getCrls(request.getCrlIdList());
    SCMGetCrlsResponseProto.Builder builder = SCMGetCrlsResponseProto.newBuilder();
    for (CRLInfo crl : crls) {
        try {
            builder.addCrlInfos(crl.getProtobuf());
        } catch (SCMSecurityException e) {
            LOG.error("Fail in parsing CRL info", e);
            throw new SCMSecurityException("Fail in parsing CRL info", e);
        }
    }
    return builder.build();
}
Also used : SCMSecurityException(org.apache.hadoop.hdds.security.exception.SCMSecurityException) CRLInfo(org.apache.hadoop.hdds.security.x509.crl.CRLInfo) SCMGetCrlsResponseProto(org.apache.hadoop.hdds.protocol.proto.SCMSecurityProtocolProtos.SCMGetCrlsResponseProto)

Aggregations

SCMGetCrlsResponseProto (org.apache.hadoop.hdds.protocol.proto.SCMSecurityProtocolProtos.SCMGetCrlsResponseProto)1 SCMSecurityException (org.apache.hadoop.hdds.security.exception.SCMSecurityException)1 CRLInfo (org.apache.hadoop.hdds.security.x509.crl.CRLInfo)1