Java Code Examples for sun.security.util.DerValue#getDataBytes()
The following examples show how to use
sun.security.util.DerValue#getDataBytes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ResponderId.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Constructs a {@code ResponderId} object from its DER-encoding. * * @param encodedData the DER-encoded bytes * * @throws IOException if the encodedData is not properly DER encoded */ public ResponderId(byte[] encodedData) throws IOException { DerValue outer = new DerValue(encodedData); if (outer.isContextSpecific((byte)Type.BY_NAME.value()) && outer.isConstructed()) { // Use the X500Principal constructor as a way to sanity // check the incoming data. responderName = new X500Principal(outer.getDataBytes()); encodedRid = principalToBytes(); type = Type.BY_NAME; } else if (outer.isContextSpecific((byte)Type.BY_KEY.value()) && outer.isConstructed()) { // Use the KeyIdentifier constructor as a way to sanity // check the incoming data. responderKeyId = new KeyIdentifier(new DerValue(outer.getDataBytes())); encodedRid = keyIdToBytes(); type = Type.BY_KEY; } else { throw new IOException("Invalid ResponderId content"); } }
Example 2
Source File: ResponderId.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Constructs a {@code ResponderId} object from its DER-encoding. * * @param encodedData the DER-encoded bytes * * @throws IOException if the encodedData is not properly DER encoded */ public ResponderId(byte[] encodedData) throws IOException { DerValue outer = new DerValue(encodedData); if (outer.isContextSpecific((byte)Type.BY_NAME.value()) && outer.isConstructed()) { // Use the X500Principal constructor as a way to sanity // check the incoming data. responderName = new X500Principal(outer.getDataBytes()); encodedRid = principalToBytes(); type = Type.BY_NAME; } else if (outer.isContextSpecific((byte)Type.BY_KEY.value()) && outer.isConstructed()) { // Use the KeyIdentifier constructor as a way to sanity // check the incoming data. responderKeyId = new KeyIdentifier(new DerValue(outer.getDataBytes())); encodedRid = keyIdToBytes(); type = Type.BY_KEY; } else { throw new IOException("Invalid ResponderId content"); } }
Example 3
Source File: ResponderId.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a {@code ResponderId} object from its DER-encoding. * * @param encodedData the DER-encoded bytes * * @throws IOException if the encodedData is not properly DER encoded */ public ResponderId(byte[] encodedData) throws IOException { DerValue outer = new DerValue(encodedData); if (outer.isContextSpecific((byte)Type.BY_NAME.value()) && outer.isConstructed()) { // Use the X500Principal constructor as a way to sanity // check the incoming data. responderName = new X500Principal(outer.getDataBytes()); encodedRid = principalToBytes(); type = Type.BY_NAME; } else if (outer.isContextSpecific((byte)Type.BY_KEY.value()) && outer.isConstructed()) { // Use the KeyIdentifier constructor as a way to sanity // check the incoming data. responderKeyId = new KeyIdentifier(new DerValue(outer.getDataBytes())); encodedRid = keyIdToBytes(); type = Type.BY_KEY; } else { throw new IOException("Invalid ResponderId content"); } }
Example 4
Source File: ResponderId.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Constructs a {@code ResponderId} object from its DER-encoding. * * @param encodedData the DER-encoded bytes * * @throws IOException if the encodedData is not properly DER encoded */ public ResponderId(byte[] encodedData) throws IOException { DerValue outer = new DerValue(encodedData); if (outer.isContextSpecific((byte)Type.BY_NAME.value()) && outer.isConstructed()) { // Use the X500Principal constructor as a way to sanity // check the incoming data. responderName = new X500Principal(outer.getDataBytes()); encodedRid = principalToBytes(); type = Type.BY_NAME; } else if (outer.isContextSpecific((byte)Type.BY_KEY.value()) && outer.isConstructed()) { // Use the KeyIdentifier constructor as a way to sanity // check the incoming data. responderKeyId = new KeyIdentifier(new DerValue(outer.getDataBytes())); encodedRid = keyIdToBytes(); type = Type.BY_KEY; } else { throw new IOException("Invalid ResponderId content"); } }
Example 5
Source File: ResponderId.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Constructs a {@code ResponderId} object from its DER-encoding. * * @param encodedData the DER-encoded bytes * * @throws IOException if the encodedData is not properly DER encoded */ public ResponderId(byte[] encodedData) throws IOException { DerValue outer = new DerValue(encodedData); if (outer.isContextSpecific((byte)Type.BY_NAME.value()) && outer.isConstructed()) { // Use the X500Principal constructor as a way to sanity // check the incoming data. responderName = new X500Principal(outer.getDataBytes()); encodedRid = principalToBytes(); type = Type.BY_NAME; } else if (outer.isContextSpecific((byte)Type.BY_KEY.value()) && outer.isConstructed()) { // Use the KeyIdentifier constructor as a way to sanity // check the incoming data. responderKeyId = new KeyIdentifier(new DerValue(outer.getDataBytes())); encodedRid = keyIdToBytes(); type = Type.BY_KEY; } else { throw new IOException("Invalid ResponderId content"); } }
Example 6
Source File: ResponderId.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Constructs a {@code ResponderId} object from its DER-encoding. * * @param encodedData the DER-encoded bytes * * @throws IOException if the encodedData is not properly DER encoded */ public ResponderId(byte[] encodedData) throws IOException { DerValue outer = new DerValue(encodedData); if (outer.isContextSpecific((byte)Type.BY_NAME.value()) && outer.isConstructed()) { // Use the X500Principal constructor as a way to sanity // check the incoming data. responderName = new X500Principal(outer.getDataBytes()); encodedRid = principalToBytes(); type = Type.BY_NAME; } else if (outer.isContextSpecific((byte)Type.BY_KEY.value()) && outer.isConstructed()) { // Use the KeyIdentifier constructor as a way to sanity // check the incoming data. responderKeyId = new KeyIdentifier(new DerValue(outer.getDataBytes())); encodedRid = keyIdToBytes(); type = Type.BY_KEY; } else { throw new IOException("Invalid ResponderId content"); } }
Example 7
Source File: ResponderId.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a {@code ResponderId} object from its DER-encoding. * * @param encodedData the DER-encoded bytes * * @throws IOException if the encodedData is not properly DER encoded */ public ResponderId(byte[] encodedData) throws IOException { DerValue outer = new DerValue(encodedData); if (outer.isContextSpecific((byte)Type.BY_NAME.value()) && outer.isConstructed()) { // Use the X500Principal constructor as a way to sanity // check the incoming data. responderName = new X500Principal(outer.getDataBytes()); encodedRid = principalToBytes(); type = Type.BY_NAME; } else if (outer.isContextSpecific((byte)Type.BY_KEY.value()) && outer.isConstructed()) { // Use the KeyIdentifier constructor as a way to sanity // check the incoming data. responderKeyId = new KeyIdentifier(new DerValue(outer.getDataBytes())); encodedRid = keyIdToBytes(); type = Type.BY_KEY; } else { throw new IOException("Invalid ResponderId content"); } }
Example 8
Source File: KerberosString.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 9
Source File: KerberosString.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 10
Source File: KerberosString.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 11
Source File: KerberosString.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 12
Source File: KerberosString.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 13
Source File: KerberosString.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 14
Source File: KerberosString.java From hottub with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 15
Source File: KerberosString.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 16
Source File: KerberosString.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 17
Source File: KerberosString.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 18
Source File: KerberosString.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 19
Source File: KerberosString.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }
Example 20
Source File: KerberosString.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public KerberosString(DerValue der) throws IOException { if (der.tag != DerValue.tag_GeneralString) { throw new IOException( "KerberosString's tag is incorrect: " + der.tag); } s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII"); }