/**************************************************************************** * Copyright (C) 2012 ecsec GmbH. * All rights reserved. * Contact: ecsec GmbH (info@ecsec.de) * * This file is part of the Open eCard App. * * GNU General Public License Usage * This file may be used under the terms of the GNU General Public * License version 3.0 as published by the Free Software Foundation * and appearing in the file LICENSE.GPL included in the packaging of * this file. Please review the following information to ensure the * GNU General Public License version 3.0 requirements will be met: * http://www.gnu.org/copyleft/gpl.html. * * Other Usage * Alternatively, this file may be used in accordance with the terms * and conditions contained in a signed written agreement between * you and ecsec GmbH. * ***************************************************************************/ package org.openecard.crypto.common.asn1.cvc; import org.openecard.common.util.StringUtils; import org.testng.annotations.Test; /** * @author Moritz Horsch <horsch at cdc.informatik.tu-darmstadt.de> */ public class CertificateDescriptionTest { @Test public void testGetInstance() throws Exception { // Object obj = StringUtils.toByteArray("308201DE060A04007F00070301030101A10E0C0C442D547275737420476D6248A2181316687474703A2F2F7777772E642D74727573742E6E6574A3160C14546573742D4469656E737465616E626965746572A4241322687474703A2F2F7777772E746573742D6469656E737465616E6269657465722E6465A58201400C82013CC3AFC2BBC2BF416E736368726966743A0D0A20202020546573742D4469656E737465616E6269657465720D0A20202020546573742D5374726173736520310D0A20202020313233343520546573742D4F72740D0A0D0A452D4D61696C2D416472657373653A0D0A20202020696E666F40746573742D6469656E737465616E6269657465722E64650D0A0D0A5A7765636B20646573204175736C657365766F7267616E67733A0D0A20202020456E747769636B6C756E6720756E64205465737420766F6E20536F6674776172650D0A0D0A5A757374C383C2A46E6469676520446174656E73636875747A626568C383C2B67264653A0D0A20202020546573742D446174656E73636875747A626568C383C2B67264650D0A20202020546573742D5374726173736520310D0A20202020313233343520546573742D4F7274A72431220420F34AABB7DCD516149AE9E81D7C686579246955DC83254B099F96CE3F6291D924");; Object obj = StringUtils.toByteArray("308202D5060A04007F00070301030101A10E0C0C442D547275737420476D6248A2181316687474703A2F2F7777772E642D74727573742E6E6574A3120C1053594E4348524F4E49545920476D6248A429132768747470733A2F2F7777772E73796E6368726F6E6974792E6E65742F64656D6F706F7274616C2FA58201F20C8201EE4E616D652C20416E7363687269667420756E6420452D4D61696C2D4164726573736520646573204469656E7374616E626965746572733A0D0A53594E4348524F4E49545920476D62480D0A57696E7A65726C616572205374722E20320D0A3037373435204A656E610D0A6E70614073796E6368726F6E6974792E64650D0A0D0A5A7765636B2064657220446174656EEFBFBD6265726D6974746C756E673A0D0A4964656E746966697A696572756E6720756E642052656769737472696572756E67207A756D2070657273EFBFBD6E6C696368656E204B756E64656E6B6F6E746F0D0A0D0A5A757374EFBFBD6E6469676520446174656E73636875747A626568EFBFBD7264653A0D0A5468EFBFBD72696E676572204C616E64657376657277616C74756E6773616D74205265666572617420486F6865697473616E67656C6567656E68656974656E2C20476566616872656E6162776568720D0A5765696D6172706C61747A20340D0A3939343233205765696D61720D0A54656C3A20283033203631292033372037332037322035380D0A4661783A20283033203631292033372037332037332034360D0A706F73747374656C6C6540746C7677612E7468756572696E67656E2E64650D0A416E737072656368706172746E65723A204672617520416E6B65204E65756D616E6E0D0AA7683166042012054BDCDD69F93AFDBC8666B908C386B009821730C96C3C066F8E6A20D0BE0D0420D97D56EB57F16D0510FD77DE1B964D186E69CED9E6E17FBEA7DBB0F5B3A814650420E9B2B7E1430EFDE9E99A25603AD32E2671EFB6B00D921439428DF982CE168D44"); CertificateDescription result = CertificateDescription.getInstance(obj); } }