Exemplo n.º 1
0
        Program()
        {
            var cmdCipher = new CmdCipher();
            var cmdDigest = new CmdDigest();

            std_cmds.Add("dh", new CmdDH());
            std_cmds.Add("gendh", new CmdGenDH());
            std_cmds.Add("rsa", new CmdRSA());
            std_cmds.Add("genrsa", new CmdGenRSA());
            std_cmds.Add("version", new CmdVersion());
            std_cmds.Add("enc", cmdCipher);
            std_cmds.Add("dgst", cmdDigest);
            std_cmds.Add("smime", new CmdSmime());

            #region Standard Commands
            AddNullCommand(std_cmds, "asn1parse");
            AddNullCommand(std_cmds, "ca");
            AddNullCommand(std_cmds, "ciphers");
            AddNullCommand(std_cmds, "crl");
            AddNullCommand(std_cmds, "crl2pkcs7");
            AddNullCommand(std_cmds, "dhparam");
            AddNullCommand(std_cmds, "dsa");
            AddNullCommand(std_cmds, "dsaparam");
            AddNullCommand(std_cmds, "ec");
            AddNullCommand(std_cmds, "ecparam");
            AddNullCommand(std_cmds, "engine");
            AddNullCommand(std_cmds, "errstr");
            AddNullCommand(std_cmds, "gendsa");
            AddNullCommand(std_cmds, "nseq");
            AddNullCommand(std_cmds, "ocsp");
            AddNullCommand(std_cmds, "passwd");
            AddNullCommand(std_cmds, "pkcs12");
            AddNullCommand(std_cmds, "pkcs7");
            AddNullCommand(std_cmds, "pkcs8");
            AddNullCommand(std_cmds, "prime");
            AddNullCommand(std_cmds, "rand");
            AddNullCommand(std_cmds, "req");
            AddNullCommand(std_cmds, "rsautl");
            AddNullCommand(std_cmds, "s_client");
            AddNullCommand(std_cmds, "s_server");
            AddNullCommand(std_cmds, "s_time");
            AddNullCommand(std_cmds, "sess_id");
            //			AddNullCommand(std_cmds, "smime");
            AddNullCommand(std_cmds, "speed");
            AddNullCommand(std_cmds, "spkac");
            AddNullCommand(std_cmds, "verify");
            AddNullCommand(std_cmds, "x509");
            #endregion

            #region Message Digest commands
            foreach (var name in MessageDigest.AllNames)
            {
                md_cmds.Add(name, cmdDigest);
            }
            #endregion

            #region Cipher commands
            foreach (var name in Cipher.AllNames)
            {
                cipher_cmds.Add(name, cmdCipher);
            }
            #endregion
        }
Exemplo n.º 2
0
        Program()
        {
            CmdCipher cmdCipher = new CmdCipher();
            CmdDigest cmdDigest = new CmdDigest();

            this.std_cmds.Add("dh", new CmdDH());
            this.std_cmds.Add("gendh", new CmdGenDH());
            this.std_cmds.Add("rsa", new CmdRSA());
            this.std_cmds.Add("genrsa", new CmdGenRSA());
            this.std_cmds.Add("version", new CmdVersion());
            this.std_cmds.Add("enc", cmdCipher);
            this.std_cmds.Add("dgst", cmdDigest);

            #region Standard Commands
            AddNullCommand(std_cmds, "asn1parse");
            AddNullCommand(std_cmds, "ca");
            AddNullCommand(std_cmds, "ciphers");
            AddNullCommand(std_cmds, "crl");
            AddNullCommand(std_cmds, "crl2pkcs7");
            AddNullCommand(std_cmds, "dhparam");
            AddNullCommand(std_cmds, "dsa");
            AddNullCommand(std_cmds, "dsaparam");
            AddNullCommand(std_cmds, "ec");
            AddNullCommand(std_cmds, "ecparam");
            AddNullCommand(std_cmds, "engine");
            AddNullCommand(std_cmds, "errstr");
            AddNullCommand(std_cmds, "gendsa");
            AddNullCommand(std_cmds, "nseq");
            AddNullCommand(std_cmds, "ocsp");
            AddNullCommand(std_cmds, "passwd");
            AddNullCommand(std_cmds, "pkcs12");
            AddNullCommand(std_cmds, "pkcs7");
            AddNullCommand(std_cmds, "pkcs8");
            AddNullCommand(std_cmds, "prime");
            AddNullCommand(std_cmds, "rand");
            AddNullCommand(std_cmds, "req");
            AddNullCommand(std_cmds, "rsautl");
            AddNullCommand(std_cmds, "s_client");
            AddNullCommand(std_cmds, "s_server");
            AddNullCommand(std_cmds, "s_time");
            AddNullCommand(std_cmds, "sess_id");
            AddNullCommand(std_cmds, "smime");
            AddNullCommand(std_cmds, "speed");
            AddNullCommand(std_cmds, "spkac");
            AddNullCommand(std_cmds, "verify");
            AddNullCommand(std_cmds, "x509");
            #endregion

            #region Message Digest commands
            foreach (string name in MessageDigest.AllNames)
            {
                this.md_cmds.Add(name, cmdDigest);
            }
            #endregion

            #region Cipher commands
            foreach (string name in Cipher.AllNames)
            {
                this.cipher_cmds.Add(name, cmdCipher);
            }
            #endregion
        }