Java Code Examples for sun.security.util.DerInputStream#getBigInteger()
The following examples show how to use
sun.security.util.DerInputStream#getBigInteger() .
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: DSAPublicKey.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(getKey().toByteArray()); y = in.getBigInteger(); } catch (IOException e) { throw new InvalidKeyException("Invalid key: y value\n" + e.getMessage()); } }
Example 2
Source File: DSAPrivateKey.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 3
Source File: DSAPrivateKey.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 4
Source File: DSAPrivateKey.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 5
Source File: DSAPublicKey.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(getKey().toByteArray()); y = in.getBigInteger(); } catch (IOException e) { throw new InvalidKeyException("Invalid key: y value\n" + e.getMessage()); } }
Example 6
Source File: DSAPrivateKey.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 7
Source File: DSAPrivateKey.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 8
Source File: DSAPublicKey.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(getKey().toByteArray()); y = in.getBigInteger(); } catch (IOException e) { throw new InvalidKeyException("Invalid key: y value\n" + e.getMessage()); } }
Example 9
Source File: DSAPrivateKey.java From hottub with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 10
Source File: DSAPrivateKey.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 11
Source File: DSAPrivateKey.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 12
Source File: DSAPublicKey.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(getKey().toByteArray()); y = in.getBigInteger(); } catch (IOException e) { throw new InvalidKeyException("Invalid key: y value\n" + e.getMessage()); } }
Example 13
Source File: DSAPrivateKey.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 14
Source File: DSAPrivateKey.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); x = in.getBigInteger(); } catch (IOException e) { InvalidKeyException ike = new InvalidKeyException(e.getMessage()); ike.initCause(e); throw ike; } }
Example 15
Source File: DSAPublicKey.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(getKey().toByteArray()); y = in.getBigInteger(); } catch (IOException e) { throw new InvalidKeyException("Invalid key: y value\n" + e.getMessage()); } }
Example 16
Source File: DSAPublicKey.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(getKey().toByteArray()); y = in.getBigInteger(); } catch (IOException e) { throw new InvalidKeyException("Invalid key: y value\n" + e.getMessage()); } }
Example 17
Source File: DSAPublicKey.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(getKey().toByteArray()); y = in.getBigInteger(); } catch (IOException e) { throw new InvalidKeyException("Invalid key: y value\n" + e.getMessage()); } }
Example 18
Source File: SignerInfo.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Parses a PKCS#7 signer info. * * <p>This constructor is used only for backwards compatibility with * PKCS#7 blocks that were generated using JDK1.1.x. * * @param derin the ASN.1 encoding of the signer info. * @param oldStyle flag indicating whether or not the given signer info * is encoded according to JDK1.1.x. */ public SignerInfo(DerInputStream derin, boolean oldStyle) throws IOException, ParsingException { // version version = derin.getBigInteger(); // issuerAndSerialNumber DerValue[] issuerAndSerialNumber = derin.getSequence(2); byte[] issuerBytes = issuerAndSerialNumber[0].toByteArray(); issuerName = new X500Name(new DerValue(DerValue.tag_Sequence, issuerBytes)); certificateSerialNumber = issuerAndSerialNumber[1].getBigInteger(); // digestAlgorithmId DerValue tmp = derin.getDerValue(); digestAlgorithmId = AlgorithmId.parse(tmp); // authenticatedAttributes if (oldStyle) { // In JDK1.1.x, the authenticatedAttributes are always present, // encoded as an empty Set (Set of length zero) derin.getSet(0); } else { // check if set of auth attributes (implicit tag) is provided // (auth attributes are OPTIONAL) if ((byte)(derin.peekByte()) == (byte)0xA0) { authenticatedAttributes = new PKCS9Attributes(derin); } } // digestEncryptionAlgorithmId - little RSA naming scheme - // signature == encryption... tmp = derin.getDerValue(); digestEncryptionAlgorithmId = AlgorithmId.parse(tmp); // encryptedDigest encryptedDigest = derin.getOctetString(); // unauthenticatedAttributes if (oldStyle) { // In JDK1.1.x, the unauthenticatedAttributes are always present, // encoded as an empty Set (Set of length zero) derin.getSet(0); } else { // check if set of unauth attributes (implicit tag) is provided // (unauth attributes are OPTIONAL) if (derin.available() != 0 && (byte)(derin.peekByte()) == (byte)0xA1) { unauthenticatedAttributes = new PKCS9Attributes(derin, true);// ignore unsupported attrs } } // all done if (derin.available() != 0) { throw new ParsingException("extra data at the end"); } }
Example 19
Source File: SignerInfo.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Parses a PKCS#7 signer info. * * <p>This constructor is used only for backwards compatibility with * PKCS#7 blocks that were generated using JDK1.1.x. * * @param derin the ASN.1 encoding of the signer info. * @param oldStyle flag indicating whether or not the given signer info * is encoded according to JDK1.1.x. */ public SignerInfo(DerInputStream derin, boolean oldStyle) throws IOException, ParsingException { // version version = derin.getBigInteger(); // issuerAndSerialNumber DerValue[] issuerAndSerialNumber = derin.getSequence(2); byte[] issuerBytes = issuerAndSerialNumber[0].toByteArray(); issuerName = new X500Name(new DerValue(DerValue.tag_Sequence, issuerBytes)); certificateSerialNumber = issuerAndSerialNumber[1].getBigInteger(); // digestAlgorithmId DerValue tmp = derin.getDerValue(); digestAlgorithmId = AlgorithmId.parse(tmp); // authenticatedAttributes if (oldStyle) { // In JDK1.1.x, the authenticatedAttributes are always present, // encoded as an empty Set (Set of length zero) derin.getSet(0); } else { // check if set of auth attributes (implicit tag) is provided // (auth attributes are OPTIONAL) if ((byte)(derin.peekByte()) == (byte)0xA0) { authenticatedAttributes = new PKCS9Attributes(derin); } } // digestEncryptionAlgorithmId - little RSA naming scheme - // signature == encryption... tmp = derin.getDerValue(); digestEncryptionAlgorithmId = AlgorithmId.parse(tmp); // encryptedDigest encryptedDigest = derin.getOctetString(); // unauthenticatedAttributes if (oldStyle) { // In JDK1.1.x, the unauthenticatedAttributes are always present, // encoded as an empty Set (Set of length zero) derin.getSet(0); } else { // check if set of unauth attributes (implicit tag) is provided // (unauth attributes are OPTIONAL) if (derin.available() != 0 && (byte)(derin.peekByte()) == (byte)0xA1) { unauthenticatedAttributes = new PKCS9Attributes(derin, true);// ignore unsupported attrs } } // all done if (derin.available() != 0) { throw new ParsingException("extra data at the end"); } }
Example 20
Source File: SignerInfo.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * Parses a PKCS#7 signer info. * * <p>This constructor is used only for backwards compatibility with * PKCS#7 blocks that were generated using JDK1.1.x. * * @param derin the ASN.1 encoding of the signer info. * @param oldStyle flag indicating whether or not the given signer info * is encoded according to JDK1.1.x. */ public SignerInfo(DerInputStream derin, boolean oldStyle) throws IOException, ParsingException { // version version = derin.getBigInteger(); // issuerAndSerialNumber DerValue[] issuerAndSerialNumber = derin.getSequence(2); byte[] issuerBytes = issuerAndSerialNumber[0].toByteArray(); issuerName = new X500Name(new DerValue(DerValue.tag_Sequence, issuerBytes)); certificateSerialNumber = issuerAndSerialNumber[1].getBigInteger(); // digestAlgorithmId DerValue tmp = derin.getDerValue(); digestAlgorithmId = AlgorithmId.parse(tmp); // authenticatedAttributes if (oldStyle) { // In JDK1.1.x, the authenticatedAttributes are always present, // encoded as an empty Set (Set of length zero) derin.getSet(0); } else { // check if set of auth attributes (implicit tag) is provided // (auth attributes are OPTIONAL) if ((byte)(derin.peekByte()) == (byte)0xA0) { authenticatedAttributes = new PKCS9Attributes(derin); } } // digestEncryptionAlgorithmId - little RSA naming scheme - // signature == encryption... tmp = derin.getDerValue(); digestEncryptionAlgorithmId = AlgorithmId.parse(tmp); // encryptedDigest encryptedDigest = derin.getOctetString(); // unauthenticatedAttributes if (oldStyle) { // In JDK1.1.x, the unauthenticatedAttributes are always present, // encoded as an empty Set (Set of length zero) derin.getSet(0); } else { // check if set of unauth attributes (implicit tag) is provided // (unauth attributes are OPTIONAL) if (derin.available() != 0 && (byte)(derin.peekByte()) == (byte)0xA1) { unauthenticatedAttributes = new PKCS9Attributes(derin, true);// ignore unsupported attrs } } // all done if (derin.available() != 0) { throw new ParsingException("extra data at the end"); } }