major source structure and module name changes

This commit is contained in:
soochoi
2006-06-07 16:34:19 +00:00
parent 5c75241b4b
commit 1fa6f07e83
651 changed files with 0 additions and 0 deletions

34
jwrapper/Makefile.am Normal file
View File

@@ -0,0 +1,34 @@
#######################################################################
#
# Copyright (C) 2006 Novell, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
#######################################################################
SUBDIRS = src jnsscs
DIST_SUBDIRS = src jnsscs
EXTRA_DIST = c_jwrapper*
.PHONY: package package-clean package-install package-uninstall
package package-clean package-install package-uninstall:
$(MAKE) -C $(TARGET_OS) $@
maintainer-clean-local:
rm -f Makefile.in

109
jwrapper/c_jwrapper.ipr Normal file
View File

@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="3" relativePaths="false">
<component name="ProjectRootManager" version="2">
<jdk name="java version &quot;1.4.1_01&quot;" />
<projectPath>
<root type="composite">
<root type="simple" url="file://$PROJECT_DIR$" />
</root>
</projectPath>
<sourcePath>
<root type="composite">
<root type="simple" url="file://$PROJECT_DIR$/src" />
<root type="jdk" rootType="sourcePath" name="java version &quot;1.4.1_01&quot;" />
</root>
</sourcePath>
<classPath>
<root type="composite">
<root type="output" />
<root type="jdk" rootType="classPath" name="java version &quot;1.4.1_01&quot;" />
</root>
</classPath>
<excludePath>
<root type="composite">
<root type="excludedOutput" />
</root>
</excludePath>
<javadocPath>
<root type="composite">
<root type="jdk" rootType="javadocPath" name="java version &quot;1.4.1_01&quot;" />
</root>
</javadocPath>
<assert_keyword enabled="no" />
<exclude_output enabled="yes" />
</component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<option name="SYNCHRONIZE_OUTPUT_DIRECTORY" value="false" />
<option name="DEFAULT_OUTPUT_PATH" value="$PROJECT_DIR$/classes" />
<option name="OUTPUT_MODE" value="single" />
<resourceExtensions>
<entry name=".+\.(properties|xml|html)" />
<entry name=".+\.(gif|png|jpeg|jpg)" />
</resourceExtensions>
</component>
<component name="JavacSettings">
<option name="DEBUGGING_INFO" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="DEPRECATION" value="true" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
<option name="MAXIMUM_HEAP_SIZE" value="128" />
</component>
<component name="JikesSettings">
<option name="JIKES_PATH" value="" />
<option name="DEBUGGING_INFO" value="true" />
<option name="DEPRECATION" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="GENERATE_MAKE_FILE_DEPENDENCIES" value="false" />
<option name="DO_FULL_DEPENDENCE_CHECK" value="false" />
<option name="IS_EMACS_ERRORS_MODE" value="true" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
</component>
<component name="AntConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" />
<option name="OPTION_SCOPE" value="protected" />
<option name="OPTION_HIERARCHY" value="true" />
<option name="OPTION_NAVIGATOR" value="true" />
<option name="OPTION_INDEX" value="true" />
<option name="OPTION_SEPARATE_INDEX" value="true" />
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
<option name="OPTION_DEPRECATED_LIST" value="true" />
<option name="OTHER_OPTIONS" value="" />
<option name="HEAP_SIZE" />
<option name="OPEN_IN_BROWSER" value="true" />
</component>
<component name="WebManager">
<option enabled="false" />
</component>
<component name="WebRootContainer" />
<component name="EjbManager" enabled="false" />
<component name="JUnitProjectSettings">
<option name="TEST_RUNNER" value="UI" />
</component>
<component name="EntryPointsManager">
<entry_points />
</component>
<component name="EjbActionsConfiguration">
<option name="NEW_MESSAGE_BEAN_LAST_PACKAGE" value="" />
<option name="NEW_ENTITY_BEAN_LAST_PACKAGE" value="" />
<option name="NEW_SESSION_BEAN_LAST_PACKAGE" value="" />
</component>
<component name="CodeStyleManager">
<option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" />
<option name="CODE_STYLE_SCHEME" value="Default" />
</component>
<component name="ExportToHTMLSettings">
<option name="PRINT_LINE_NUMBERS" value="false" />
<option name="OPEN_IN_BROWSER" value="false" />
<option name="OUTPUT_DIRECTORY" />
</component>
<component name="WebReferencesManager" />
</project>

510
jwrapper/c_jwrapper.iws Normal file
View File

