From e450c541b4e98345cc21745dfd6bb68e5edb37da Mon Sep 17 00:00:00 2001 From: "javi%netscape.com" Date: Tue, 30 Jan 2001 18:34:22 +0000 Subject: [PATCH] Add first cut at exportable interfaces. --- security/manager/ssl/public/Makefile.in | 54 ++++++++++++++++ security/manager/ssl/public/makefile.win | 61 +++++++++++++++++++ .../manager/ssl/public/nsIBadCertListener.idl | 52 ++++++++++++++++ security/manager/ssl/public/nsICertSelect.idl | 47 ++++++++++++++ security/manager/ssl/public/nsIPKCS11Slot.idl | 44 +++++++++++++ security/manager/ssl/public/nsIX509Cert.idl | 44 +++++++++++++ security/manager/ssl/public/nsIX509CertDB.idl | 44 +++++++++++++ 7 files changed, 346 insertions(+) create mode 100644 security/manager/ssl/public/Makefile.in create mode 100644 security/manager/ssl/public/makefile.win create mode 100644 security/manager/ssl/public/nsIBadCertListener.idl create mode 100644 security/manager/ssl/public/nsICertSelect.idl create mode 100644 security/manager/ssl/public/nsIPKCS11Slot.idl create mode 100644 security/manager/ssl/public/nsIX509Cert.idl create mode 100644 security/manager/ssl/public/nsIX509CertDB.idl diff --git a/security/manager/ssl/public/Makefile.in b/security/manager/ssl/public/Makefile.in new file mode 100644 index 00000000000..bbb5eed9ce0 --- /dev/null +++ b/security/manager/ssl/public/Makefile.in @@ -0,0 +1,54 @@ +# +# The contents of this file are subject to the Netscape 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/NPL/ +# +# 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) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# Brian Ryner +# Javier Delgadillo +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +MODULE = pipnss + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +XPIDLSRCS = \ + nsIBadCertListener.idl \ + nsICertSelect.idl \ + nsIX509Cert.idl \ + nsIX509CertDB.idl \ + nsISecureDevicePrompt.idl \ + nsIPKCS11Slot.idl \ + $(NULL) + +include $(topsrcdir)/config/rules.mk diff --git a/security/manager/ssl/public/makefile.win b/security/manager/ssl/public/makefile.win new file mode 100644 index 00000000000..75bcc2a15f9 --- /dev/null +++ b/security/manager/ssl/public/makefile.win @@ -0,0 +1,61 @@ +#!nmake +# +# The contents of this file are subject to the Netscape 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/NPL/ +# +# 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) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# Javier Delgadillo +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +MODULE = pipnss + +DEPTH=..\..\..\.. +IGNORE_MANIFEST=1 + +DLLNAME = pipnss +PDBFILE = $(DLLNAME).pdb +MAPFILE = $(DLLNAME).map +DLL = .\$(OBJDIR)\$(DLLNAME).dll +MAKE_OBJ_TYPE = DLL + +include <$(DEPTH)/config/config.mak> + +XPIDL_INCLUDES=-I$(DEPTH)\dist\idl + +XPIDLSRCS= \ + .\nsIBadCertListener.idl \ + .\nsICertSelect.idl \ + .\nsIX509Cert.idl \ + .\nsIX509CertDB.idl \ + .\nsISecureDevicePrompt.idl \ + .\nsIPKCS11Slot.idl \ + $(NULL) + + +include <$(DEPTH)\config\rules.mak> diff --git a/security/manager/ssl/public/nsIBadCertListener.idl b/security/manager/ssl/public/nsIBadCertListener.idl new file mode 100644 index 00000000000..16f24db6127 --- /dev/null +++ b/security/manager/ssl/public/nsIBadCertListener.idl @@ -0,0 +1,52 @@ +/* -*- 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) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#include "nsISupports.idl" + +interface nsIX509Cert; +interface nsIChannelSecurityInfo; + +[scriptable, uuid(86960956-edb0-11d4-998b-00b0d02354a0)] +interface nsIBadCertListener : nsISupports { + boolean unknownIssuer(in nsIChannelSecurityInfo socketInfo, + in nsIX509Cert cert); + + boolean mismatchDomain(in nsIChannelSecurityInfo socketInfo, + in nsIX509Cert cert); + + boolean certExpired(in nsIChannelSecurityInfo socketInfo, + in nsIX509Cert cert); +}; + diff --git a/security/manager/ssl/public/nsICertSelect.idl b/security/manager/ssl/public/nsICertSelect.idl new file mode 100644 index 00000000000..2110d7369f5 --- /dev/null +++ b/security/manager/ssl/public/nsICertSelect.idl @@ -0,0 +1,47 @@ +/* -*- 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) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#include "nsISupports.idl" + +interface nsIX509Cert; +interface nsIChannelSecurityInfo; + +[scriptable, uuid(3cac403c-edb3-11d4-998b-00b0d02354a0)] +interface nsICertSelect : nsISupports { + nsIX509Cert selectClientAuthCert(in nsIChannelSecurityInfo socketInfo, + in PRUint32 count, + [array, size_is(count)] in nsIX509Cert certs); +}; + diff --git a/security/manager/ssl/public/nsIPKCS11Slot.idl b/security/manager/ssl/public/nsIPKCS11Slot.idl new file mode 100644 index 00000000000..8637d82d6b5 --- /dev/null +++ b/security/manager/ssl/public/nsIPKCS11Slot.idl @@ -0,0 +1,44 @@ +/* -*- 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) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#include "nsISupports.idl" + +[scriptable, uuid(c2d4f296-ee60-11d4-998b-00b0d02354a0)] +interface nsIPKCS11Slot : nsISupports { + /* + * We'l add methods as we need them. + */ +}; + diff --git a/security/manager/ssl/public/nsIX509Cert.idl b/security/manager/ssl/public/nsIX509Cert.idl new file mode 100644 index 00000000000..06c60b79bdc --- /dev/null +++ b/security/manager/ssl/public/nsIX509Cert.idl @@ -0,0 +1,44 @@ +/* -*- 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) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#include "nsISupports.idl" + +[scriptable, uuid(f0980f60-ee3d-11d4-998b-00b0d02354a0)] +interface nsIX509Cert : nsISupports { + /* + * We'l add methods as we need them. + */ +}; + diff --git a/security/manager/ssl/public/nsIX509CertDB.idl b/security/manager/ssl/public/nsIX509CertDB.idl new file mode 100644 index 00000000000..c01ff29b39e --- /dev/null +++ b/security/manager/ssl/public/nsIX509CertDB.idl @@ -0,0 +1,44 @@ +/* -*- 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) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#include "nsISupports.idl" + +[scriptable, uuid(a5b8fb1a-ee62-11d4-998b-00b0d02354a0)] +interface nsIX509CertDB : nsISupports { + /* + * We'l add methods as we need them. + */ +}; +