亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? infrastructure.java

?? 一個agent 工具包,可以開發移動設備應用,考慮了安全措施
?? JAVA
字號:
package SOMA.security.infrastructure;

import java.io.*;
import java.io.PrintStream;
import com.entrust.util.*;
import com.entrust.x509.directory.*;
import com.entrust.security.provider.*;
import com.entrust.toolkit.*;
import iaik.x509.*;

public class Infrastructure implements NetAddress, InfrastructureConst
{

        public PrintStream out = System.out;

        String SearchBase = this.CA_SearchBase;

        // directory
        InfrastructureAddress directoryAddress = null;

        // profile
        EntrustProfile profile;

        // Certificate set  %%synchronized
        CertificateCRLList localCertificateCRLList = null;

        // CRL set  %%synchronized
        // LocalCRL CRL = null;

        public Infrastructure( InfrastructureAddress directoryAddress)
            throws java.io.IOException,
                   iaik.pkcs.PKCSParsingException
        {
          this.directoryAddress = directoryAddress;
          this.localCertificateCRLList = new CertificateCRLList();

          if (this.directoryAddress.getOnLine())
            this.directoryAddress.connectDirectory();
        }

        /**
         * Creates an new objects that rappresents an Entrust PKI
         * @param caIP  the ip address or hostname of the entrust authority,
         * @param dirIP the ip address or hostname of the ldap directory
         */

        public Infrastructure(String caIP,String dirIP) {
                this.directoryAddress = new InfrastructureAddress(caIP,dirIP);

                this.directoryAddress.checkCiphers();
                if (this.directoryAddress.getOnLine())
                    this.directoryAddress.connectDirectory();
                updateCertificateCRLList();
        }

        /**
         * Creates an new objects that rappresents an Entrust PKI
         * @param caIP  the ip address or hostname of the entrust authority,
         * @param dirIP the ip address or hostname of the ldap directory
         * @param onLine the directory is on line.
         */

        public Infrastructure(String caIP,String dirIP,boolean onLine) {
                this.directoryAddress = new InfrastructureAddress(caIP,dirIP,onLine);
                this.directoryAddress.checkCiphers();
                if (this.directoryAddress.getOnLine())
                    this.directoryAddress.connectDirectory();
                updateCertificateCRLList();
        }

        /**
         * Creates an new objects that rappresents an Entrust PKI
         */

        public Infrastructure() {
                this.directoryAddress = new InfrastructureAddress("localhost","localhost");
                this.directoryAddress.checkCiphers();
                if (this.directoryAddress.getOnLine())
                    this.directoryAddress.connectDirectory();
                updateCertificateCRLList();
        }


        public void setEntrustProfile ( EntrustProfile profile ) {
          this.profile = profile;
        }

        public EntrustProfile getEntrustProfile ( EntrustProfile profile ) {
          return this.profile;
        }

        public void setOut (PrintStream out){
          this.out = out;
        }


        public CertificateCRLList getCertificateCRLList ()
        {
          return localCertificateCRLList;
        }

        /**
         * This method return onLine state
         */

        public  boolean getOnLine(){
            return (this.directoryAddress != null &&
                    this.directoryAddress.getOnLine());
        }

         /**
         * This method sets the onLine parameter
         * @param onLine  it's the new value
         */

        public void setOnLine (boolean onLine){
            this.directoryAddress.setOnLine(onLine);
        }

        /**
         * This method put CA address object
         * @param   ca address
         */

        public void putInfrastructureAddress(InfrastructureAddress ia) {
                 this.directoryAddress = ia;
        }

        /**
         * This method return CA address
         * @return   ca address
         */

        public InfrastructureAddress getInfrastructureAddress() {
                 return this.directoryAddress;
        }


        public String getSearchBase () {
            return SearchBase;
        }

        public void setSearchBase ( String sb ) {
            SearchBase = sb;
        }


        // return the directory context.
        public javax.naming.directory.DirContext getDirectoryContext(){
            return this.directoryAddress.DirectoryContext;
        }

        public void connectDirectory() {
                this.directoryAddress.checkCiphers();
                if (this.directoryAddress.getOnLine())
                    this.directoryAddress.connectDirectory();
        }


