153131982d6290e3a865f400174778deaac452ff3Daniel Dunbar/* 253131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * Licensed to the Apache Software Foundation (ASF) under one or more 353131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * contributor license agreements. See the NOTICE file distributed with 453131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * this work for additional information regarding copyright ownership. 553131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * The ASF licenses this file to You under the Apache License, Version 2.0 653131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * (the "License"); you may not use this file except in compliance with 753131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * the License. You may obtain a copy of the License at 853131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * 953131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * http://www.apache.org/licenses/LICENSE-2.0 1053131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * 1153131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * Unless required by applicable law or agreed to in writing, software 1253131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * distributed under the License is distributed on an "AS IS" BASIS, 1353131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 141edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar * See the License for the specific language governing permissions and 1553131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * limitations under the License. 1653131982d6290e3a865f400174778deaac452ff3Daniel Dunbar */ 1753131982d6290e3a865f400174778deaac452ff3Daniel Dunbar 18f21e4e9326aa3ebc78bc2770722fb5150fe7ede9Daniel Dunbar/** 1953131982d6290e3a865f400174778deaac452ff3Daniel Dunbar * @author Alexander V. Astapchuk 2053131982d6290e3a865f400174778deaac452ff3Daniel Dunbar */ 2153131982d6290e3a865f400174778deaac452ff3Daniel Dunbar 2253131982d6290e3a865f400174778deaac452ff3Daniel Dunbarpackage org.apache.harmony.security.tests.java.security.serialization; 2353131982d6290e3a865f400174778deaac452ff3Daniel Dunbar 2453131982d6290e3a865f400174778deaac452ff3Daniel Dunbarimport java.security.CodeSigner; 2553131982d6290e3a865f400174778deaac452ff3Daniel Dunbarimport java.security.Timestamp; 2653131982d6290e3a865f400174778deaac452ff3Daniel Dunbarimport java.security.cert.CertPath; 2753131982d6290e3a865f400174778deaac452ff3Daniel Dunbarimport java.util.Date; 2853131982d6290e3a865f400174778deaac452ff3Daniel Dunbar 2953131982d6290e3a865f400174778deaac452ff3Daniel Dunbarimport org.apache.harmony.testframework.serialization.SerializationTest; 3053131982d6290e3a865f400174778deaac452ff3Daniel Dunbarimport org.apache.harmony.security.tests.support.TestCertUtils; 3153131982d6290e3a865f400174778deaac452ff3Daniel Dunbar 321edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar 331edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar/** 341edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar * Serialization tests for <code>CodeSigner</code> 351edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar */ 361edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar 371edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbarpublic class CodeSignerTest extends SerializationTest { 381edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar 391edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar /** 401edf6ca2cbb4b01db44683d5e9479a240cfcf497Daniel Dunbar * @see com.intel.drl.test.SerializationTest#getData() 4193c65e6e661eda75711363bdd5ca15909920e1f0Joerg Sonnenberger */ 4293c65e6e661eda75711363bdd5ca15909920e1f0Joerg Sonnenberger protected Object[] getData() { 4353131982d6290e3a865f400174778deaac452ff3Daniel Dunbar CertPath cpath = TestCertUtils.getCertPath(); 4453131982d6290e3a865f400174778deaac452ff3Daniel Dunbar Timestamp ts = new Timestamp(new Date(1146633204309L), cpath); 4553131982d6290e3a865f400174778deaac452ff3Daniel Dunbar return new Object[] { new CodeSigner(cpath, ts), 4653131982d6290e3a865f400174778deaac452ff3Daniel Dunbar new CodeSigner(cpath, null) }; 4753131982d6290e3a865f400174778deaac452ff3Daniel Dunbar } 4853131982d6290e3a865f400174778deaac452ff3Daniel Dunbar} 4953131982d6290e3a865f400174778deaac452ff3Daniel Dunbar