@@ -0,0 +1,510 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="3" relativePaths="false">
<component name="WebReferencesConfigurable">
<property name="CUSTOM_MAP_LOOKUP" type="list" />
<property name="INTERFACE_POSTFIX" value="" type="string" />
<property name="electric.home" value="/electric" type="string" />
<property name="INTERFACE_PREFIX" value="I" type="string" />
<property name="INCLUDE_SYSTEM_MAP" value="true" type="boolean" />
<property name="THROW_EXCEPTIONS" value="false" type="boolean" />
<property name="ENABLED" value="false" type="boolean" />
</component>
<component name="FileEditorManager">
<history>
<source-position-entry url="jar://D:/ccm/iMan202_FPx/iManager/tools/jdk/jre/lib/rt.jar!/java/lang/String.class" line="12" column="19" vertical-scroll-proportion="0.20307167" horizontal-scroll-proportion="0.15182649" />
<source-position-entry url="file://$PROJECT_DIR$/src/com/novell/casa/MiCasa.java" line="0" column="47" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.33952528" />
<source-position-entry url="file://$PROJECT_DIR$/src/com/novell/casa/NetCredential.java" line="24" column="67" vertical-scroll-proportion="0.48056537" horizontal-scroll-proportion="0.48400414" />
<source-position-entry url="file://$PROJECT_DIR$/src/com/novell/casa/MiCasaTest.java" line="33" column="0" vertical-scroll-proportion="0.6607774" horizontal-scroll-proportion="0.0" />
</history>
<open-files>
<source-position-entry url="file://$PROJECT_DIR$/src/com/novell/casa/MiCasa.java" line="0" column="47" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.33952528" />
<source-position-entry url="file://$PROJECT_DIR$/src/com/novell/casa/MiCasaTest.java" line="33" column="0" vertical-scroll-proportion="0.6607774" horizontal-scroll-proportion="0.0" selected="true" />
<source-position-entry url="file://$PROJECT_DIR$/src/com/novell/casa/NetCredential.java" line="24" column="67" vertical-scroll-proportion="0.48056537" horizontal-scroll-proportion="0.48400414" />
</open-files>
</component>
<component name="ToolWindowManager">
<frame x="-4" y="-4" width="1408" height="1028" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.29646522" order="2" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32930845" order="7" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" />
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.23736264" order="0" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.26086956" order="3" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3295325" order="1" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="true" internal_type="sliding" type="sliding" visible="false" weight="0.32930845" order="8" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="6" />
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="5" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="0" />
<window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="4" />
</layout>
</component>
<component name="Debugger">
<line_breakpoints>
<breakpoint url="file://$PROJECT_DIR$/src/com/novell/casa/MiCasaTest.java" line="20">
<option name="ENABLED" value="true" />
<option name="SUSPEND_VM" value="true" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CONDITION" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="LOG_MESSAGE" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INVERSE_CLASS_FILLTERS" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
</breakpoint>
<breakpoint url="file://$PROJECT_DIR$/src/com/novell/casa/MiCasaTest.java" line="33">
<option name="ENABLED" value="true" />
<option name="SUSPEND_VM" value="true" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CONDITION" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="LOG_MESSAGE" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INVERSE_CLASS_FILLTERS" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
</breakpoint>
</line_breakpoints>
<exception_breakpoints>
<breakpoint_any>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<option name="SUSPEND_VM" value="true" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CONDITION" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="LOG_MESSAGE" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INVERSE_CLASS_FILLTERS" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
</breakpoint_any>
</exception_breakpoints>
<field_breakpoints />
<method_breakpoints />
</component>
<component name="DebuggerManager">
<watch_expression value="s" />
<watch_expression value="sSecretID" />
<watch_expression value="lSecretHandle" />
<watch_expression value="secret" />
<watch_expression value="m_lSecretHandle" />
<watch_expression value="nc" />
<watch_expression value="netCred" />
</component>
<component name="DebuggerSettings">
<option name="TRACING_FILTERS_ENABLED" value="true" />
<option name="TOSTRING_CLASSES_ENABLED" value="false" />
<option name="VALUE_LOOKUP_DELAY" value="700" />
<option name="DEBUGGER_TRANSPORT" value="0" />
<option name="FORCE_CLASSIC_VM" value="true" />
<option name="HIDE_DEBUGGER_ON_PROCESS_TERMINATION" value="false" />
<option name="SKIP_SYNTHETIC_METHODS" value="true" />
<option name="SKIP_CONSTRUCTORS" value="false" />
<option name="STEP_THREAD_SUSPEND_POLICY" value="SuspendThread" />
<default_breakpoint_settings>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="WATCH_MODIFICATION" value="true" />
<option name="WATCH_ACCESS" value="true" />
<option name="WATCH_ENTRY" value="true" />
<option name="WATCH_EXIT" value="true" />
<option name="ENABLED" value="true" />
<option name="SUSPEND_VM" value="true" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CONDITION" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="LOG_MESSAGE" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INVERSE_CLASS_FILLTERS" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
</default_breakpoint_settings>
<filter>
<option name="PATTERN" value="com.sun.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="java.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="javax.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="org.omg.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="sun.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="junit.*" />
<option name="ENABLED" value="true" />
</filter>
</component>
<component name="CompilerWorkspaceConfiguration">
<option name="COMPILE_IN_BACKGROUND" value="false" />
<option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" />
</component>
<component name="ErrorTreeViewConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="HIDE_WARNINGS" value="false" />
</component>
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="StructureViewFactory">
<option name="SORT_MODE" value="0" />
<option name="GROUP_OVERRIDINGS" value="true" />
<option name="GROUP_IMPLEMENTINGS" value="true" />
<option name="AUTOSCROLL_MODE" value="true" />
<option name="SHOW_METHODS" value="true" />
<option name="SHOW_FIELDS" value="true" />
<option name="AUTOSCROLL_FROM_SOURCE" value="false" />
<option name="GROUP_GETTERS_AND_SETTERS" value="true" />
</component>
<component name="CvsConfiguration">
<Checkout>
<option name="DATE_TAG" value="" />
<option name="REVISION_TAG" value="" />
<option name="PRUNE_EMPTY_DIRS" value="true" />
<option name="RESET_STICKY_TAGS" value="false" />
<option name="NON_RECURSIVE" value="false" />
<option name="CREATE_WORKING_DIR" value="" />
<option name="ADDITIONAL_OPTIONS" value="" />
</Checkout>
<Update>
<option name="DATE_TAG" value="" />
<option name="REVISION_TAG" value="" />
<option name="PRUNE_EMPTY_DIRS" value="true" />
<option name="RESET_STICKY_TAGS" value="false" />
<option name="NON_RECURSIVE" value="false" />
<option name="CREATE_MISSING_DIRECTORIES" value="true" />
<option name="DONT_CHANGE_FILES" value="false" />
<option name="QUIET_MODE" value="false" />
<option name="ADDITIONAL_OPTIONS" value="" />
</Update>
<Commit>
<option name="NON_RECURSIVE" value="false" />
<option name="REVISION_TAG" value="" />
<option name="LOG_MESSAGE" value="" />
<option name="ADDITIONAL_OPTIONS" value="" />
</Commit>
<Diff>
<option name="REVISION_TAG" value="HEAD" />
<option name="DATE_TAG" value="" />
<option name="IGNORE_WHITESPACE" value="false" />
</Diff>
<Add>
<option name="ADD_AS_BINARY" value="false" />
<option name="LOG_MESSAGE" value="" />
</Add>
<Status>
<option name="NON_RECURSIVE" value="false" />
<option name="INCLUDE_TAGS" value="false" />
</Status>
<Edit>
<option name="NON_RECURSIVE" value="false" />
<option name="FORCE_RECURSIVE" value="false" />
<option name="EDIT" value="false" />
<option name="UNEDIT" value="false" />
<option name="COMMIT" value="false" />
<option name="ALL" value="true" />
<option name="NONE" value="false" />
</Edit>
<Remove>
<option name="NON_RECURSIVE" value="false" />
<option name="FORCE_RECURSIVE" value="false" />
<option name="DELETE_FILE" value="false" />
</Remove>
<Log>
<option name="DEFAULT_BRANCH" value="false" />
<option name="NON_RECURSIVE" value="false" />
<option name="QUIET_MODE" value="true" />
<option name="ADDITIONAL_OPTIONS" value="" />
</Log>
<Editors>
<option name="NON_RECURSIVE" value="false" />
<option name="FORCE_RECURSIVE" value="false" />
</Editors>
<option name="CLIENT_PATH" value="" />
<option name="EXTERNAL_DIFF_PATH" />
<option name="USE_EXTERNAL_DIFF" value="false" />
<option name="WORKING_FILES_READONLY" value="false" />
<option name="COMPRESSION_LEVEL" value="0" />
<option name="ADDITIONAL_OPTIONS" value="" />
<option name="BINARY_FILES_EXTENSIONS" />
<option name="REUSE_LAST_LOG_MESSAGE" value="false" />
<option name="PUT_FOCUS_INTO_LOG_MESSAGE" value="false" />
<option name="SHOW_UPDATE_OPTIONS" value="true" />
<option name="SHOW_COMMIT_OPTIONS" value="true" />
<option name="SHOW_DIFF_OPTIONS" value="true" />
<option name="SHOW_ADD_OPTIONS" value="true" />
<option name="SHOW_STATUS_OPTIONS" value="true" />
<option name="SHOW_EDIT_OPTIONS" value="true" />
<option name="SHOW_UNEDIT_OPTIONS" value="true" />
<option name="SHOW_REMOVE_OPTIONS" value="true" />
<option name="SHOW_LOG_OPTIONS" value="true" />
<option name="SHOW_EDITORS_OPTIONS" value="true" />
<option name="HIDE_UNKNOWN_FILES" value="false" />
<option name="HIDE_MISSING_FILES" value="false" />
<option name="HIDE_UP_TO_DATE_FILES" value="false" />
</component>
<component name="CvsVcs">
<expanded_paths />
</component>
<component name="ProjectViewSettings">
<navigator currentView="ProjectPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" />
<view id="ProjectPane">
<expanded_node type="directory" url="file://$PROJECT_DIR$" />
<expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/com/novell/casa" />
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/com" />
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/com/novell" />
</view>
<view id="SourcepathPane">
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/com" />
<expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
</view>
<view id="ClasspathPane" />
</component>
<component name="RunManager">
<option name="SHOW_SETTINGS_BEFORE_RUNNING" value="false" />
<option name="COMPILE_BEFORE_RUNNING" value="true" />
<activeType name="Application" />
<configuration name="&lt;template&gt;" type="Application" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
</configuration>
<configuration name="&lt;template&gt;" type="Applet" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
</configuration>
<configuration name="&lt;template&gt;" type="JUnit" default="true" selected="false">
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
</configuration>
<configuration name="&lt;template&gt;" type="Remote" default="true" selected="false">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<WebServerIntegration name="" />
<Host>localhost</Host>
<Port>5050</Port>
<LaunchServer>false</LaunchServer>
</configuration>
<configuration name="Unnamed" type="Application" default="false" selected="true">
<option name="MAIN_CLASS_NAME" value="com.novell.casa.MiCasaTest" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
</configuration>
</component>
<component name="BookmarkManager" />
<component name="Commander">
<leftPanel view="Project" />
<rightPanel view="Project" />
<splitter proportion="0.5" />
</component>
<component name="PropertiesComponent">
<property name="MemberChooser.copyJavadoc" value="false" />
<property name="GoToClass.includeLibraries" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="MemberChooser.sorted" value="false" />
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
</component>
<component name="SelectInManager" />
<component name="VssConfiguration">
<CheckoutOptions>
<option name="COMMENT" value="" />
<option name="DO_NOT_GET_LATEST_VERSION" value="false" />
<option name="REPLACE_WRITABLE" value="false" />
<option name="RECURSIVE" value="false" />
</CheckoutOptions>
<CheckinOptions>
<option name="COMMENT" value="" />
<option name="KEEP_CHECKED_OUT" value="false" />
<option name="RECURSIVE" value="false" />
</CheckinOptions>
<AddOptions>
<option name="COMMENT" value="" />
<option name="STORE_ONLY_LATEST_VERSION" value="false" />
<option name="CHECK_OUT_IMMEDIATELY" value="false" />
<option name="FILE_TYPE" value="0" />
</AddOptions>
<UndocheckoutOptions>
<option name="MAKE_WRITABLE" value="false" />
<option name="REPLACE_LOCAL_COPY" value="0" />
<option name="RECURSIVE" value="false" />
</UndocheckoutOptions>
<DiffOptions>
<option name="IGNORE_WHITE_SPACE" value="false" />
<option name="IGNORE_CASE" value="false" />
</DiffOptions>
<GetOptions>
<option name="REPLACE_WRITABLE" value="0" />
<option name="MAKE_WRITABLE" value="false" />
<option name="RECURSIVE" value="false" />
</GetOptions>
<option name="CLIENT_PATH" value="" />
<option name="SRCSAFEINI_PATH" value="" />
<option name="USER_NAME" value="" />
<option name="PWD" value="" />
<option name="SHOW_CHECKOUT_OPTIONS" value="true" />
<option name="SHOW_CHECKIN_OPTIONS" value="true" />
<option name="SHOW_ADD_OPTIONS" value="true" />
<option name="SHOW_UNDOCHECKOUT_OPTIONS" value="true" />
<option name="SHOW_DIFF_OPTIONS" value="true" />
<option name="SHOW_GET_OPTIONS" value="true" />
<option name="USE_EXTERNAL_DIFF" value="false" />
<option name="EXTERNAL_DIFF_PATH" value="" />
<option name="REUSE_LAST_COMMENT" value="false" />
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
</component>
<component name="HierarchyBrowserManager">
<option name="SHOW_PACKAGES" value="false" />
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="SORT_ALPHABETICALLY" value="false" />
</component>
<component name="WebViewSettings">
<webview flattenPackages="false" showMembers="false" autoscrollToSource="false" />
</component>
<component name="EjbViewSettings">
<EjbView showMembers="false" autoscrollToSource="false" />
</component>
<component name="LvcsConfiguration">
<option name="LOCAL_VCS_ENABLED" value="true" />
<option name="LOCAL_VCS_PURGING_PERIOD" value="259200000" />
<option name="ADD_LABEL_ON_PROJECT_OPEN" value="true" />
<option name="ADD_LABEL_ON_PROJECT_COMPILATION" value="true" />
<option name="ADD_LABEL_ON_FILE_PACKAGE_COMPILATION" value="true" />
<option name="ADD_LABEL_ON_PROJECT_MAKE" value="true" />
<option name="ADD_LABEL_ON_RUNNING" value="true" />
<option name="ADD_LABEL_ON_DEBUGGING" value="true" />
<option name="ADD_LABEL_ON_UNIT_TEST" value="true" />
<option name="MARK_EXTERNAL_CHANGES_AS_UP_TO_DATE" value="true" />
</component>
<component name="InspectionManager">
<option name="AUTOSCROLL_TO_SOURCE" value="false" />
<option name="SPLITTER_PROPORTION" value="0.5" />
<inspection_tool class="Unused declaration" enabled="false">
<option name="ADD_MAINS_TO_ENTRIES" value="true" />
<option name="ADD_JUNIT_TO_ENTRIES" value="true" />
<option name="ADD_EJB_TO_ENTRIES" value="true" />
<option name="ADD_APPLET_TO_ENTRIES" value="true" />
<option name="ADD_SERVLET_TO_ENTRIES" value="true" />
<option name="ADD_NONJAVA_TO_ENTRIES" value="true" />
</inspection_tool>
<inspection_tool class="Declaration access can be weaker" enabled="false">
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="true" />
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="false" />
</inspection_tool>
<inspection_tool class="Declaration can have static modifier" enabled="false" />
<inspection_tool class="Declaration can have final modifier" enabled="false">
<option name="REPORT_CLASSES" value="true" />
<option name="REPORT_METHODS" value="true" />
<option name="REPORT_FIELDS" value="true" />
</inspection_tool>
<inspection_tool class="Unused method parameters" enabled="false" />
<inspection_tool class="Actual method parameter is the same constant" enabled="false" />
<inspection_tool class="Unused method return value" enabled="false" />
<inspection_tool class="Method returns the same value" enabled="false" />
<inspection_tool class="Empty method" enabled="false" />
<inspection_tool class="Redundant throws clause" enabled="false" />
<inspection_tool class="Constant conditions &amp; exceptions" enabled="false" />
<inspection_tool class="Unused assignment" enabled="false" />
<inspection_tool class="Redundant type cast" enabled="false" />
<inspection_tool class="Local variable or parameter can be final" enabled="false">
<option name="REPORT_VARIABLES" value="true" />
<option name="REPORT_PARAMETERS" value="true" />
</inspection_tool>
<inspection_tool class="Declaration has javadoc problems" enabled="false">
<option name="TOP_LEVEL_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="public" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="INNER_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="protected" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="METHOD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="protected" />
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
</value>
</option>
<option name="FIELD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="protected" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
</inspection_tool>
<inspection_tool class="Deprecated API usage" enabled="false" />
<inspection_tool class="equals() and hashCode() not paired" enabled="false" />
</component>
<component name="TodoView" selected-index="0">
<todo-panel id="selected-file">
<are-packages-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="all">
<are-packages-shown value="true" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="true" />
</todo-panel>
</component>
<component name="VcsManagerConfiguration">
<option name="ACTIVE_VCS_NAME" value="" />
</component>
<component name="StarteamConfiguration">
<option name="SERVER" value="" />
<option name="PORT" value="49201" />
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="PROJECT" value="" />
<option name="VIEW" value="" />
<option name="ALTERNATIVE_WORKING_PATH" value="" />
</component>
</project>

