Package sun.security.util

Examples of sun.security.util.SignatureFileVerifier


        sigFileData.put(key, bytes);
        // check pending blocks, we can now process
        // anyone waiting for this .SF file
        Iterator it = pendingBlocks.iterator();
        while (it.hasNext()) {
      SignatureFileVerifier sfv =
          (SignatureFileVerifier) it.next();
      if (sfv.needSignatureFile(key)) {
          if (debug != null) {
        debug.println(
         "processEntry: processing pending block");
          }

          sfv.setSignatureFile(bytes);
          sfv.process(sigFileSigners);
      }
        }
        return;
    }

    // now we are parsing a signature block file

    String key = uname.substring(0, uname.lastIndexOf("."));

    if (signerCache == null)
        signerCache = new ArrayList();

    if (manDig == null) {
        synchronized(manifestRawBytes) {
      if (manDig == null) {
          manDig = new ManifestDigester(manifestRawBytes);
          manifestRawBytes = null;
      }
        }
    }

    SignatureFileVerifier sfv =
      new SignatureFileVerifier(signerCache,
              manDig, uname, baos.toByteArray());

    if (sfv.needSignatureFileBytes()) {
        // see if we have already parsed an external .SF file
        byte[] bytes = (byte[]) sigFileData.get(key);

        if (bytes == null) {
      // put this block on queue for later processing
      // since we don't have the .SF bytes yet
      // (uname, block);
      if (debug != null) {
          debug.println("adding pending block");
      }
      pendingBlocks.add(sfv);
      return;
        } else {
      sfv.setSignatureFile(bytes);
        }
    }
    sfv.process(sigFileSigners);

      } catch (sun.security.pkcs.ParsingException pe) {
    if (debug != null) debug.println("processEntry caught: "+pe);
    // ignore and treat as unsigned
      } catch (IOException ioe) {
View Full Code Here


                    sigFileData.put(key, bytes);
                    // check pending blocks, we can now process
                    // anyone waiting for this .SF file
                    Iterator it = pendingBlocks.iterator();
                    while (it.hasNext()) {
                        SignatureFileVerifier sfv =
                            (SignatureFileVerifier) it.next();
                        if (sfv.needSignatureFile(key)) {
                            if (debug != null) {
                                debug.println(
                                 "processEntry: processing pending block");
                            }

                            sfv.setSignatureFile(bytes);
                            sfv.process(sigFileSigners, manifestDigests);
                        }
                    }
                    return;
                }

                // now we are parsing a signature block file

                String key = uname.substring(0, uname.lastIndexOf("."));

                if (signerCache == null)
                    signerCache = new ArrayList();

                if (manDig == null) {
                    synchronized(manifestRawBytes) {
                        if (manDig == null) {
                            manDig = new ManifestDigester(manifestRawBytes);
                            manifestRawBytes = null;
                        }
                    }
                }

                SignatureFileVerifier sfv =
                  new SignatureFileVerifier(signerCache,
                                            manDig, uname, baos.toByteArray());

                if (sfv.needSignatureFileBytes()) {
                    // see if we have already parsed an external .SF file
                    byte[] bytes = (byte[]) sigFileData.get(key);

                    if (bytes == null) {
                        // put this block on queue for later processing
                        // since we don't have the .SF bytes yet
                        // (uname, block);
                        if (debug != null) {
                            debug.println("adding pending block");
                        }
                        pendingBlocks.add(sfv);
                        return;
                    } else {
                        sfv.setSignatureFile(bytes);
                    }
                }
                sfv.process(sigFileSigners, manifestDigests);

            } catch (IOException ioe) {
                // e.g. sun.security.pkcs.ParsingException
                if (debug != null) debug.println("processEntry caught: "+ioe);
                // ignore and treat as unsigned
View Full Code Here

                    sigFileData.put(key, bytes);
                    // check pending blocks, we can now process
                    // anyone waiting for this .SF file
                    Iterator it = pendingBlocks.iterator();
                    while (it.hasNext()) {
                        SignatureFileVerifier sfv =
                            (SignatureFileVerifier) it.next();
                        if (sfv.needSignatureFile(key)) {
                            if (debug != null) {
                                debug.println(
                                 "processEntry: processing pending block");
                            }

                            sfv.setSignatureFile(bytes);
                            sfv.process(sigFileSigners);
                        }
                    }
                    return;
                }

                // now we are parsing a signature block file

                String key = uname.substring(0, uname.lastIndexOf("."));

                if (signerCache == null)
                    signerCache = new ArrayList();

                if (manDig == null) {
                    synchronized(manifestRawBytes) {
                        if (manDig == null) {
                            manDig = new ManifestDigester(manifestRawBytes);
                            manifestRawBytes = null;
                        }
                    }
                }

                SignatureFileVerifier sfv =
                  new SignatureFileVerifier(signerCache,
                                            manDig, uname, baos.toByteArray());

                if (sfv.needSignatureFileBytes()) {
                    // see if we have already parsed an external .SF file
                    byte[] bytes = (byte[]) sigFileData.get(key);

                    if (bytes == null) {
                        // put this block on queue for later processing
                        // since we don't have the .SF bytes yet
                        // (uname, block);
                        if (debug != null) {
                            debug.println("adding pending block");
                        }
                        pendingBlocks.add(sfv);
                        return;
                    } else {
                        sfv.setSignatureFile(bytes);
                    }
                }
                sfv.process(sigFileSigners);

            } catch (sun.security.pkcs.ParsingException pe) {
                if (debug != null) debug.println("processEntry caught: "+pe);
                // ignore and treat as unsigned
            } catch (IOException ioe) {
View Full Code Here

TOP

Related Classes of sun.security.util.SignatureFileVerifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.