Java Code Examples for sun.security.x509.AuthorityKeyIdentifierExtension#get()
The following examples show how to use
sun.security.x509.AuthorityKeyIdentifierExtension#get() .
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: AdaptableX509CertSelector.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 2
Source File: AdaptableX509CertSelector.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 3
Source File: AdaptableX509CertSelector.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { KeyIdentifier akid = (KeyIdentifier)ext.get( AuthorityKeyIdentifierExtension.KEY_ID); if (akid != null) { DerOutputStream derout = new DerOutputStream(); derout.putOctetString(akid.getIdentifier()); ski = derout.toByteArray(); } SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 4
Source File: AdaptableX509CertSelector.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 5
Source File: AdaptableX509CertSelector.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 6
Source File: AdaptableX509CertSelector.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 7
Source File: AdaptableX509CertSelector.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 8
Source File: AdaptableX509CertSelector.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 9
Source File: AdaptableX509CertSelector.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 10
Source File: AdaptableX509CertSelector.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { ski = ext.getEncodedKeyIdentifier(); SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 11
Source File: AdaptableX509CertSelector.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { KeyIdentifier akid = (KeyIdentifier)ext.get( AuthorityKeyIdentifierExtension.KEY_ID); if (akid != null) { DerOutputStream derout = new DerOutputStream(); derout.putOctetString(akid.getIdentifier()); ski = derout.toByteArray(); } SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 12
Source File: AdaptableX509CertSelector.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the subjectKeyIdentifier and serialNumber criteria from the * authority key identifier extension. * * The subjectKeyIdentifier criterion is set to the keyIdentifier field * of the extension, or null if it is empty. The serialNumber criterion * is set to the authorityCertSerialNumber field, or null if it is empty. * * Note that we do not set the subject criterion to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before calling match(). * * @param ext the authorityKeyIdentifier extension * @throws IOException if there is an error parsing the extension */ void setSkiAndSerialNumber(AuthorityKeyIdentifierExtension ext) throws IOException { ski = null; serial = null; if (ext != null) { KeyIdentifier akid = (KeyIdentifier)ext.get( AuthorityKeyIdentifierExtension.KEY_ID); if (akid != null) { DerOutputStream derout = new DerOutputStream(); derout.putOctetString(akid.getIdentifier()); ski = derout.toByteArray(); } SerialNumber asn = (SerialNumber)ext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { serial = asn.getNumber(); } // the subject criterion should be set by the caller } }
Example 13
Source File: AdaptableX509CertSelector.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Parse the authority key identifier extension. * * If the keyIdentifier field of the extension is non-null, set the * subjectKeyIdentifier criterion. If the authorityCertSerialNumber * field is non-null, set the serialNumber criterion. * * Note that we will not set the subject criterion according to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before call match(). * * @param akidext the authorityKeyIdentifier extension */ void parseAuthorityKeyIdentifierExtension( AuthorityKeyIdentifierExtension akidext) throws IOException { if (akidext != null) { KeyIdentifier akid = (KeyIdentifier)akidext.get( AuthorityKeyIdentifierExtension.KEY_ID); if (akid != null) { // Do not override the previous setting for initial selection. if (isSKIDSensitive || getSubjectKeyIdentifier() == null) { DerOutputStream derout = new DerOutputStream(); derout.putOctetString(akid.getIdentifier()); super.setSubjectKeyIdentifier(derout.toByteArray()); isSKIDSensitive = true; } } SerialNumber asn = (SerialNumber)akidext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { // Do not override the previous setting for initial selection. if (isSNSensitive || getSerialNumber() == null) { super.setSerialNumber(asn.getNumber()); isSNSensitive = true; } } // the subject criterion should be set by the caller. } }
Example 14
Source File: AdaptableX509CertSelector.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Parse the authority key identifier extension. * * If the keyIdentifier field of the extension is non-null, set the * subjectKeyIdentifier criterion. If the authorityCertSerialNumber * field is non-null, set the serialNumber criterion. * * Note that we will not set the subject criterion according to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before call match(). * * @param akidext the authorityKeyIdentifier extension */ void parseAuthorityKeyIdentifierExtension( AuthorityKeyIdentifierExtension akidext) throws IOException { if (akidext != null) { KeyIdentifier akid = (KeyIdentifier)akidext.get( AuthorityKeyIdentifierExtension.KEY_ID); if (akid != null) { // Do not override the previous setting for initial selection. if (isSKIDSensitive || getSubjectKeyIdentifier() == null) { DerOutputStream derout = new DerOutputStream(); derout.putOctetString(akid.getIdentifier()); super.setSubjectKeyIdentifier(derout.toByteArray()); isSKIDSensitive = true; } } SerialNumber asn = (SerialNumber)akidext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { // Do not override the previous setting for initial selection. if (isSNSensitive || getSerialNumber() == null) { super.setSerialNumber(asn.getNumber()); isSNSensitive = true; } } // the subject criterion should be set by the caller. } }
Example 15
Source File: AdaptableX509CertSelector.java From j2objc with Apache License 2.0 | 5 votes |
/** * Parse the authority key identifier extension. * * If the keyIdentifier field of the extension is non-null, set the * subjectKeyIdentifier criterion. If the authorityCertSerialNumber * field is non-null, set the serialNumber criterion. * * Note that we will not set the subject criterion according to the * authorityCertIssuer field of the extension. The caller MUST set * the subject criterion before call match(). * * @param akidext the authorityKeyIdentifier extension */ void parseAuthorityKeyIdentifierExtension( AuthorityKeyIdentifierExtension akidext) throws IOException { if (akidext != null) { KeyIdentifier akid = (KeyIdentifier)akidext.get( AuthorityKeyIdentifierExtension.KEY_ID); if (akid != null) { // Do not override the previous setting for initial selection. if (isSKIDSensitive || getSubjectKeyIdentifier() == null) { DerOutputStream derout = new DerOutputStream(); derout.putOctetString(akid.getIdentifier()); super.setSubjectKeyIdentifier(derout.toByteArray()); isSKIDSensitive = true; } } SerialNumber asn = (SerialNumber)akidext.get( AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (asn != null) { // Do not override the previous setting for initial selection. if (isSNSensitive || getSerialNumber() == null) { super.setSerialNumber(asn.getNumber()); isSNSensitive = true; } } // the subject criterion should be set by the caller. } }