View File

@@ -0,0 +1,34 @@
#######################################################################
#
# Copyright (C) 2006 Novell, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
#######################################################################
SUBDIRS = $(TARGET_OS)
DIST_SUBDIRS = linux
EXTRA_DIST = *.c jnsscs*
.PHONY: package package-clean package-install package-uninstall
package package-clean package-install package-uninstall:
$(MAKE) -C $(TARGET_OS) $@
maintainer-clean-local:
rm -f Makefile.in

253
jwrapper/jnsscs/jmicasa.c Normal file
View File

@@ -0,0 +1,253 @@
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
#include "com_novell_casa_MiCasa.h"
#include <jni.h>
#include <micasa.h>
#include <sscs_utf8.h>
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jint JNICALL
Java_com_novell_casa_MiCasa_jmiCASASetCredential
(JNIEnv *env, jobject notused,
jint ssFlags,
jstring jsAppSecretID,
jstring jsSharedSecretID,
jint jUsernameType,
jstring jsUsername,
jstring jsPassword
)
{
int rcode = 0;
SSCS_SECRET_ID_T appSecretId = {0};
SSCS_SECRET_ID_T sharedSecretId = {0};
SSCS_BASIC_CREDENTIAL credential = {0};
const char* utf_string;
jboolean isCopy;
utf_string = (*env)->GetStringUTFChars(env, jsAppSecretID, &isCopy);
sscs_Utf8Strcpy((char*)appSecretId.id, utf_string);
appSecretId.len = sscs_Utf8Strlen(utf_string) + 1;
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env,jsAppSecretID, utf_string);
// handle sharedsecretid
if (jsSharedSecretID)
{
utf_string = (*env)->GetStringUTFChars(env, jsSharedSecretID, &isCopy);
sscs_Utf8Strcpy((char*)sharedSecretId.id, utf_string);
sharedSecretId.len = sscs_Utf8Strlen(utf_string)+1;
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env, jsSharedSecretID, utf_string);
}
// setup credential
utf_string = (*env)->GetStringUTFChars(env, jsUsername, &isCopy);
sscs_Utf8Strcpy((char*)credential.username, utf_string);
credential.unLen = sscs_Utf8Strlen(utf_string)+1;
credential.unFlags = jUsernameType;
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env, jsUsername, utf_string);
// password
utf_string = (*env)->GetStringUTFChars(env, jsPassword, &isCopy);
sscs_Utf8Strcpy((char*)credential.password, utf_string);
credential.pwordLen = sscs_Utf8Strlen(utf_string)+1;
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env, jsPassword, utf_string);
// make the call
if (jsSharedSecretID)
rcode = miCASASetCredential(
ssFlags,
&appSecretId,
&sharedSecretId,
jUsernameType,
&credential,
NULL
);
else
rcode = miCASASetCredential(
ssFlags,
&appSecretId,
NULL,
jUsernameType,
&credential,
NULL
);
return rcode;
}
/*
* Class: com_novell_casa_micasa_SecretStore
* Method: jmiCASAGetCredential
* Signature: (I[B[BILcom/novell/casa/micasa/Secret;)I
*/
JNIEXPORT jint JNICALL
Java_com_novell_casa_MiCasa_jmiCASAGetCredential
(JNIEnv *env, jobject unused,
jint ssFlags,
jstring jsAppSecretID,
jstring jsSharedSecretID,
jint jUsernameType,
jobject jcred)
{
int rcode = 0;
SSCS_SECRET_ID_T appSecretId = {0};
SSCS_SECRET_ID_T sharedSecretId = {0};
SSCS_BASIC_CREDENTIAL credential = {0};
const char* utf_string;
jboolean isCopy;
int unType = jUsernameType;
utf_string = (*env)->GetStringUTFChars(env, jsAppSecretID, &isCopy);
sscs_Utf8Strcpy((char*)appSecretId.id, utf_string);
appSecretId.len = sscs_Utf8Strlen(utf_string) + 1;
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env, jsAppSecretID, utf_string);
// handle sharedsecretid
if (jsSharedSecretID)
{
utf_string = (*env)->GetStringUTFChars(env, jsSharedSecretID, &isCopy);
sscs_Utf8Strcpy((char*)sharedSecretId.id, utf_string);
sharedSecretId.len = sscs_Utf8Strlen(utf_string)+1;
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env, jsSharedSecretID, utf_string);
}
// make the call
if (jsSharedSecretID)
rcode = miCASAGetCredential(
ssFlags,
&appSecretId,
&sharedSecretId,
&unType,
&credential,
NULL
);
else
rcode = miCASAGetCredential(
ssFlags,
&appSecretId,
NULL,
&unType,
&credential,
NULL
);
if (rcode == 0)
{
// we have a credential
jclass theclazz;
jmethodID mid;
theclazz = (*env)->GetObjectClass(env, jcred);
mid = (*env)->GetMethodID(env, theclazz, "setUsername", "(Ljava/lang/String;)V");
if (mid != NULL)
{
//printf("The Username: %s\r\n", credential.username);
jstring jusername = (*env)->NewStringUTF(env, (char *)credential.username);
(*env)->CallObjectMethod(env, jcred, mid, jusername);
}
mid = (*env)->GetMethodID(env, theclazz, "setPassword", "(Ljava/lang/String;)V");
{
jstring jpassword = (*env)->NewStringUTF(env, (char *)credential.password);
(*env)->CallObjectMethod(env, jcred, mid, jpassword);
}
}
return rcode;
}
/*
* Class: com_novell_casa_micasa_SecretStore
* Method: jmiCASARemoveCredential
* Signature: (I[B[B)I
*/
JNIEXPORT jint JNICALL
Java_com_novell_casa_MiCasa_jmiCASARemoveCredential
(JNIEnv *env, jobject unused,
jint ssFlags,
jstring jsAppSecretID,
jstring jsSharedSecretID)
{
int rcode = 0;
SSCS_SECRET_ID_T appSecretId = {0};
SSCS_SECRET_ID_T sharedSecretId = {0};
const char* utf_string;
jboolean isCopy;
utf_string = (*env)->GetStringUTFChars(env, jsAppSecretID, &isCopy);
sscs_Utf8Strcpy((char*)appSecretId.id, utf_string);
appSecretId.len = sscs_Utf8Strlen(utf_string) + 1;
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env, jsAppSecretID, utf_string);
// handle sharedsecretid
if (jsSharedSecretID)
{
utf_string = (*env)->GetStringUTFChars(env, jsSharedSecretID, &isCopy);
sscs_Utf8Strcpy((char*)sharedSecretId.id, utf_string);
sharedSecretId.len = sscs_Utf8Strlen(utf_string)+1;
if (isCopy == JNI_TRUE)
(*env)->ReleaseStringUTFChars(env, jsSharedSecretID, utf_string);
}
// make the call
if (jsSharedSecretID)
rcode = miCASARemoveCredential(
ssFlags,
&appSecretId,
&sharedSecretId,
NULL);
else
rcode = miCASARemoveCredential(
ssFlags,
&appSecretId,
NULL,
NULL);
return rcode;
}
#ifdef __cplusplus
}
#endif

