/** * Given an X.509 extension that encodes GeneralNames, return it in the * format expected by APIs. */ private static Collection<List<?>> decodeGeneralNames(Extension extension) throws IOException { if (extension == null) { return null; } Collection<List<?>> collection = ((GeneralNames) GeneralNames.ASN1.decode(extension .getExtnValue())).getPairsList(); /* * If the extension had any invalid entries, we may have an empty * collection at this point, so just return null. */ if (collection.size() == 0) { return null; } return Collections.unmodifiableCollection(collection); }
/** * Given an X.509 extension that encodes GeneralNames, return it in the * format expected by APIs. */ private static Collection<List<?>> decodeGeneralNames(Extension extension) throws IOException { if (extension == null) { return null; } Collection<List<?>> collection = ((GeneralNames) GeneralNames.ASN1.decode(extension .getExtnValue())).getPairsList(); /* * If the extension had any invalid entries, we may have an empty * collection at this point, so just return null. */ if (collection.size() == 0) { return null; } return Collections.unmodifiableCollection(collection); }
/** * Given an X.509 extension that encodes GeneralNames, return it in the * format expected by APIs. */ private static Collection<List<?>> decodeGeneralNames(Extension extension) throws IOException { if (extension == null) { return null; } Collection<List<?>> collection = ((GeneralNames) GeneralNames.ASN1.decode(extension .getExtnValue())).getPairsList(); /* * If the extension had any invalid entries, we may have an empty * collection at this point, so just return null. */ if (collection.size() == 0) { return null; } return Collections.unmodifiableCollection(collection); }
/** * Given an X.509 extension that encodes GeneralNames, return it in the * format expected by APIs. */ private static Collection<List<?>> decodeGeneralNames(Extension extension) throws IOException { if (extension == null) { return null; } Collection<List<?>> collection = ((GeneralNames) GeneralNames.ASN1.decode(extension .getExtnValue())).getPairsList(); /* * If the extension had any invalid entries, we may have an empty * collection at this point, so just return null. */ if (collection.size() == 0) { return null; } return Collections.unmodifiableCollection(collection); }
/** * Given an X.509 extension that encodes GeneralNames, return it in the * format expected by APIs. */ private static Collection<List<?>> decodeGeneralNames(Extension extension) throws IOException { if (extension == null) { return null; } Collection<List<?>> collection = ((GeneralNames) GeneralNames.ASN1.decode(extension .getExtnValue())).getPairsList(); /* * If the extension had any invalid entries, we may have an empty * collection at this point, so just return null. */ if (collection.size() == 0) { return null; } return Collections.unmodifiableCollection(collection); }
/** * Given an X.509 extension that encodes GeneralNames, return it in the * format expected by APIs. */ private static Collection<List<?>> decodeGeneralNames(Extension extension) throws IOException { if (extension == null) { return null; } Collection<List<?>> collection = ((GeneralNames) GeneralNames.ASN1.decode(extension .getExtnValue())).getPairsList(); /* * If the extension had any invalid entries, we may have an empty * collection at this point, so just return null. */ if (collection.size() == 0) { return null; } return Collections.unmodifiableCollection(collection); }
/** * Given an X.509 extension that encodes GeneralNames, return it in the * format expected by APIs. */ private static Collection<List<?>> decodeGeneralNames(Extension extension) throws IOException { if (extension == null) { return null; } Collection<List<?>> collection = ((GeneralNames) GeneralNames.ASN1.decode(extension .getExtnValue())).getPairsList(); /* * If the extension had any invalid entries, we may have an empty * collection at this point, so just return null. */ if (collection.size() == 0) { return null; } return Collections.unmodifiableCollection(collection); }