        /**
         * Creates a new entrust profile. It shouldn't be used directly, but
         * through EntrustProfileManager.
         *
         * @param refnum        the reference number,
         * @param authcode      the authentication code,
         * @param password      the password used to protect the profile,
         * @param epf           the profile to be created,
         * @param signalg       the signature algorithm to be used,
         * @param filename      the file where to store the profile
         * @param mode          can be either RECOVER_PROFILE or CREATE_PROFILE
         */

        void createOrRecoverProfile(String refnum,String authcode, String password ,int signalg,String filename,int mode)
                throws java.io.FileNotFoundException,
                       com.entrust.security.exceptions.EntrustBaseException
        {
          createOrRecoverProfile( refnum, authcode, password, this.profile, signalg, filename, mode);
        }

        void createOrRecoverProfile(String refnum,String authcode, String password,EntrustProfile epf,int signalg,String filename,int mode)
                throws java.io.FileNotFoundException,
                       com.entrust.security.exceptions.EntrustBaseException

        {

                FileOutputStream out = new FileOutputStream(filename);

                EntrustManagerTransport transport = directoryAddress.getTransport();

                try {
                        if (mode == directoryAddress.CREATE_PROFILE) {
                            System.out.println("!!!  refnum : " +  refnum);
                            System.out.println("!!!  authcode : " + authcode);
                            System.out.println("!!!  password : " + password);
                            System.out.println("!!!  signalg : " + signalg);

                            epf.create(new StringBuffer(refnum),new StringBuffer(authcode),new StringBuffer(password),transport,signalg,null);
                        }
                        else if (mode == directoryAddress.RECOVER_PROFILE)
                                epf.recover(new StringBuffer(refnum),new StringBuffer(authcode),new StringBuffer(password),transport,signalg,null);
                        epf.write(out);

                } catch (com.entrust.security.exceptions.EntrustBaseException ex) {
                        epf.writeComplete(transport,false);
                        throw ex;
                }
                epf.writeComplete(transport,true);
        }

        /**
         * Check if an update is needed and performs it.
         * @param epf   the profile to pbe updated
         * @param filename the filename where to store the updated profile
         */
        public void updateProfile( String filename )
                throws  com.entrust.security.exceptions.EntrustBaseException
        {
          updateProfile(this.profile, filename);
        }


        public void updateProfile(EntrustProfile profile,String filename)
                throws  com.entrust.security.exceptions.EntrustBaseException
        {
                this.directoryAddress.checkCiphers();

                if (! directoryAddress.getOnLine())
                        return;

                if (profile.encryptionKeyUpdateRequired())
                        doKeyUpdate(profile,EntrustProfile.EncryptionKeys,filename);

                if (profile.signingKeyUpdateRequired())
                        doKeyUpdate(profile,EntrustProfile.SigntureKeys,filename);
        }

        /**
         * Used to update the keys
         */

        public void doKeyUpdate(int key_type,String filename)
                throws  com.entrust.security.exceptions.EntrustBaseException
        {
          doKeyUpdate(this.profile , key_type, filename);
        }

        public void doKeyUpdate(EntrustProfile profile,int key_type,String filename)
                throws  com.entrust.security.exceptions.EntrustBaseException
        {
                this.directoryAddress.checkCiphers();

                EntrustManagerTransport transport = this.directoryAddress.getTransport();

                if (profile.updateKeys(transport,key_type)) {
                        try {
                                FileOutputStream epf = new FileOutputStream(filename);
                                profile.write(epf);
                        } catch (Exception any) {
                                profile.writeComplete(transport,false);
                                return;
                        }
                        profile.writeComplete(transport,true);
                }
        }


        /**
         * Returns an array of valid certificates.
         * @param epf     the profile for the user who is asking for verify,
         * @param dn      the array of distinguished name for whom to verify and ....
         * @return an array of valid certificates
         */
        public X509Certificate[] getValidCertificates(String dn[])
        {
          return getValidCertificates(this.profile, dn);
        }