BIN
jwrapper/jnsscs/jnsscs.ncb Normal file

Binary file not shown.

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jnsscs", "jnsscs.vcproj", "{3CA87960-868D-4F3B-BD21-30062A9F89AD}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{3CA87960-868D-4F3B-BD21-30062A9F89AD}.Debug.ActiveCfg = Debug|Win32
{3CA87960-868D-4F3B-BD21-30062A9F89AD}.Debug.Build.0 = Debug|Win32
{3CA87960-868D-4F3B-BD21-30062A9F89AD}.Release.ActiveCfg = Release|Win32
{3CA87960-868D-4F3B-BD21-30062A9F89AD}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

BIN
jwrapper/jnsscs/jnsscs.suo Normal file

Binary file not shown.

View File

@@ -0,0 +1,171 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="jnsscs"
RootNamespace="jnsscs"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="C:\j2sdk1.4.2_05\include\win32;D:\ccm\SSClient\SecretStoreClient_src\include;C:\j2sdk1.4.2_05\include;D:\ccm\SSClient\SecretStoreClient_src\c_jwrapper\classes"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JNSSCS_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/jnsscs.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="1"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="micasa.lib"
OutputFile=".\Release/jmicasa.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="D:\ccm\SSClient\SecretStoreClient_src\lib\w32"
ProgramDatabaseFile=".\Release/jnsscs.pdb"
ImportLibrary=".\Release/jnsscs.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/jnsscs.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;C:\Program Files\Java\jdk1.5.0_06\include\win32&quot;;&quot;%JAVA_HOME%\include&quot;;../../include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JNSSCS_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="0"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/jnsscs.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="1"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib micasa.lib"
OutputFile=".\Debug/jmicasa.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\..\lib\Release"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/jnsscs.pdb"
ImportLibrary=".\Debug/jnsscs.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/jnsscs.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath=".\jmicasa.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\classes\com_novell_casa_MiCasa.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

31
jwrapper/jnsscs/link.w32 Normal file
View File

@@ -0,0 +1,31 @@
LINK_DEF_BLD = \
echo "$(addprefix $(OBJDIR),$(notdir $(OBJS)))" > $(LINKDEF);\
echo "/LIBPATH:$(MSC)lib" >> $(LINKDEF);\
echo "/LIBPATH:$(MSC)platformsdk/lib" >> $(LINKDEF);\
echo "/LIBPATH:../../lib/w32" >> $(LINKDEF);\
echo "kernel32.lib" >> $(LINKDEF);\
echo "ole32.lib" >> $(LINKDEF);\
echo "micasa.lib" >> $(LINKDEF);\
echo "/DLL" >> $(LINKDEF);\
echo "/OUT:$(BINDIR)$(basename $(notdir $@)).dll" >> $(LINKDEF);\
echo "/MAP:$(BINDIR)$(basename $(notdir $@)).map" >> $(LINKDEF);\
echo "/DEBUG" >> $(LINKDEF);\
echo "/MACHINE:IX86" >> $(LINKDEF);\
echo "/SUBSYSTEM:WINDOWS" >> $(LINKDEF);\
echo "/INCREMENTAL:NO" >> $(LINKDEF);\
echo "/VERSION:$(BLD_VER)" >> $(LINKDEF);\
echo "/FIXED:NO" >> $(LINKDEF);\
echo "/NODEFAULTLIB:uuid" >> $(LINKDEF);\
echo "/NODEFAULTLIB:libc" >> $(LINKDEF);\
echo "/NODEFAULTLIB:oldnames" >> $(LINKDEF);\
echo "/NODEFAULTLIB:user32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:gdi32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:comdlg32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:winspool" >> $(LINKDEF);\
echo "/NODEFAULTLIB:shell32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:comctl32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:olepro32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:user32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:wininet" >> $(LINKDEF);\
echo "/OPT:REF" >> $(LINKDEF);

View File

@@ -0,0 +1,31 @@
LINK_DEF_BLD = \
echo "$(addprefix $(OBJDIR),$(notdir $(OBJS)))" > $(LINKDEF);\
echo "/LIBPATH:$(MSC)lib" >> $(LINKDEF);\
echo "/LIBPATH:$(MSC)platformsdk/lib" >> $(LINKDEF);\
echo "/LIBPATH:../../lib/w32" >> $(LINKDEF);\
echo "kernel32.lib" >> $(LINKDEF);\
echo "ole32.lib" >> $(LINKDEF);\
echo "micasa.lib" >> $(LINKDEF);\
echo "/DLL" >> $(LINKDEF);\
echo "/OUT:$(BINDIR)$(basename $(notdir $@)).dll" >> $(LINKDEF);\
echo "/MAP:$(BINDIR)$(basename $(notdir $@)).map" >> $(LINKDEF);\
echo "/DEBUG" >> $(LINKDEF);\
echo "/MACHINE:IX86" >> $(LINKDEF);\
echo "/SUBSYSTEM:WINDOWS" >> $(LINKDEF);\
echo "/INCREMENTAL:NO" >> $(LINKDEF);\
echo "/VERSION:$(BLD_VER)" >> $(LINKDEF);\
echo "/FIXED:NO" >> $(LINKDEF);\
echo "/NODEFAULTLIB:oldnames" >> $(LINKDEF);\
echo "/NODEFAULTLIB:libc" >> $(LINKDEF);\
echo "/NODEFAULTLIB:uuid" >> $(LINKDEF);\
echo "/NODEFAULTLIB:MSVCRT" >> $(LINKDEF);\
echo "/NODEFAULTLIB:user32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:gdi32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:comdlg32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:winspool" >> $(LINKDEF);\
echo "/NODEFAULTLIB:shell32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:comctl32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:olepro32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:oleaut32" >> $(LINKDEF);\
echo "/NODEFAULTLIB:wininet" >> $(LINKDEF);\
echo "/OPT:REF" >> $(LINKDEF);

View File

