1999-07-15 23:23:16 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
|
|
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
|
|
|
* http://www.mozilla.org/NPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* NPL.
|
|
|
|
*
|
|
|
|
* The Initial Developer of this code under the NPL is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
|
|
|
* Reserved.
|
|
|
|
*/
|
1999-08-06 22:44:35 +00:00
|
|
|
/*defines interfaces for codebase and certificate principals*/
|
1999-07-15 23:23:16 +00:00
|
|
|
#include "nsISupports.idl"
|
1999-07-24 03:58:23 +00:00
|
|
|
|
1999-07-15 23:23:16 +00:00
|
|
|
[uuid(ff9313d0-25e1-11d2-8160-006008119d7a)]
|
|
|
|
interface nsIPrincipal : nsISupports {
|
1999-08-01 21:26:02 +00:00
|
|
|
const short PrincipalType_Unknown=0;
|
1999-07-24 03:58:23 +00:00
|
|
|
const short PrincipalType_CodebaseExact=1;
|
|
|
|
const short PrincipalType_CodebaseRegex=2;
|
|
|
|
const short PrincipalType_Certificate=3;
|
|
|
|
const short PrincipalType_CertificateFingerPrint=4;
|
|
|
|
const short PrincipalType_CertificateKey=5;
|
|
|
|
const short PrincipalType_CertificateChain=6;
|
|
|
|
|
|
|
|
void GetType(out short type);
|
|
|
|
void IsSecure(out boolean result);
|
|
|
|
void ToString(out string result);
|
|
|
|
void HashCode(out unsigned long code);
|
|
|
|
void Equals(in nsIPrincipal other, out boolean result);
|
|
|
|
};
|
|
|
|
|
|
|
|
[uuid(c29fe440-25e1-11d2-8160-006008119d7a)]
|
|
|
|
interface nsICodebasePrincipal : nsIPrincipal {
|
|
|
|
void GetURL(out string ppCodeBaseURL);
|
|
|
|
void IsCodebaseExact(out boolean result);
|
|
|
|
void IsCodebaseRegex(out boolean result);
|
1999-07-15 23:23:16 +00:00
|
|
|
};
|
|
|
|
|
1999-07-24 03:58:23 +00:00
|
|
|
[uuid(ebfefcd0-25e1-11d2-8160-006008119d7a)]
|
|
|
|
interface nsICertificatePrincipal : nsIPrincipal {
|
1999-08-01 21:26:02 +00:00
|
|
|
void GetPublicKey(out string publicKey);
|
1999-07-24 03:58:23 +00:00
|
|
|
void GetCompanyName(out string ppCompanyName);
|
|
|
|
void GetCertificateAuthority(out string ppCertAuthority);
|
|
|
|
void GetSerialNumber(out string ppSerialNumber);
|
|
|
|
void GetExpirationDate(out string ppExpDate);
|
|
|
|
void GetFingerPrint(out string ppFingerPrint);
|
1999-07-27 23:27:44 +00:00
|
|
|
};
|