Remove an abandoned approach
authorMark Donnelly <mark@painless-security.com>
Mon, 23 Dec 2013 20:55:23 +0000 (15:55 -0500)
committerMark Donnelly <mark@painless-security.com>
Mon, 23 Dec 2013 20:55:23 +0000 (15:55 -0500)
npapi/CMakeLists.txt [deleted file]
npapi/Win/CMakeLists.txt [deleted file]
npapi/Win/dllmain.c [deleted file]
npapi/js_gss_api.c [deleted file]
npapi/npapi.c [deleted file]
npapi/npapiplugin.cpp [deleted file]
npapi/npapiplugin.h [deleted file]
npapi/test.html [deleted file]

diff --git a/npapi/CMakeLists.txt b/npapi/CMakeLists.txt
deleted file mode 100644 (file)
index b7a3391..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-cmake_minimum_required (VERSION 2.8)
-
-project (GSSWeb)
-
-#include_directories ("${PROJECT_SOURCE_DIR}/Win")
-#add_subdirectory (Win) 
-
-# add the library
-add_library (GSSWeb SHARED npapiplugin.cpp js_gss_api.c npapi.c)
-#target_link_libraries (GSSWeb Win)
diff --git a/npapi/Win/CMakeLists.txt b/npapi/Win/CMakeLists.txt
deleted file mode 100644 (file)
index 7dabfde..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-add_library (Win dllmain.c)
diff --git a/npapi/Win/dllmain.c b/npapi/Win/dllmain.c
deleted file mode 100644 (file)
index 6e7959d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2013, Painless Security, LLC
- * For license details please see the LICENSE file in RAILS_ROOT.
- */
-
-#include "stdafx.h"
-
-BOOL APIENTRY DllMain( HMODULE hModule,
-                       DWORD  ul_reason_for_call,
-                       LPVOID lpReserved
-                                        )
-{
-       switch (ul_reason_for_call)
-       {
-       case DLL_PROCESS_ATTACH:
-       case DLL_THREAD_ATTACH:
-       case DLL_THREAD_DETACH:
-       case DLL_PROCESS_DETACH:
-               break;
-       }
-       return TRUE;
-}
-
diff --git a/npapi/js_gss_api.c b/npapi/js_gss_api.c
deleted file mode 100644 (file)
index 8f1ec0e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-void example(void)
-{
-  return;
-}
diff --git a/npapi/npapi.c b/npapi/npapi.c
deleted file mode 100644 (file)
index 165d1d1..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stddef.h>
-#include <firefox/npapi.h>
-#include <firefox/nptypes.h>
-#include <firefox/npfunctions.h>
-
-/*
- * Loading and unloading the library 
- */
-NPError NP_Initialize(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *pFuncs)
-{
-  
-  /*
-   * Setup - Ensure a sane environment
-   */  
-  if( pFuncs == NULL || 
-      pFuncs->size < sizeof(NPNetscapeFuncs) )
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  /*
-   * Main body:
-   *   Tell the browser about the API functions we implement
-   */
-  pFuncs->newp = NPP_New;
-  pFuncs->destroy = NPP_Destroy;
-  pFuncs->getvalue = NPP_GetValue;
-
-  return NPERR_NO_ERROR;
-}
-
-void NP_Shutdown(void)
-{
-  return;
-}
-
-/*
- * Create and destroy an instance of the plugin
- */
-NPError NPP_New(NPMIMEType    pluginType,
-                NPP instance, uint16_t mode,
-                int16_t argc, char *argn[],
-                char *argv[], NPSavedData *saved)
-{
-  return(NPERR_NO_ERROR);
-}
-
-NPError NPP_Destroy(NPP instance, NPSavedData **save)
-{
-  return(NPERR_NO_ERROR);
-}
-
-
-
-/*
- * Register the plugin for MIME type, and name, etc.
- */
-#define MIME_TYPES_DESCRIPTION "application/gss-web:gssw:Web plugin for the Moonshot GSS-EAP libraries"
-const char* NP_GetMIMEDescription(void)
-{
-  return(MIME_TYPES_DESCRIPTION);
-}
-
-NPError NP_GetValue(void *instance, 
-                    NPPVariable variable, 
-                    void *value)
-{
-  // fprintf(stderr, "Called NP_GetValue with variable: %i\n", variable);
-  
-  switch(variable)
-  {
-  case NPPVpluginNameString:
-    *((char **)value) = "GSS-web Plugin\0";
-    break;
-  case NPPVpluginDescriptionString:
-    *((char **)value) = "This plugin facilitates identification of you and authorization to access web resources using GSS-EAP, a standards-compliant mechanism for establishing an identity and access rights within a sophisticated organization.\0";
-    break;
-  default:
-    return NPERR_GENERIC_ERROR;
-  }
-  
-  return NPERR_NO_ERROR;
-}
-
-NPError NPP_GetValue(NPP instance,
-                    NPPVariable variable,
-                    void *value)
-{
-  switch(variable)
-  {
-    case NPPVpluginScriptableNPObject:
-      fprintf(stderr, "Received the scriptable object call!\n");
-      //value = NPN_CreateObject(instance, )
-      break;
-  }
-  fprintf(stderr, "Called NPP_GetValue with %i.\n", variable);
-  return NPERR_NO_ERROR;
-}
diff --git a/npapi/npapiplugin.cpp b/npapi/npapiplugin.cpp
deleted file mode 100644 (file)
index 90030a8..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2013 <copyright holder> <email>
- * 
- * For license details, see the LICENSE file in the root of this project.
- * 
- */
-
-#include "npapiplugin.h"
-
-
-NPAPIPlugin::NPAPIPlugin(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *pFuncs)
-{
-  /*
-   * Setup - Ensure a sane environment
-   */  
-  if( pFuncs == NULL || 
-      pFuncs->size < sizeof(NPNetscapeFuncs) )
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  /*
-   * Main body:
-   *   Tell the browser about the API functions we implement
-   */
-  pFuncs->newp = NPP_New;
-  pFuncs->destroy = NPP_Destroy;
-  pFuncs->getvalue = NPP_GetValue;
-
-  return NPERR_NO_ERROR;
-
-}
-
-NPAPIPlugin::~NPAPIPlugin(NPP instance, NPSavedData **save)
-{
-
-}
-
-
-/*
- * Create and destroy an instance of the plugin
- */
-NPError NPAPIPlugin::NPP_New(NPMIMEType    pluginType,
-                NPP instance, uint16_t mode,
-                int16_t argc, char *argn[],
-                char *argv[], NPSavedData *saved)
-{
-  return(NPERR_NO_ERROR);
-}
-
-NPError NPAPIPlugin::NPP_Destroy(NPP instance, NPSavedData **save)
-{
-  return(NPERR_NO_ERROR);
-}
-
-NPError NPAPIPlugin::NPP_GetValue(NPP instance,
-                     NPPVariable variable,
-                     void *value)
-{
-  switch(variable)
-  {
-    case NPPVpluginScriptableNPObject:
-      cerr << "Received the scriptable object call!\n";
-      //value = NPN_CreateObject(instance, )
-      break;
-  }
-  cerr << "Called NPP_GetValue with " << variable << ".\n";
-  return NPERR_NO_ERROR;
-}
diff --git a/npapi/npapiplugin.h b/npapi/npapiplugin.h
deleted file mode 100644 (file)
index 2f28e24..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2013 <copyright holder> <email>
- * 
- * For license details, see the LICENSE file in the root of this project.
- * 
- */
-
-#ifndef NPAPIPLUGIN_H
-#define NPAPIPLUGIN_H
-
-#include <firefox/npapi.h>
-
-class NPAPIPlugin
-{
-public:
-NPAPIPlugin(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *pFuncs);
-~NPAPIPlugin(NPP instance, NPSavedData **save);
-
-
-NPError NPP_New(NPMIMEType    pluginType,
-                NPP instance, uint16_t mode,
-                int16_t argc, char *argn[],
-                char *argv[], NPSavedData *saved);
-
-NPError NPP_Destroy(NPP instance, NPSavedData **save);
-
-NPError NPP_GetValue(NPP instance,
-                     NPPVariable variable,
-                     void *value);
-
-
-};
-
-#endif // NPAPIPLUGIN_H
diff --git a/npapi/test.html b/npapi/test.html
deleted file mode 100644 (file)
index 679b05c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-  <body>
-    <embed type="application/gss-web">
-    <script>
-      var embed = document.embeds[0];
-      embed.nativeMethod();
-      alert(embed.nativeProperty);
-      embed.nativeProperty.anotherNativeMethod();
-    </script>
-  </body>
-</html>
\ No newline at end of file