@@ -0,0 +1,117 @@
#######################################################################
#
# Copyright (C) 2006 Novell, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = *.exp
CASAROOT = ../../..
CASALIBDIR = $(CASAROOT)/$(LIB)
BUILD_VER = 1.1.1
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR = ..
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME = libjmicasa
MODULE_EXT = so
CFILES = ../jmicasa.c
CSFILES_CSC :=
INCLUDES = -I. -I.. -I$(CASAROOT)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
-I/opt/gnome/include/gnome-keyring-1
RESOURCES =
DEFINES =
CFLAGS += $(INCLUDES) $(DEFINES)
LIBS = -lpthread -ldl
LDFLAGS = -Wl,-Bsymbolic -shared -Wl,--version-script=jmicasa_lux.exp \
-L$(CASALIBDIR)/$(TARGET_CFG) -lmicasa -Wl,-soname -Wl,libjmicasa.so.1
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o: %.cpp
$(CC) -c $(CFLAGS) -o $@ $<
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
# @echo [======== Linking $@ ========]
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER): $(OBJDIR) $(OBJS)
@echo [======== Linking $@ ========]
cc -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@@ -0,0 +1,9 @@
jmicasa_1.0.0
{
global:
Java_com_novell_casa_MiCasa_jmiCASASetCredential;
Java_com_novell_casa_MiCasa_jmiCASAGetCredential;
Java_com_novell_casa_MiCasa_jmiCASARemoveCredential;
local:
*;
};

View File

@@ -0,0 +1,9 @@
LINK = $(CC) \
-Wl,-Bsymbolic \
-shared \
-Wl,--version-script=$(TARGET)_$(PLAT).exp \
-Wl,-rpath -Wl,/usr/lib$(ARC) \
-L$(LIBDIR)$(XTRA) -lmicasa \
-Wl,-soname -Wl,lib$(TARGET).so.$(PROD_NUM) \
-o $(LIBDIR)$(XTRA)/lib$(TARGET).so.$(BLD_VER) \
$(OBJDIR)*.$(O)

View File

@@ -0,0 +1,2 @@
OBJS=\
jmicasa.$(O)

2
jwrapper/jnsscs/objs.w32 Normal file
View File

@@ -0,0 +1,2 @@
OBJS=\
jmicasa.$(O)

View File

