NewX509.h
上传用户:stc1860
上传日期:2007-01-12
资源大小:234k
文件大小:3k
源码类别:

CA认证

开发平台:

MultiPlatform

  1. /*
  2.  * Copyright (C) 2001 Christian Hohnstaedt.
  3.  *
  4.  *  All rights reserved.
  5.  *
  6.  *
  7.  *  Redistribution and use in source and binary forms, with or without 
  8.  *  modification, are permitted provided that the following conditions are met:
  9.  *
  10.  *  - Redistributions of source code must retain the above copyright notice,
  11.  *    this list of conditions and the following disclaimer.
  12.  *  - Redistributions in binary form must reproduce the above copyright notice,
  13.  *    this list of conditions and the following disclaimer in the documentation
  14.  *    and/or other materials provided with the distribution.
  15.  *  - Neither the name of the author nor the names of its contributors may be 
  16.  *    used to endorse or promote products derived from this software without
  17.  *    specific prior written permission.
  18.  *
  19.  *
  20.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  21.  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  22.  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  23.  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  24.  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  25.  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  26.  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  27.  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  28.  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  29.  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  30.  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31.  *
  32.  *
  33.  * This program links to software with different licenses from:
  34.  *
  35.  * http://www.openssl.org which includes cryptographic software
  36.  *  written by Eric Young (eay@cryptsoft.com)"
  37.  *
  38.  * http://www.sleepycat.com
  39.  *
  40.  * http://www.trolltech.com
  41.  * 
  42.  *
  43.  *
  44.  * http://www.hohnstaedt.de/xca
  45.  * email: christian@hohnstaedt.de
  46.  *
  47.  * $Id: NewX509.h,v 1.20 2002/10/26 14:01:08 chris Exp $ 
  48.  *
  49.  */                           
  50. #include "NewX509_UI.h"
  51. #include <qcombobox.h>
  52. #include <qradiobutton.h>
  53. #include "lib/db_key.h"
  54. #include "lib/db_x509req.h"
  55. #include "lib/db_x509.h"
  56. #include "lib/db_temp.h"
  57. #include <qapplication.h>
  58. #include <qframe.h>
  59. #include <qlineedit.h>
  60. #include <qpushbutton.h>
  61. #include <qgroupbox.h>
  62. #include <qcheckbox.h>
  63. #include <qlabel.h>
  64. #include <qlistbox.h>
  65. #include <qpixmap.h>
  66. #include <qvalidator.h>
  67. #include <qregexp.h>
  68. #include <qbuttongroup.h>
  69. #ifndef NEWX509_H
  70. #define NEWX509_H
  71. class MainWindow;
  72. class NewX509: public NewX509_UI
  73. {
  74. Q_OBJECT
  75.    private:
  76. db_x509req *reqs;
  77. db_x509 *certs;
  78. db_key *keys;
  79. db_temp *temps;
  80. pki_temp *fixtemp;
  81. QString startText, endText, tText;
  82.    public:
  83. NewX509(QWidget *parent, const char *name, db_key *key, db_x509req *req, db_x509 *cert, db_temp *temp, QPixmap *image, QPixmap *ns);
  84. ~NewX509();
  85. void setRequest(); // reduce to request form 
  86. void setTemp(pki_temp *temp); // reduce to template form 
  87. void setCert(); // reduce to certificate form 
  88. void setup();
  89. void showPage(QWidget *page);
  90. void toTemplate(pki_temp *temp);
  91. void fromTemplate(pki_temp *temp);
  92. void defineTemplate(pki_temp *temp);
  93. void defineRequest(pki_x509req *req);
  94. int lb2int(QListBox *lb);
  95. void int2lb(QListBox *lb, int x);
  96. void templateChanged(pki_temp *templ);
  97. void templateChanged(QString templatename);
  98.    public slots:
  99. void toggleFromRequest();
  100.     void newKey();
  101. void dataChangeP2();
  102. void newKeyDone(QString name);
  103. void switchExtended();
  104. void templateChanged();
  105. void signerChanged();
  106.    signals:
  107. void genKey();  
  108. };
  109. #endif