1/* 2 * Copyright (C) 2015 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package org.conscrypt.ct; 18 19import java.util.ArrayList; 20import java.util.Collections; 21import java.util.List; 22import org.conscrypt.Internal; 23 24/** 25 * @hide 26 */ 27@Internal 28public class CTVerificationResult { 29 private final ArrayList<VerifiedSCT> validSCTs = new ArrayList<>(); 30 private final ArrayList<VerifiedSCT> invalidSCTs = new ArrayList<>(); 31 32 public void add(VerifiedSCT result) { 33 if (result.status == VerifiedSCT.Status.VALID) { 34 validSCTs.add(result); 35 } else { 36 invalidSCTs.add(result); 37 } 38 } 39 40 public List<VerifiedSCT> getValidSCTs() { 41 return Collections.unmodifiableList(validSCTs); 42 } 43 44 public List<VerifiedSCT> getInvalidSCTs() { 45 return Collections.unmodifiableList(invalidSCTs); 46 } 47} 48 49