Package com.vmware.vim25

Examples of com.vmware.vim25.Extension


            vm_.getSnapshot().getRootSnapshotList();
       
        if (snapTree != null) {
            ManagedObjectReference mor = findSnapshotInTree(snapTree, snapName);
            if (mor != null) {
                return new
                    VirtualMachineSnapshot(vm_.getServerConnection(), mor);
            }
        }
        return null;
    }
View Full Code Here


     */
    private boolean snapshotTaskDetail(TaskType type, String snapName,
                                       String messageInSuccess, String messageInFailure)
    {

        VirtualMachineSnapshot vmsnap = null;

        if (type != TaskType.CREATE) {
            vmsnap = getSnapshotInTree(snapName);
            if (vmsnap == null) { return false; }
        }

        try {
            Task task = null;
            switch (type) {
            case CREATE:
                task = vm_.createSnapshot_Task(snapName, null, false, false);
                break;
            case DELETE:
                task = vmsnap.removeSnapshot_Task(true);
                break;
            case REVERT:
                task = vmsnap.revertToSnapshot_Task(null, true);
                break;
            default:
                throw new Exception("Snapshot TaskType is wrong.");
            }
            assert task != null;
View Full Code Here

        boolean[] issuerUniqueID  = new boolean[]
                    {true, false, true, false, true, false, true, false};
        boolean[] subjectUniqueID = new boolean[]
                    {false, true, false, true, false, true, false, true};

        Extension extension = new Extension("2.5.29.17",
                                            true, subjectAltNames.getEncoded());
        Extensions extensions = new Extensions();
        extensions.addExtension(extension);
      
        TBSCertificate tbsCertificate = new TBSCertificate(version,
View Full Code Here

     */
    public byte[] getExtensionValue(String oid) {
        if (extensions == null) {
            return null;
        }
        Extension ext = extensions.getExtensionByOID(oid);
        return (ext == null) ? null : ext.getRawExtnValue();
    }
View Full Code Here

    public byte[] getExtensionValue(String oid) {
        if (extensions == null) {
            return null;
        }
        // retrieve the info from the cached extensions object
        Extension ext = extensions.getExtensionByOID(oid);
        return (ext == null) ? null : ext.getRawExtnValue();
    }
View Full Code Here

            new GeneralName(6, "http://Resource.Id"),
            new GeneralName(new byte[] {1, 1, 1, 1}),
            new GeneralName(8, "1.2.3.4444.55555")
        };
        GeneralNames sans = new GeneralNames(Arrays.asList(san));
        Extension extension = new Extension("2.5.29.17", true, sans.getEncoded());
        Extensions extensions = new Extensions();
        extensions.addExtension(extension);
       
        byte[] encoding = extensions.getEncoded();
        Extensions.ASN1.decode(encoding);
View Full Code Here

        // crl entry extensions
        Extensions crlEntryExtensions = new Extensions();
        // add reason code extension which OID is 2.5.29.21
        // see RFC 3280 http://www.ietf.org/rfc/rfc3280.txt
        crlEntryExtensions.addExtension(
                new Extension("2.5.29.21", Extension.NON_CRITICAL,
                    new ReasonCode(ReasonCode.KEY_COMPROMISE)));
        // crl entry
        X509CRLEntryImpl crlEntry = new X509CRLEntryImpl(
                new TBSCertList.RevokedCertificate(
                        serialNumber,
View Full Code Here

        GeneralName tsa = new GeneralName(new Name("CN=AnAuthority"));
        Extensions exts = new Extensions();
        // Time-Stamping extension OID: as defined in RFC 3161
        int[] timeStampingExtOID = new int[] { 1, 3, 6, 1, 5, 5, 7, 3, 8 };
        byte[] timeStampingExtValue = new byte[] { (byte) 1, (byte) 2, (byte) 3 };
        Extension ext = new Extension(timeStampingExtOID, true,
                timeStampingExtValue);
        exts.addExtension(ext);

        TSTInfo tSTInfo = new TSTInfo(1, policy, msgImprint, BigInteger.TEN,
                genTime, accuracy, Boolean.FALSE, nonce, tsa, exts);
View Full Code Here

        String reqPolicy = "1.2.3.4.5";
        BigInteger nonce = BigInteger.valueOf(1234567890L);
        Extensions exts = new Extensions();
        int[] extOID = new int[] { 1, 2, 3, 2, 1 };
        byte[] extValue = new byte[] { (byte) 1, (byte) 2, (byte) 3 };
        Extension ext = new Extension(extOID, false, extValue);
        exts.addExtension(ext);

        TimeStampReq req = new TimeStampReq(1, msgImprint, reqPolicy,
                nonce, Boolean.FALSE, exts);
        byte[] encoding = req.getEncoded();
View Full Code Here

        GeneralName tsa = new GeneralName(new Name("CN=AnAuthority"));
        Extensions exts = new Extensions();
        // Time-Stamping extension OID: as defined in RFC 3161
        int[] timeStampingExtOID = new int[] { 1, 3, 6, 1, 5, 5, 7, 3, 8 };
        byte[] timeStampingExtValue = new byte[] { (byte) 1, (byte) 2, (byte) 3 };
        Extension ext = new Extension(timeStampingExtOID, true,
                timeStampingExtValue);
        exts.addExtension(ext);

        TSTInfo info = new TSTInfo(1, policy, msgImprint, BigInteger.TEN,
                genTime, accuracy, Boolean.FALSE, nonce, tsa, exts);
View Full Code Here

TOP

Related Classes of com.vmware.vim25.Extension

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.