This commit is contained in:
thayes%netscape.com 2001-02-06 22:52:10 +00:00
Родитель 7413ff9c90
Коммит 75236f3e70
3 изменённых файлов: 94 добавлений и 1 удалений

Просмотреть файл

@ -19,6 +19,7 @@
# Contributor(s): # Contributor(s):
# Brian Ryner <bryner@netscape.com> # Brian Ryner <bryner@netscape.com>
# Javier Delgadillo <javi@netscape.com> # Javier Delgadillo <javi@netscape.com>
# Terry Hayes <thayes@netscape.com>
# #
# Alternatively, the contents of this file may be used under the # Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the # terms of the GNU General Public License Version 2 or later (the
@ -49,6 +50,8 @@ XPIDLSRCS = \
nsIX509CertDB.idl \ nsIX509CertDB.idl \
nsISecureDevicePrompt.idl \ nsISecureDevicePrompt.idl \
nsIPKCS11Slot.idl \ nsIPKCS11Slot.idl \
nsIPK11TokenDB.idl \
nsINSSDialogs.idl \
$(NULL) $(NULL)
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -19,6 +19,7 @@
# #
# Contributor(s): # Contributor(s):
# Javier Delgadillo # Javier Delgadillo
# Terry Hayes <thayes@netscape.com>
# #
# Alternatively, the contents of this file may be used under the # Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the # terms of the GNU General Public License Version 2 or later (the
@ -53,8 +54,9 @@ XPIDLSRCS= \
.\nsICertSelect.idl \ .\nsICertSelect.idl \
.\nsIX509Cert.idl \ .\nsIX509Cert.idl \
.\nsIX509CertDB.idl \ .\nsIX509CertDB.idl \
.\nsISecureDevicePrompt.idl \
.\nsIPKCS11Slot.idl \ .\nsIPKCS11Slot.idl \
.\nsIPK11TokenDB.idl \
.\nsINSSDialogs.idl \
$(NULL) $(NULL)

Просмотреть файл

@ -0,0 +1,88 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Terry Hayes <thayes@netscape.com>
*/
#include "nsISupports.idl"
#include "nsIEnumerator.idl"
/**
* The PK11 Token Database provides access to the PK11 modules
* that are installed, and the tokens that are available.
* Interfaces: nsIPK11TokenDB
* Threading: ??
*/
%{C++
#define NS_PK11TOKENDB_CONTRACTID "thayes@netscape.com/pk11tokendb;1"
%}
[scriptable, uuid(51191434-1dd2-11b2-a17c-e49c4e99a4e3)]
interface nsIPK11Token : nsISupports
{
/*
* The name of the token
*/
readonly attribute wstring tokenName;
/*
* Login information
*/
boolean isLoggedIn();
void logout();
/*
* Password information
*/
readonly attribute long minimumPasswordLength;
readonly attribute boolean needsUserInit;
boolean checkPassword(in wstring password); /* Logs out if check fails */
void initPassword(in wstring initialPassword);
void changePassword(in wstring oldPassword, in wstring newPassword);
/*
* Other attributes
*/
boolean isHardwareToken();
boolean needsLogin();
boolean isFriendly();
};
/**
* nsIPK11TokenDB - Manages PK11 Tokens
*/
[scriptable, uuid(4ee28c82-1dd2-11b2-aabf-bb4017abe395)]
interface nsIPK11TokenDB : nsISupports
{
/*
* Get the internal key database token
*/
nsIPK11Token getInternalKeyToken();
/*
* Find a token by name
*/
nsIPK11Token findTokenByName(in wstring tokenName);
/*
* List all tokens
*/
nsIEnumerator listTokens();
};