        public X509Certificate[] getValidCertificates(EntrustProfile epf,String dn[])
        {
                JNDIDirectory directory = null;
                // If in online mode get the directory
                if (this.directoryAddress.getOnLine())
                    directory = this.directoryAddress.getDirectory();


                // Create the verifierier

                ETKCertificateVerifier verifier = new ETKCertificateVerifier(directory,epf);
                verifier.getContext().setCrlsRequired(this.directoryAddress.getOnLine());

                verifier.validateCertificates(dn);

                return verifier.getValidCertificates();

        }

        /**
         * Returns an array of valid certificates.
         * @param epf   the profile for the user who is asking for verify,
         * @param certs the array of certificate to verify,
         * @return an array of valid certificates
         */

        public X509Certificate[] getValidCertificates(X509Certificate certs[])
        {
          return getValidCertificates(this.profile , certs);
        }

        public X509Certificate[] getValidCertificates(EntrustProfile epf,X509Certificate certs[])
        {
                JNDIDirectory directory = null;
                // If in online mode get the directory
                if (this.directoryAddress.getOnLine())

                    directory = this.directoryAddress.getDirectory();

                // Create the verifier
                ETKCertificateVerifier verifier = new ETKCertificateVerifier(directory,epf);
                verifier.getContext().setCrlsRequired(this.directoryAddress.getOnLine());
                //modifica di rebecca al 23 novembre
                boolean ret = verifier.validateCertificates(certs);
                System.out.println(" il ritono della verifica 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品视频九色porn| 福利一区二区在线| 欧美亚洲自拍偷拍| 亚洲区小说区图片区qvod| 91在线porny国产在线看| 亚洲美女视频在线观看| 中文在线资源观看网站视频免费不卡| 处破女av一区二区| 亚洲自拍另类综合| 精品久久一区二区三区| 成人av电影在线观看| 午夜婷婷国产麻豆精品| 欧美成人一区二区三区在线观看| 欧美久久久久久久久久| 国产精品99精品久久免费| 亚洲欧美区自拍先锋| 亚洲欧美电影一区二区| 亚洲人成小说网站色在线| 亚洲美女视频在线观看| 午夜精品久久一牛影视| 婷婷综合另类小说色区| 麻豆视频一区二区| 亚洲欧美激情视频在线观看一区二区三区| 国产精品久久久久久久久免费樱桃| 7777精品伊人久久久大香线蕉的 | 国产亚洲制服色| 欧美日韩在线免费视频| 成人一区在线观看| 日本乱码高清不卡字幕| 国产jizzjizz一区二区| 97国产精品videossex| 国产精品99久久久久久似苏梦涵| 成人h动漫精品一区二| 色综合网站在线| 国产91色综合久久免费分享| 日本精品一级二级| 欧美一区午夜视频在线观看| 色欲综合视频天天天| 丰满放荡岳乱妇91ww| 日本黄色一区二区| 精品国产成人系列| 日韩欧美综合在线| 欧美一区二区三区在线看| 亚洲精品在线三区| 自拍偷拍亚洲激情| 亚洲精品大片www| 亚洲精品高清在线观看| 久久精品久久99精品久久| 午夜久久久久久| 成人av资源网站| 精品日韩欧美在线| 夜夜精品视频一区二区| 亚洲五码中文字幕| 天天爽夜夜爽夜夜爽精品视频| 丁香另类激情小说| 日韩午夜三级在线| 亚洲一区在线播放| 不卡一区二区在线| 精品少妇一区二区三区视频免付费 | 亚洲一区二区精品3399| 国产一区二区三区四| 国产不卡在线播放| 91精品综合久久久久久| 亚洲美女电影在线| 99热精品国产| 欧美精品亚洲二区| 一区二区三区日韩精品视频| 成人福利视频在线看| 国产亚洲欧美日韩日本| 免费xxxx性欧美18vr| 国产一区二区三区日韩| 日韩欧美中文一区| 午夜精彩视频在线观看不卡| 欧美三级蜜桃2在线观看| 亚洲精品中文在线影院| 91视频.com| 一级中文字幕一区二区| 色偷偷久久一区二区三区| 亚洲欧洲一区二区三区| 日本三级亚洲精品| caoporen国产精品视频| 国产精品久久久99| 不卡电影一区二区三区| 国产精品久久久久婷婷二区次 | 中文字幕的久久| 国产福利一区二区三区视频在线 | 欧美偷拍一区二区| 亚洲在线视频一区| 欧美日韩国产高清一区| 久久久久97国产精华液好用吗| 亚洲精品国产精华液| 在线精品视频免费播放| 久久久久久久久久久电影| 韩国一区二区三区| 一本高清dvd不卡在线观看| 亚洲精品日产精品乱码不卡| 欧美日韩国产综合久久| 日韩国产欧美在线播放| 久久综合久久久久88| 亚洲午夜精品17c| 4438成人网| 国产成人综合在线观看| 亚洲视频在线一区| 91 com成人网| 韩国女主播成人在线观看| 国产精品美女一区二区| 欧美午夜精品久久久久久超碰| 免费看欧美女人艹b| 国产欧美日韩视频在线观看| 久久99精品一区二区三区| 欧美浪妇xxxx高跟鞋交| 国内精品写真在线观看| 一区二区中文字幕在线| 欧美一区二区三区播放老司机| 国产精华液一区二区三区| 亚洲视频中文字幕| 日韩一区二区三区在线| www.亚洲人| 强制捆绑调教一区二区| 亚洲欧美国产77777| 欧美大白屁股肥臀xxxxxx| 偷偷要91色婷婷| 国产欧美精品在线观看| 欧美日韩久久久| 成人禁用看黄a在线| 亚州成人在线电影| 欧美日韩一区 二区 三区 久久精品| 韩国av一区二区| 五月激情丁香一区二区三区| 亚洲手机成人高清视频| 亚洲精品一区二区三区在线观看 | 色婷婷精品久久二区二区蜜臂av | 免费亚洲电影在线| 亚洲欧美韩国综合色| 久久久久久久一区| 欧美日韩免费观看一区二区三区 | 综合婷婷亚洲小说| 精品国产乱码久久| 欧美日韩国产高清一区二区| 色综合中文字幕国产 | 欧美日韩在线观看一区二区| 成人午夜电影小说| 国产一区二区不卡在线| 另类人妖一区二区av| 一区二区在线观看视频在线观看| 国产精品久久久久三级| 久久久久久一二三区| 精品国产自在久精品国产| 91精品国产综合久久精品麻豆| 在线视频一区二区三区| 99久久精品一区| 不卡av电影在线播放| 粉嫩欧美一区二区三区高清影视| 国产在线精品一区二区| 精品亚洲欧美一区| 精品一区免费av| 国精产品一区一区三区mba视频| 麻豆久久一区二区| 经典三级视频一区| 国模冰冰炮一区二区| 国产精品乡下勾搭老头1| 国产精品一区二区黑丝| 国产91综合网| 成人毛片在线观看| 色哟哟在线观看一区二区三区| 色av一区二区| 欧美精品在线观看一区二区| 欧美一二三四在线| 精品久久久久久无| 日本一区二区三区国色天香| 亚洲欧洲性图库| 亚洲自拍另类综合| 日韩精品久久理论片| 亚洲国产精品ⅴa在线观看| 欧美经典一区二区三区| 自拍偷自拍亚洲精品播放| 一区二区三区四区蜜桃| 日韩黄色免费网站| 韩国av一区二区| 一本大道综合伊人精品热热| 欧美精品色一区二区三区| 日韩女同互慰一区二区| 国产精品视频在线看| 亚洲综合在线第一页| 精品一区二区国语对白| 91毛片在线观看| 日韩欧美一区二区三区在线| 亚洲国产精品高清| 香蕉成人啪国产精品视频综合网| 麻豆一区二区三| 色婷婷综合久久久久中文一区二区 | 国产一区二区三区电影在线观看| www.爱久久.com| 欧美一区二区视频观看视频| 中文字幕在线视频一区| 午夜视频一区二区三区| 国产91精品免费| 欧美一区二区三区在线观看视频| 中文字幕精品—区二区四季| 日韩vs国产vs欧美|