@@ -0,0 +1,120 @@
#######################################################################
#
# Copyright (C) 2006 Novell, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = *.exp
CASAROOT = ../../..
CASALIBDIR = $(CASAROOT)/lib
BUILD_VER = 1.1.1
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR = ..
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME = jmicasa
MODULE_EXT = dll
CFILES = jmicasa.c
CSFILES_CSC :=
INCLUDES = -I. -I.. -I$(CASAROOT)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/win32 \
RESOURCES =
DEFINES =
CFLAGS += $(INCLUDES) $(DEFINES)
LIBS = /LIBPATH:"$(MSC)\lib" /LIBPATH:"$(MSC)\PlatformSDK\lib" /LIBPATH:"$(CASAROOT)/lib/Release"
LDFLAGS = /VERSION:1.1.1 /MACHINE:IX86 \
/dll
OBJDIR = ./$(TARGET_CFG)/lib
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/%.o: %.c
$(CC) -c $(CFLAGS) -Fo$@ $<
$(OBJDIR)/%.o: %.cpp
$(CC) -c $(CFLAGS) -o $@ $<
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
@echo [======== Linking $@ ========]
"$(MSC)\bin\$(LINK)" $(LIBS) $(LDFLAGS) /OUT:$@ $(OBJS) kernel32.lib ole32.lib micasa.lib
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).lib
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASABINDIR)/$(TARGET_CFG)
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASALIBDIR)/$(TARGET_CFG)
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASABINDIR)$(TARGET_CFG)
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASABINDIR) ] || mkdir -p $(CASABINDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
[ -d $(CASABINDIR)/$(TARGET_CFG) ] || mkdir -p $(CASABINDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

111
jwrapper/src/Makefile.am Normal file
View File

@@ -0,0 +1,111 @@
#######################################################################
#
# Copyright (C) 2006 Novell, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST =$(JAVAFILES) com/novell/casa/*.java
CASAROOT = ../..
CASALIBDIR = $(CASAROOT)/$(LIB)
JAVAROOT = .
JAVAC= javac
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME = miCASA
MODULE_EXT = jar
JAVAFILES = $(srcdir)/com/novell/casa/MiCasa.java \
$(srcdir)/com/novell/casa/NetCredential.java \
$(srcdir)/com/novell/casa/MiCasaException.java
JAVA_CLASS_FILES = com/novell/casa/MiCasa.class \
com/novell/casa/NetCredential.class \
com/novell/casa/MiCasaException.class
CSFILES_CSC :=
INCLUDES = $(CASAROOT)/include
RESOURCES =
CFLAGS += $(INCLUDES) $(DEFINES)
LIBS =
LDFLAGS =
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS =
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(srcdir)/com/novell/casa/MiCasa.class:$(srcdir)/com/novell/casa/MiCasa.java
@echo making Micasa.class
$(JAVAC) -classpath $(JAVAROOT) $^
$(CASAROOT)/include/com_novell_casa_MiCasa.h:$(srcdir)/com/novell/casa/MiCasa.class
javah -d $(INCLUDES) com.novell.casa.MiCasa
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(CASAROOT)/include/com_novell_casa_MiCasa.h
jar cvf $(OBJDIR)/miCASA.jar $(JAVA_CLASS_FILES)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
cd $(srcdir)/com/novell/casa && rm -f *.class
cd $(CASAROOT)/include && rm -f com_novell_casa_MiCasa.h
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@@ -0,0 +1,102 @@
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
package com.novell.casa;
public class MiCasa {
public static int USERNAME_TYPE_CN_F = 0x00000000;
public static int USERNAME_TYPE_NDS_DN_F = 0x00000001;
public static int USERNAME_TYPE_NDS_FDN_F = 0x00000002;
public static int USERNAME_TYPE_LDAP_DN_F = 0x00000004;
public static int USERNAME_TYPE_EMAIL_F = 0x00000008;
public static int USERNAME_TYPE_OTHER_F = 0x00000010;
public static native int jmiCASASetCredential(
int iSSFlags,
String sAppSecretID,
String sSharedSecretID,
int unFlag,
String sUsername,
String sPassword
);
public static native int jmiCASAGetCredential(
int iSSFlags,
String sAppSecretID,
String sSharedSecretID,
int unFlag,
NetCredential credential
);
public static native int jmiCASARemoveCredential(
int iSSFlags,
String sAppSecretID,
String sSharedSecretID
);
// **********************************************************************************************
static {
System.loadLibrary("jmicasa");
}
public static void setCredential(int iSSFlags,
String sAppSecretID,
String sSharedSecretID,
int iUserFlag,
String sUsername,
String sPassword) throws Exception {
int rcode = 0;
rcode = jmiCASASetCredential(iSSFlags, sAppSecretID, sSharedSecretID, iUserFlag, sUsername, sPassword);
if (rcode != 0) {
throw new MiCasaException(rcode);
}
}
public static NetCredential getCredential(int iSSFlags,
String sAppSecretID,
String sSharedSecretID,
int iUserFlag) throws Exception {
int rcode = 0;
NetCredential netCred = new NetCredential();
rcode = jmiCASAGetCredential(iSSFlags, sAppSecretID, sSharedSecretID, iUserFlag, netCred);
if (rcode != 0) {
throw new MiCasaException(rcode);
}
return netCred;
}
public static void removeCredential(int iSSFlags,
String sAppSecretID,
String sSharedSecretID) throws Exception {
int rcode = 0;
rcode = jmiCASARemoveCredential(iSSFlags, sAppSecretID, sSharedSecretID);
if (rcode != 0) {
throw new MiCasaException(rcode);
}
}
}

View File

@@ -0,0 +1,820 @@
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
package com.novell.casa;
public class MiCasaException extends RuntimeException
{
/**
* Can't find the target object DN in NDS.
*
* @since 3.0
*/
public static final short NSSCS_E_OBJECT_NOT_FOUND = 0xFFFFFCE0; /* -800 */
/**
* NICI operations have failed.
*/
public static final short NSSCS_E_NICI_FAILURE = 0xFFFFFCDF; /* -801 */
/**
* Secret ID is not in the User Secret Store.
*/
public static final short NSSCS_E_INVALID_SECRET_ID = 0xFFFFFCDE; /* -802 */
/**
* Some internal operating system services have not been available.
*/
public static final short NSSCS_E_SYSTEM_FAILURE = 0xFFFFFCDD; /* -803 */
/**
* Access to the target SecretStore has been denied.
*/
public static final short NSSCS_E_ACCESS_DENIED = 0xFFFFFCDC; /* -804 */
/**
* Some internal NDS services have not been available.
*/
public static final short NSSCS_E_NDS_INTERNAL_FAILURE = 0xFFFFFCDB; /* -805 */
/**
* Secret has not been initialized with a write.
*/
public static final short NSSCS_E_SECRET_UNINITIALIZED = 0xFFFFFCDA; /* -806 */
/**
* Size of the buffer is not in a nominal range between minimum and maximum.
*/
public static final short NSSCS_E_BUFFER_LEN = 0xFFFFFCD9; /* -807 */
/**
* Client and server components are not of the compatible versions.
*/
public static final short NSSCS_E_INCOMPATIBLE_VERSION = 0xFFFFFCD8; /* -808 */
/**
* SecretStore data on the server has been corrupted.
*/
public static final short NSSCS_E_CORRUPTED_STORE = 0xFFFFFCD7; /* -809 */
/**
* Secret ID already exists in the Secret Store.
*/
public static final short NSSCS_E_SECRET_ID_EXISTS = 0xFFFFFCD6; /* -810 */
/**
* User NDS password has been changed by the administrator.
*/
public static final short NSSCS_E_NDS_PWORD_CHANGED = 0xFFFFFCD5; /* -811 */
/**
* Target NDS User object not found.
*/
public static final short NSSCS_E_INVALID_TARGET_OBJECT = 0xFFFFFCD4; /* -812 */
/**
* Target NDS User object does not have a SecretStore.
*/
public static final short NSSCS_E_STORE_NOT_FOUND = 0xFFFFFCD3; /* -813 */
/**
* SecretStore not on the Network.
*/
public static final short NSSCS_E_SERVICE_NOT_FOUND = 0xFFFFFCD2; /* -814 */
/**
* Length of the Secret ID buffer exceeds the limit.
*/
public static final short NSSCS_E_SECRET_ID_TOO_LONG = 0xFFFFFCD1; /* -815 */
/**
* User not authenticated.
*/
public static final short NSSCS_E_NOT_AUTHENTICATED = 0xFFFFFCCF; /* -817 */
/**
* Not supported operations.
*/
public static final short NSSCS_E_NOT_SUPPORTED = 0xFFFFFCCE; /* -818 */
/**
* Typed in NDS password not valid.
*/
public static final short NSSCS_E_NDS_PWORD_INVALID = 0xFFFFFCCD; /* -819 */
/**
* Length of the Enumeration buffer too short.
*/
public static final short NSSCS_E_ENUM_BUFF_TOO_SHORT = 0xFFFFFCD0; /* -816 */
/**
* Session keys of the client and server NICI are out of sync.
*/
public static final short NSSCS_E_NICI_OUTOF_SYNC = 0xFFFFFCCC; /* -820 */
/**
* Requested service not supported yet.
*/
public static final short NSSCS_E_SERVICE_NOT_SUPPORTED = 0xFFFFFCCB; /* -821 */
/**
* NDS authentication type not supported.
*/
public static final short NSSCS_E_TOKEN_NOT_SUPPORTED = 0xFFFFFCCA; /* -822 */
/**
* Unicode text conversion operation failed.
*/
public static final short NSSCS_E_UNICODE_OP_FAILURE = 0xFFFFFCC9; /* -823 */
/**
* Connection to server is lost.
*/
public static final short NSSCS_E_TRANSPORT_FAILURE = 0xFFFFFCC8; /* -824 */
/**
* Cryptographic operation failed.
*/
public static final short NSSCS_E_CRYPTO_OP_FAILURE = 0xFFFFFCC7; /* -825 */
/**
* Opening a connection to the server failed.
*/
public static final short NSSCS_E_SERVER_CONN_FAILURE = 0xFFFFFCC6; /* -826 */
/**
* Access to server connection failed.
*/
public static final short NSSCS_E_CONN_ACCESS_FAILURE = 0xFFFFFCC5; /* -827 */
/**
* Size of the enumeration buffer exceeds the limit.
*/
public static final short NSSCS_E_ENUM_BUFF_TOO_LONG = 0xFFFFFCC4; /* -828 */
/**
* Size of the Secret buffer exceeds the limit.
*/
public static final short NSSCS_E_SECRET_BUFF_TOO_LONG = 0xFFFFFCC3; /* -829 */
/**
* Length of the Secret ID should be greater than zero.
*/
public static final short NSSCS_E_SECRET_ID_TOO_SHORT = 0xFFFFFCC2; /* -830 */
/**
* Protocol data corrupted on the wire.
*/
public static final short NSSCS_E_CORRUPTED_PACKET_DATA = 0xFFFFFCC1; /* -831 */
/**
* EP password validation failed. Access to the secret denied!
*/
public static final short NSSCS_E_EP_ACCESS_DENIED = 0xFFFFFCC0; /* -832 */
/**
* Schema is not extended to support SecreStore on the target tree.
*/
public static final short NSSCS_E_SCHEMA_NOT_EXTENDED = 0xFFFFFCBF; /* -833 */
/**
* One of the optional service attributes is not instantiated.
*/
public static final short NSSCS_E_ATTR_NOT_FOUND = 0xFFFFFCBE; /* -834 */
/**
* Server has been upgraded and user SecretStore should be updated.
*/
public static final short NSSCS_E_MIGRATION_NEEDED = 0xFFFFFCBD; /* -835 */
/**
* Master password could not be verified to read or unlock the secrets.
*/
public static final short NSSCS_E_MP_PWORD_INVALID = 0xFFFFFCBC; /* -836 */
/**
* Master password has not been set on the SecretStore.
*/
public static final short NSSCS_E_MP_PWORD_NOT_SET = 0xFFFFFCBB; /* -837 */
/**
* Ability to use master password has been disabled.
*/
public static final short NSSCS_E_MP_PWORD_NOT_ALLOWED = 0xFFFFFCBA; /* -838 */
/**
* Not a writeable replica of NDS.
*/
public static final short NSSCS_E_WRONG_REPLICA_TYPE = 0xFFFFFCB9; /* -839 */
/**
* Target attribute is not instantiated in NDS.
*
* @since 3.0
*/
public static final short NSSCS_E_ATTR_VAL_NOT_FOUND = 0xFFFFFCB8; /* -840 */
/**
* API parameter is not initialized.
*
* @since 3.0
*/
public static final short NSSCS_E_INVALID_PARAM = 0xFFFFFCB7; /* -841 */
/**
* Connection to SecretStore needs to be over SSL.
*
* @since 3.0
*/
public static final short NSSCS_E_NEED_SECURE_CHANNEL = 0xFFFFFCB6; /* -842 */
/**
* No server to support the given override configuration is found.
*
* @since 3.02
*/
public static final short NSSCS_E_CONFIG_NOT_SUPPORTED = 0xFFFFFCB5; /* -843 */
/**
* Attempt to unlock SecretStore failed because the store is not locked.
*
* @since 3.02
*/
public static final short NSSCS_E_STORE_NOT_LOCKED = 0xFFFFFCB4; /* -844 */
/**
* NDS Replica on the server that holds SecretStore is out of sync with the replica ring.
*
* @since 3.2
*/
public static final short NSSCS_E_TIME_OUT_OF_SYNC = 0xFFFFFCB3; /* -845 */
/**
* Versions of the client dlls don't match.
*
* @since 3.2
*/
public static final short NSSCS_E_VERSION_MISMATCH = 0xFFFFFCB2; /* -846 */
/**
* Buffer supplied for the secret is too short.
*
* @since 3.2
*/
public static final short NSSCS_E_SECRET_BUFF_TOO_SHORT = 0xFFFFFCB1; /* -847 */
/**
* Shared Secret processing and operations failed.
*
* @since 3.2
*/
public static final short NSSCS_E_SH_SECRET_FAILURE = 0xFFFFFCB0; /* -848 */
/**
* Shared Secret parser operations failed.
*
* @since 3.2
*/
public static final short NSSCS_E_PARSER_FAILURE = 0xFFFFFCAF; /* -849 */
/**
* Utf8 string operations failed.
*
* @since 3.2
*/
public static final short NSSCS_E_UTF8_OP_FAILURE = 0xFFFFFCAE; /* -850 */
/**
* Contextless name for LDAP bind does not resolve to a unique DN.
*
* @since 3.2
*/
public static final short NSSCS_E_CTX_LESS_CN_NOT_UNIQUE = 0xFFFFFCAD; /* -851 */
/**
* Feature not implemented yet.
*/
public static final short NSSCS_E_NOT_IMPLEMENTED = 0xFFFFFC88; /* -888 */
/**
* Product's BETA life has expired! Official release copy should be purchased.
*/
public static final short NSSCS_E_BETA_EXPIRED = 0xFFFFFC7D; /* -899 */
/**
* The error code.
*/
protected int err;
/**
* Determines if this object has a root exception.
*/
protected boolean hasRoot;
/**
* The root Throwable.
*/
protected Throwable root;
/**
* Constructs an empty SSException object. The error code is set to
* the 0.
*/
public MiCasaException()
{
super("");
err = 0;
root = this;
}
/**
* Constructs a SSException according to the error code.
*
* @param errCode The error code.
*/
public MiCasaException(int errCode)
{
super(generateMessage(errCode));
err = errCode;
root = this;
}
/**
* Generates a SSException with the specified message.
*
* @param errCode The SecretStore error code.
* @param message The exception message.
*/
public MiCasaException(int errCode, String message)
{
super(message);
err = errCode;
root = this;
}
/**
* Generates a SSException object that encapsulates the specified exception.
* The error code is set to 0. The message from the
* encapsulated exception is set as the message for this object.
*
* @param root The Throwable that is encapsulated in this object as the root.
*/
public MiCasaException(Throwable root)
{
this(0, root.getMessage());
hasRoot = true;
this.root = root;
}
/**
* Generates a SSException object that encapsulates the specified exception as
* its root. The error code is set to 0. The message from the root exception
* is set as the message for this object. The additional message is appended to
* the end of the encapsulated exception's message with a whitspace seperating
* them.
*
* @param root The Throwable that is encapsulated in this object as the root.
* @param message An additional message.
*/
public MiCasaException(Throwable root, String message)
{
this(0, message + " " + root.getMessage());
hasRoot = true;
this.root = root;
}
/**
* Generates a SSException object that encapsulates the specified exception as
* its root. The message from the root exception
* is set as the message for this object. The root message is appended to
* the end of the message with a whitspace seperating them.
*
* @param errCode The SecretStore error code.
* @param root The Throwable that is encapsulated in this object as the root.
* @param errCode An additional message.
* @since 3.2
*/
public MiCasaException(int errCode, Throwable root)
{
this(errCode, generateMessage(errCode) + " " + root.getMessage());
err = errCode;
hasRoot = true;
this.root = root;
}
/**
* Returns the message associated with the error code. Note that the returned
* value is not translated.
*
* @param errCode The Error Code.
* @return String The message.
*/
public static final String generateMessage(int errCode)
{
switch (errCode)
{
case NSSCS_E_OBJECT_NOT_FOUND:
return "Can't find the target object DN in NDS";
case NSSCS_E_NICI_FAILURE:
return "NICI operations have failed";
case NSSCS_E_INVALID_SECRET_ID:
return "Secret ID is not in the User Secret Store";
case NSSCS_E_SYSTEM_FAILURE:
return "Some internal operating system services have not been available";
case NSSCS_E_ACCESS_DENIED:
return "Access to the target SecretStore has been denied";
case NSSCS_E_NDS_INTERNAL_FAILURE:
return "Some internal NDS services have not been available";
case NSSCS_E_SECRET_UNINITIALIZED:
return "Secret has not been initialized with a write";
case NSSCS_E_BUFFER_LEN:
return "Size of the buffer is not in a nominal range between minimum and maximum";
case NSSCS_E_INCOMPATIBLE_VERSION:
return "Client and server components are not of the compatible versions";
case NSSCS_E_CORRUPTED_STORE:
return "SecretStore data on the server has been corrupted";
case NSSCS_E_SECRET_ID_EXISTS:
return "Secret ID is already in SecretStore";
case NSSCS_E_NDS_PWORD_CHANGED:
return "User NDS password has been changed by the administrator";
case NSSCS_E_INVALID_TARGET_OBJECT:
return "Target NDS User object not found";
case NSSCS_E_STORE_NOT_FOUND:
return "Target NDS User object does not have a SecretStore";
case NSSCS_E_SERVICE_NOT_FOUND:
return "SecretStore not on the Network";
case NSSCS_E_SECRET_ID_TOO_LONG:
return "Length of the Secret ID buffer exceeds the limit";
case NSSCS_E_ENUM_BUFF_TOO_SHORT:
return "Length of the Enumeration buffer too short";
case NSSCS_E_NOT_AUTHENTICATED:
return "User not authenticated";
case NSSCS_E_NOT_SUPPORTED:
return "Not supported operations";
case NSSCS_E_NDS_PWORD_INVALID:
return "Typed in NDS password not valid";
case NSSCS_E_NICI_OUTOF_SYNC:
return "Session keys of the client and server NICI are out of sync";
case NSSCS_E_SERVICE_NOT_SUPPORTED:
return "Requested service not supported yet";
case NSSCS_E_TOKEN_NOT_SUPPORTED:
return "NDS authentication type not supported";
case NSSCS_E_UNICODE_OP_FAILURE:
return "Unicode text conversion operation failed";
case NSSCS_E_TRANSPORT_FAILURE:
return "Connection to server is lost";
case NSSCS_E_CRYPTO_OP_FAILURE:
return "Cryptographic operation failed";
case NSSCS_E_SERVER_CONN_FAILURE:
return "Opening a connection to the server failed";
case NSSCS_E_CONN_ACCESS_FAILURE:
return "Access to server connection failed";
case NSSCS_E_ENUM_BUFF_TOO_LONG:
return "Size of the enumeration buffer exceeds the limit";
case NSSCS_E_SECRET_BUFF_TOO_LONG:
return "Size of the Secret buffer exceeds the limit";
case NSSCS_E_SECRET_ID_TOO_SHORT:
return "Length of the Secret ID should be greater than zero";
case NSSCS_E_CORRUPTED_PACKET_DATA:
return "Protocol data corrupted on the wire";
case NSSCS_E_EP_ACCESS_DENIED:
return "EP password validation failed. Access to the secret denied";
case NSSCS_E_SCHEMA_NOT_EXTENDED:
return "Schema is not extended to support SecreStore on the target tree";
case NSSCS_E_ATTR_NOT_FOUND:
return "One of the optional service attributes is not instantiated";
case NSSCS_E_MIGRATION_NEEDED:
return "Server has been upgraded and user SecretStore should be updated";
case NSSCS_E_MP_PWORD_INVALID:
return "Master password could not be verified to read or unlock the secrets";
case NSSCS_E_MP_PWORD_NOT_SET:
return "Master password has not been set on the SecretStore";
case NSSCS_E_MP_PWORD_NOT_ALLOWED:
return "Ability to use master password has been disabled";
case NSSCS_E_WRONG_REPLICA_TYPE:
return "Not a writeable replica of NDS";
case NSSCS_E_ATTR_VAL_NOT_FOUND:
return "Target attribute is not instantiated in NDS";
case NSSCS_E_INVALID_PARAM:
return "API parameter is not initialized";
case NSSCS_E_NEED_SECURE_CHANNEL:
return "Connection to SecretStore needs to be over SSL";
case NSSCS_E_CONFIG_NOT_SUPPORTED:
return "No server to support the given override configuration is found";
case NSSCS_E_STORE_NOT_LOCKED:
return "Attempt to unlock SecretStore failed because the store is not locked";
case NSSCS_E_TIME_OUT_OF_SYNC:
return "NDS Replica on the server that holds SecretStore is out of sync with the replica ring";
case NSSCS_E_VERSION_MISMATCH:
return "Versions of the client dlls don't match";
case NSSCS_E_SECRET_BUFF_TOO_SHORT:
return "Buffer supplied for the secret is too short";
case NSSCS_E_SH_SECRET_FAILURE:
return "Shared Secret processing and operations failed";
case NSSCS_E_PARSER_FAILURE:
return "Shared Secret parser operations failed";
case NSSCS_E_UTF8_OP_FAILURE:
return "Utf8 string operations failed";
case NSSCS_E_CTX_LESS_CN_NOT_UNIQUE:
return "Contextless name for LDAP bind does not resolve to a unique DN";
case NSSCS_E_NOT_IMPLEMENTED:
return "Feature not implemented yet";
case NSSCS_E_BETA_EXPIRED:
return "Product's BETA life has expired! Official release copy should be purchased";
}
return "";
}
/**
* Returns the error code.
*
* @return int - The error code.
*/
public int getErrorCode()
{
return err;
}
/*
public String getLocalizedMessage()
{
try
{
if (SecretStore.resourceBundle != null)
{
switch (err)
{
case NSSCS_E_OBJECT_NOT_FOUND:
return SecretStore.resourceBundle.getString("NSSCS_E_OBJECT_NOT_FOUND");
case NSSCS_E_NICI_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_NICI_FAILURE");
case NSSCS_E_INVALID_SECRET_ID:
return SecretStore.resourceBundle.getString("NSSCS_E_INVALID_SECRET_ID");
case NSSCS_E_SYSTEM_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_SYSTEM_FAILURE");
case NSSCS_E_ACCESS_DENIED:
return SecretStore.resourceBundle.getString("NSSCS_E_ACCESS_DENIED");
case NSSCS_E_NDS_INTERNAL_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_NDS_INTERNAL_FAILURE");
case NSSCS_E_SECRET_UNINITIALIZED:
return SecretStore.resourceBundle.getString("NSSCS_E_SECRET_UNINITIALIZED");
case NSSCS_E_BUFFER_LEN:
return SecretStore.resourceBundle.getString("NSSCS_E_BUFFER_LEN");
case NSSCS_E_INCOMPATIBLE_VERSION:
return SecretStore.resourceBundle.getString("NSSCS_E_INCOMPATIBLE_VERSION");
case NSSCS_E_CORRUPTED_STORE:
return SecretStore.resourceBundle.getString("NSSCS_E_CORRUPTED_STORE");
case NSSCS_E_SECRET_ID_EXISTS:
return SecretStore.resourceBundle.getString("NSSCS_E_SECRET_ID_EXISTS");
case NSSCS_E_NDS_PWORD_CHANGED:
return SecretStore.resourceBundle.getString("NSSCS_E_NDS_PWORD_CHANGED");
case NSSCS_E_INVALID_TARGET_OBJECT:
return SecretStore.resourceBundle.getString("NSSCS_E_INVALID_TARGET_OBJECT");
case NSSCS_E_STORE_NOT_FOUND:
return SecretStore.resourceBundle.getString("NSSCS_E_STORE_NOT_FOUND");
case NSSCS_E_SERVICE_NOT_FOUND:
return SecretStore.resourceBundle.getString("NSSCS_E_SERVICE_NOT_FOUND");
case NSSCS_E_SECRET_ID_TOO_LONG:
return SecretStore.resourceBundle.getString("NSSCS_E_SECRET_ID_TOO_LONG");
case NSSCS_E_ENUM_BUFF_TOO_SHORT:
return SecretStore.resourceBundle.getString("NSSCS_E_ENUM_BUFF_TOO_SHORT");
case NSSCS_E_NOT_AUTHENTICATED:
return SecretStore.resourceBundle.getString("NSSCS_E_NOT_AUTHENTICATED");
case NSSCS_E_NOT_SUPPORTED:
return SecretStore.resourceBundle.getString("NSSCS_E_NOT_SUPPORTED");
case NSSCS_E_NDS_PWORD_INVALID:
return SecretStore.resourceBundle.getString("NSSCS_E_NDS_PWORD_INVALID");
case NSSCS_E_NICI_OUTOF_SYNC:
return SecretStore.resourceBundle.getString("NSSCS_E_NICI_OUTOF_SYNC");
case NSSCS_E_SERVICE_NOT_SUPPORTED:
return SecretStore.resourceBundle.getString("NSSCS_E_SERVICE_NOT_SUPPORTED");
case NSSCS_E_TOKEN_NOT_SUPPORTED:
return SecretStore.resourceBundle.getString("NSSCS_E_TOKEN_NOT_SUPPORTED");
case NSSCS_E_UNICODE_OP_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_UNICODE_OP_FAILURE");
case NSSCS_E_TRANSPORT_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_TRANSPORT_FAILURE");
case NSSCS_E_CRYPTO_OP_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_CRYPTO_OP_FAILURE");
case NSSCS_E_SERVER_CONN_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_SERVER_CONN_FAILURE");
case NSSCS_E_CONN_ACCESS_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_CONN_ACCESS_FAILURE");
case NSSCS_E_ENUM_BUFF_TOO_LONG:
return SecretStore.resourceBundle.getString("NSSCS_E_ENUM_BUFF_TOO_LONG");
case NSSCS_E_SECRET_BUFF_TOO_LONG:
return SecretStore.resourceBundle.getString("NSSCS_E_SECRET_BUFF_TOO_LONG");
case NSSCS_E_SECRET_ID_TOO_SHORT:
return SecretStore.resourceBundle.getString("NSSCS_E_SECRET_ID_TOO_SHORT");
case NSSCS_E_CORRUPTED_PACKET_DATA:
return SecretStore.resourceBundle.getString("NSSCS_E_CORRUPTED_PACKET_DATA");
case NSSCS_E_EP_ACCESS_DENIED:
return SecretStore.resourceBundle.getString("NSSCS_E_EP_ACCESS_DENIED");
case NSSCS_E_SCHEMA_NOT_EXTENDED:
return SecretStore.resourceBundle.getString("NSSCS_E_SCHEMA_NOT_EXTENDED");
case NSSCS_E_ATTR_NOT_FOUND:
return SecretStore.resourceBundle.getString("NSSCS_E_ATTR_NOT_FOUND");
case NSSCS_E_MIGRATION_NEEDED:
return SecretStore.resourceBundle.getString("NSSCS_E_MIGRATION_NEEDED");
case NSSCS_E_MP_PWORD_INVALID:
return SecretStore.resourceBundle.getString("NSSCS_E_MP_PWORD_INVALID");
case NSSCS_E_MP_PWORD_NOT_SET:
return SecretStore.resourceBundle.getString("NSSCS_E_MP_PWORD_NOT_SET");
case NSSCS_E_MP_PWORD_NOT_ALLOWED:
return SecretStore.resourceBundle.getString("NSSCS_E_MP_PWORD_NOT_ALLOWED");
case NSSCS_E_WRONG_REPLICA_TYPE:
return SecretStore.resourceBundle.getString("NSSCS_E_WRONG_REPLICA_TYPE");
case NSSCS_E_ATTR_VAL_NOT_FOUND:
return SecretStore.resourceBundle.getString("NSSCS_NSSCS_E_ATTR_VAL_NOT_FOUND");
case NSSCS_E_INVALID_PARAM:
return SecretStore.resourceBundle.getString("NSSCS_NSSCS_E_INVALID_PARAM");
case NSSCS_E_NEED_SECURE_CHANNEL:
return SecretStore.resourceBundle.getString("NSSCS_E_NEED_SECURE_CHANNEL");
case NSSCS_E_CONFIG_NOT_SUPPORTED:
return SecretStore.resourceBundle.getString("NSSCS_E_CONFIG_NOT_SUPPORTED");
case NSSCS_E_STORE_NOT_LOCKED:
return SecretStore.resourceBundle.getString("NSSCS_E_STORE_NOT_LOCKED");
case NSSCS_E_TIME_OUT_OF_SYNC:
return SecretStore.resourceBundle.getString("NSSCS_E_TIME_OUT_OF_SYNC");
case NSSCS_E_VERSION_MISMATCH:
return SecretStore.resourceBundle.getString("NSSCS_E_VERSION_MISMATCH");
case NSSCS_E_SECRET_BUFF_TOO_SHORT:
return SecretStore.resourceBundle.getString("NSSCS_E_SECRET_BUFF_TOO_SHORT");
case NSSCS_E_SH_SECRET_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_SH_SECRET_FAILURE");
case NSSCS_E_PARSER_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_PARSER_FAILURE");
case NSSCS_E_UTF8_OP_FAILURE:
return SecretStore.resourceBundle.getString("NSSCS_E_UTF8_OP_FAILURE");
case NSSCS_E_CTX_LESS_CN_NOT_UNIQUE:
return SecretStore.resourceBundle.getString("NSSCS_E_CTX_LESS_CN_NOT_UNIQUE");
case NSSCS_E_NOT_IMPLEMENTED:
return SecretStore.resourceBundle.getString("NSSCS_E_NOT_IMPLEMENTED");
case NSSCS_E_BETA_EXPIRED:
return SecretStore.resourceBundle.getString("NSSCS_E_BETA_EXPIRED");
}
}
}
catch (Exception e)
{
//do nothing
}
return getMessage();
}
*/
/**
* Returns the root exception of this object. Objects of this type may not
* always have a root exception. This method will return this object if
* this object does not have a root exception. Use the method
* hasRoot to determine if objects of this class have
* a root exception.
*
* @return Throwable - The root.
* @see #hasRoot()
*/
public Throwable getRoot()
{
return root;
}
/**
* Determines if this exception has a root exception. Returns true if it
* has a root exception, false if not.
*
* @return boolean - True if this object has a root exception, false if not.
* @see #getRoot()
*/
public boolean hasRoot()
{
return hasRoot;
}
}

View File

@@ -0,0 +1,58 @@
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
package com.novell.casa;
public class MiCasaTest {
public static void main(String[] args)
{
MiCasa store = new MiCasa();
try {
store.setCredential(0, "JavaAppID", null, 0, "javaAppID Username", "javaAppID Password");
store.setCredential(0, "JavaAppID", "Network", 0, "javaAppID Username", "javaAppID Password");
store.setCredential(0, "Groupwise", null, 0, "groupwise Username", "gw Password");
NetCredential nc = store.getCredential(0, "JavaAppID", null, 0);
System.out.println("Username: "+nc.getUsername());
System.out.println("Password: "+nc.getPassword());
store.removeCredential(0, "Groupwise", null);
try {
nc = store.getCredential(0, "Groupwise", null, 0);
} catch (Exception e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
nc = store.getCredential(0, "nonexist2", null, 0);
System.out.println("Username: "+nc.getUsername());
System.out.println("Password: "+nc.getPassword());
} catch (Exception e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
}
}

View File

@@ -0,0 +1,61 @@
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
package com.novell.casa;
public class NetCredential {
private String m_sUsername = "";
private String m_sPassword = "";
public void NetCredential(String username, String password)
{
m_sUsername = username;
m_sPassword = password;
}
public String getUsername()
{
return m_sUsername;
}
public String getPassword()
{
return m_sPassword;
}
public void setUsername(String sUsername)
{
if (sUsername != null)
{
m_sUsername = sUsername;
}
}
public void setPassword(String sPassword)
{
if (sPassword != null)
{
m_sPassword = sPassword;
}
}
}