adium 2694:7bf064b85753: OTR.framework built it's own static get...

commits at adium.im commits at adium.im
Tue Sep 8 05:17:07 UTC 2009


details:	http://hg.adium.im/adium/rev/7bf064b85753
revision:	2694:7bf064b85753
author:		Stephen Holt <sholt at adium.im>
date:		Tue Sep 08 01:24:13 2009 -0400

OTR.framework built it's own static gettext and glib libraries, and then libpurple was building it's own dynamically loaded gettext and glib.  Putting libotr into libpurple's build process, so it links against the same glib and gettext as libpurple.

TODO: Make the otr build optional in the libpurple build script.
Subject: adium 2695:349957b03894: Link against the new libotr.framework.

details:	http://hg.adium.im/adium/rev/349957b03894
revision:	2695:349957b03894
author:		Stephen Holt <sholt at adium.im>
date:		Tue Sep 08 01:24:16 2009 -0400

Link against the new libotr.framework.

diffs (truncated from 8243 to 1000 lines):

diff -r 4bcad311909f -r 349957b03894 Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj	Mon Sep 07 16:47:42 2009 -0400
+++ b/Adium.xcodeproj/project.pbxproj	Tue Sep 08 01:24:16 2009 -0400
@@ -283,7 +283,6 @@
 		341BD5700965EC3500CF83F5 /* OTRFingerprintDetailsWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 341BD56E0965EC3500CF83F5 /* OTRFingerprintDetailsWindow.nib */; };
 		341BD5710965EC3500CF83F5 /* OTRPrivateKeyGenerationWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 341BD56F0965EC3500CF83F5 /* OTRPrivateKeyGenerationWindow.nib */; };
 		341BD57B0965EC4700CF83F5 /* OTRPrefs.nib in Resources */ = {isa = PBXBuildFile; fileRef = 341BD5790965EC4700CF83F5 /* OTRPrefs.nib */; };
-		341BDBBB0968BC9B00CF83F5 /* OTR.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 341BDBBA0968BC9A00CF83F5 /* OTR.framework */; };
 		341BDF5E0969814A00CF83F5 /* BadgerDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 341BDF5D0969814900CF83F5 /* BadgerDefaults.plist */; };
 		341BDF700969829E00CF83F5 /* DockUnviewedContentDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 341BDF6F0969829E00CF83F5 /* DockUnviewedContentDefaults.plist */; };
 		342353D709D45726009FF634 /* AILogViewerWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 342353D509D45725009FF634 /* AILogViewerWindowController.m */; };
@@ -1439,6 +1438,8 @@
 		6EC1684D06C170A000F9FAD3 /* DCInviteToChatPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EC1684806C170A000F9FAD3 /* DCInviteToChatPlugin.m */; };
 		6EC1684F06C170A000F9FAD3 /* DCInviteToChatWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EC1684A06C170A000F9FAD3 /* DCInviteToChatWindowController.m */; };
 		6EC1685006C170A000F9FAD3 /* InviteToChatWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 6EC1684B06C170A000F9FAD3 /* InviteToChatWindow.nib */; };
+		7E6F8A94105611B700C6D80D /* libotr.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E6F8A93105611B700C6D80D /* libotr.framework */; };
+		7E6F8ACD105613AD00C6D80D /* libotr.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 7E6F8A93105611B700C6D80D /* libotr.framework */; };
 		7E824CDD06387FAF00813072 /* LinkEditor.nib in Resources */ = {isa = PBXBuildFile; fileRef = 7E824CCE06387FAF00813072 /* LinkEditor.nib */; };
 		7E824CE106387FAF00813072 /* SHAutoValidatingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E824CD206387FAF00813072 /* SHAutoValidatingTextView.m */; };
 		7E824CE306387FAF00813072 /* SHLinkEditorWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E824CD406387FAF00813072 /* SHLinkEditorWindowController.m */; };
@@ -1502,7 +1503,6 @@
 		F51BCD3B0A156261000FDC06 /* AutoHyperlinks.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 3496A8EA07CE6CA30055BBAB /* AutoHyperlinks.framework */; };
 		F51BCEEA0A15793E000FDC06 /* AutoHyperlinks.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3496A8EA07CE6CA30055BBAB /* AutoHyperlinks.framework */; };
 		F551B1000B8F5130007D3A3C /* FireLogImporter.nib in Resources */ = {isa = PBXBuildFile; fileRef = F56E0DAF0A4CDF9C008D1EB5 /* FireLogImporter.nib */; };
-		F58904F20A7828B9001F0ADC /* OTR.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 341BDBBA0968BC9A00CF83F5 /* OTR.framework */; };
 		F5F8CA4D0A1A9C9400154550 /* GBQuestionHandlerPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = F5F8CA4B0A1A9C9400154550 /* GBQuestionHandlerPlugin.m */; };
 /* End PBXBuildFile section */
 
@@ -1720,8 +1720,8 @@
 				EE5754ED0B3D7A7A00100989 /* Sparkle.framework in Copy Frameworks */,
 				377ED0220AE95D7D00CB7BDF /* PSMTabBarControl.framework in Copy Frameworks */,
 				9E1E1E270A96770C00E16DFC /* LMX.framework in Copy Frameworks */,
+				7E6F8ACD105613AD00C6D80D /* libotr.framework in Copy Frameworks */,
 				F51BCD3B0A156261000FDC06 /* AutoHyperlinks.framework in Copy Frameworks */,
-				341BDBBB0968BC9B00CF83F5 /* OTR.framework in Copy Frameworks */,
 				3419FE230531586A00C68BA3 /* Adium.framework in Copy Frameworks */,
 			);
 			name = "Copy Frameworks";
@@ -2239,7 +2239,6 @@
 		341BD5890965ECC200CF83F5 /* de */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = de; path = Resources/de.lproj/OTRPrefs.nib; sourceTree = "<group>"; };
 		341BD58A0965ECC800CF83F5 /* cs */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = cs; path = Resources/cs.lproj/OTRPrefs.nib; sourceTree = "<group>"; };
 		341BD58B0965ECCD00CF83F5 /* ca */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ca; path = Resources/ca.lproj/OTRPrefs.nib; sourceTree = "<group>"; };
-		341BDBBA0968BC9A00CF83F5 /* OTR.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OTR.framework; path = Frameworks/OTR.framework; sourceTree = "<group>"; };
 		341BDF5D0969814900CF83F5 /* BadgerDefaults.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = BadgerDefaults.plist; path = Resources/BadgerDefaults.plist; sourceTree = SOURCE_ROOT; };
 		341BDF6F0969829E00CF83F5 /* DockUnviewedContentDefaults.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = DockUnviewedContentDefaults.plist; path = Resources/DockUnviewedContentDefaults.plist; sourceTree = "<group>"; };
 		341DE02F07FE104700EB7B06 /* de */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = de; path = Resources/de.lproj/ESFileTransferProgressView.nib; sourceTree = "<group>"; };
@@ -4624,6 +4623,7 @@
 		77D903500B78CF1000B86C42 /* zhm */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = zhm; path = "Plugins/Purple Service/zhm"; sourceTree = "<group>"; };
 		7E1E8176063A3EEC00EB00F7 /* AIContextMenuTextView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AIContextMenuTextView.h; path = "Frameworks/Adium Framework/Source/AIContextMenuTextView.h"; sourceTree = "<group>"; };
 		7E1E8177063A3EEC00EB00F7 /* AIContextMenuTextView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = AIContextMenuTextView.m; path = "Frameworks/Adium Framework/Source/AIContextMenuTextView.m"; sourceTree = "<group>"; };
+		7E6F8A93105611B700C6D80D /* libotr.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libotr.framework; path = Frameworks/libotr.framework; sourceTree = "<group>"; };
 		7E824CCE06387FAF00813072 /* LinkEditor.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = LinkEditor.nib; path = Resources/LinkEditor.nib; sourceTree = SOURCE_ROOT; };
 		7E824CD106387FAF00813072 /* SHAutoValidatingTextView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SHAutoValidatingTextView.h; sourceTree = "<group>"; };
 		7E824CD206387FAF00813072 /* SHAutoValidatingTextView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SHAutoValidatingTextView.m; sourceTree = "<group>"; };
@@ -4827,6 +4827,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				7E6F8A94105611B700C6D80D /* libotr.framework in Frameworks */,
 				633405A90F9C2C7D003C77A9 /* AIUtilities.framework in Frameworks */,
 				639DF9140F97E639003C9A32 /* AdiumLibpurple.framework in Frameworks */,
 				3448758E06D1EBDF00DA778C /* Cocoa.framework in Frameworks */,
@@ -4849,7 +4850,6 @@
 				34B588A1058D833A00E7EF0D /* ExceptionHandling.framework in Frameworks */,
 				34C18B0D06CAC95400FF5FF9 /* SystemConfiguration.framework in Frameworks */,
 				638392F809D4D67A0067B9B7 /* Sparkle.framework in Frameworks */,
-				F58904F20A7828B9001F0ADC /* OTR.framework in Frameworks */,
 				9E1E1DFD0A96741500E16DFC /* LMX.framework in Frameworks */,
 				377EC8940AE9525B00CB7BDF /* PSMTabBarControl.framework in Frameworks */,
 				8163F99C0B318824002005EE /* Sparkle.framework in Frameworks */,
@@ -5152,7 +5152,7 @@
 				34D1AB510D693DEB00470520 /* RBSplitView.xcodeproj */,
 				3496A8E707CE6CA30055BBAB /* AutoHyperlinks.framework.xcodeproj */,
 				346636860D41541A006C9034 /* FriBidi.xcodeproj */,
-				341BDBBA0968BC9A00CF83F5 /* OTR.framework */,
+				7E6F8A93105611B700C6D80D /* libotr.framework */,
 				348E5ACA06D2A74C004C051C /* AddressBook.framework */,
 				F5819CE9032124CE01A8010A /* AppKit.framework */,
 				F531836F019E40BB01A80165 /* Carbon.framework */,
@@ -10042,23 +10042,23 @@
 			);
 			inputPaths = (
 				"$(SRCROOT)/Frameworks/libpurple.framework/Versions/Current/libpurple",
-				"$(SRCROOT)/Frameworks/Growl-WithInstaller.framework/Versions/A/Growl-WithInstaller",
+				"$(SRCROOT)/Frameworks/Growl/Versions/A/Growl-WithInstaller",
 				"$(SRCROOT)/Frameworks/LMX.framework/Versions/A/LMX",
 				"$(SRCROOT)/Frameworks/PSMTabBarControl.framework/Versions/A/PSMTabBarControl",
 				"$(SRCROOT)/Frameworks/Sparkle.framework/Versions/A/Sparkle",
-				"$(SRCROOT)/Frameworks/OTR.framework/Versions/A/OTR",
+				"$(SRCROOT)/Frameworks/libotr.framework/Versions/A/OTR",
 			);
 			outputPaths = (
-				"$(SRCROOT)/Frameworks/Growl-WithInstaller.framework",
+				"$(SRCROOT)/Frameworks/Growl.framework",
 				"$(SRCROOT)/Frameworks/libpurple.framework",
 				"$(SRCROOT)/Frameworks/LMX.framework",
 				"$(SRCROOT)/Frameworks/PSMTabBarControl.framework",
 				"$(SRCROOT)/Frameworks/Sparkle.framework",
-				"$(SRCROOT)/Frameworks/OTR.framework",
+				"$(SRCROOT)/Frameworks/libotr.framework",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "#############################################################################################\n# Set framework bundles to have their executables' dates, thereby letting Xcode suck less.  #\n#############################################################################################\ntouch \"$SRCROOT/Frameworks/libpurple.framework\"\ntouch \"$SRCROOT/Frameworks/Growl-WithInstaller.framework\"\ntouch \"$SRCROOT/Frameworks/LMX.framework\"\ntouch \"$SRCROOT/Frameworks/PSMTabBarControl.framework\"\ntouch \"$SRCROOT/Frameworks/Sparkle.framework\"\ntouch \"$SRCROOT/Frameworks/OTR.framework\"\n";
+			shellScript = "#############################################################################################\n# Set framework bundles to have their executables' dates, thereby letting Xcode suck less.  #\n#############################################################################################\ntouch \"$SRCROOT/Frameworks/libpurple.framework\"\ntouch \"$SRCROOT/Frameworks/Growl.framework\"\ntouch \"$SRCROOT/Frameworks/LMX.framework\"\ntouch \"$SRCROOT/Frameworks/PSMTabBarControl.framework\"\ntouch \"$SRCROOT/Frameworks/Sparkle.framework\"\ntouch \"$SRCROOT/Frameworks/libotr.framework\"\n";
 		};
 		F53C25AD0A2F95F100F7B73D /* ShellScript */ = {
 			isa = PBXShellScriptBuildPhase;
diff -r 4bcad311909f -r 349957b03894 Dependencies/build.sh
--- a/Dependencies/build.sh	Mon Sep 07 16:47:42 2009 -0400
+++ b/Dependencies/build.sh	Tue Sep 08 01:24:16 2009 -0400
@@ -155,6 +155,7 @@
 build_pkgconfig $@
 build_gettext $@
 build_glib $@
+build_otr $@
 
 build_meanwhile $@
 build_gadugadu $@
diff -r 4bcad311909f -r 349957b03894 Dependencies/phases/build_dependencies.sh
--- a/Dependencies/phases/build_dependencies.sh	Mon Sep 07 16:47:42 2009 -0400
+++ b/Dependencies/phases/build_dependencies.sh	Tue Sep 08 01:24:16 2009 -0400
@@ -113,6 +113,94 @@
 }
 
 ##
+# gpg-error
+#
+build_libgpgerror(){
+	prereq "gpgerror" \
+		"ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.7.tar.bz2"
+
+	quiet pushd "${ROOTDIR}/source/gpgerror"
+	
+	if needsconfigure $@; then
+	(
+		status "Configuring libgpg-error"
+		export CFLAGS="$ARCH_CFLAGS"
+		export LDFLAGS="$ARCH_LDFLAGS"
+		log ./configure --prefix="$ROOTDIR/build" \
+			--disable-shared \
+			--enable-static \
+			--disable-dependency-tracking
+	)
+	fi
+	
+	status "Building and installing gpg-error"
+	log make -j $NUMBER_OF_CORES
+	log make install
+	
+	quiet popd
+}
+
+##
+# gcrypt
+#
+# disable assembly to help build universal.
+#
+build_libgcrypt(){
+	build_libgpgerror
+	prereq "libgcrypt" \
+		"ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.4.tar.gz"
+
+	quiet pushd "${ROOTDIR}/source/libgcrypt"
+	
+	if needsconfigure $@; then
+	(
+	status "Configuring libgcrypt"
+	export CFLAGS="$ARCH_CFLAGS"
+	export LDFLAGS="$ARCH_LDFLAGS"
+	CONFIG_CMD="./configure --prefix=$ROOTDIR/build \
+		--disable-asm \
+		--disable-shared \
+		--enable-static \
+		--disable-dependency-tracking"
+	xconfigure "${BASE_CFLAGS}" "${BASE_LDFLAGS}" "${CONFIG_CMD}" \
+			"${ROOTDIR}/source/libgcrypt/config.h"
+	)
+	fi
+	status "Building and installing libgcrypt"
+	log make -j $NUMBER_OF_CORES
+	log make install
+	
+	quiet popd
+}
+
+##
+# Libotr
+#
+OTR_VERSION=2.2.0
+build_otr(){
+	build_libgcrypt
+	prereq "otr" \
+		"http://www.cypherpunks.ca/otr/libotr-3.2.0.tar.gz"
+	
+	quiet pushd "${ROOTDIR}/source/otr"
+	
+	if needsconfigure $@; then
+	(
+		status "Configuring libotr"
+		export CFLAGS="$ARCH_CFLAGS"
+		export LDFLAGS="$ARCH_LDFLAGS"
+		log ./configure --prefix="$ROOTDIR/build" \
+			--disable-dependency-tracking
+	)	
+	fi
+	status "Building and installing libotr"
+	log make -j $NUMBER_OF_CORES
+	log make install
+	
+	quiet popd
+}
+
+##
 # Meanwhile
 #
 MEANWHILE_VERSION=1
@@ -220,6 +308,8 @@
 	if needsconfigure $@; then
 	(
 		status "Configuring intltool"
+		export CFLAGS="$ARCH_CFLAGS"
+		export LDFLAGS="$ARCH_LDFLAGS"
 		log ./configure --prefix="$ROOTDIR/build" --disable-dependency-tracking
 	)
 	fi
diff -r 4bcad311909f -r 349957b03894 Dependencies/phases/make_frameworks.sh
--- a/Dependencies/phases/make_frameworks.sh	Mon Sep 07 16:47:42 2009 -0400
+++ b/Dependencies/phases/make_frameworks.sh	Tue Sep 08 01:24:16 2009 -0400
@@ -39,6 +39,15 @@
 	quiet mkdir "${gthreadDir}" || true
 	touch "${gthreadDir}/no_headers_here.txt"
 	
+	#libotr
+	status "Staging libotr headers"
+	local otrDir="${ROOTDIR}/build/lib/include/libotr-${OTR_VERSION}"
+	quiet mkdir "${otrDir}" || true
+	log cp -R "${ROOTDIR}/build/include/libotr/" "${otrDir}"
+	log cp "${ROOTDIR}/build/include/gcrypt.h" "${otrDir}"
+	log cp "${ROOTDIR}/build/include/gcrypt-module.h" "${otrDir}"
+	log cp "${ROOTDIR}/build/include/gpg-error.h" "${otrDir}"
+	
 	#meanwhile
 	status "Staging meanwhile non-headers"
 	local meanwhileDir="${ROOTDIR}/build/lib/include/libmeanwhile-${MEANWHILE_VERSION}"
@@ -110,6 +119,11 @@
 		"${ROOTDIR}/build/lib/libpurple.${LIBPURPLE_VERSION}.dylib" \
 		"${FRAMEWORK_DIR}"
 	
+	status "Making a framework for libotr..."
+	log python "${ROOTDIR}/framework_maker/frameworkize.py" \
+		"${ROOTDIR}/build/lib/libotr.${OTR_VERSION}.dylib" \
+		"${FRAMEWORK_DIR}"
+	
 	status "Adding the Adium framework header..."
 	log cp "${ROOTDIR}/libpurple-full.h" \
 		"${FRAMEWORK_DIR}/libpurple.subproj/libpurple.framework/Headers/libpurple.h"
diff -r 4bcad311909f -r 349957b03894 Dependencies/phases/utility.sh
--- a/Dependencies/phases/utility.sh	Mon Sep 07 16:47:42 2009 -0400
+++ b/Dependencies/phases/utility.sh	Tue Sep 08 01:24:16 2009 -0400
@@ -32,7 +32,13 @@
 
 Running command:
 	${localPWD}/${@:1}
-" >> ${LOG_FILE} >> ${ERR_FILE}
+" >> ${LOG_FILE}
+
+	echo "
+
+Running command:
+	${localPWD}/${@:1}
+" >> ${ERR_FILE}
 
 	(
 		${@:1}
@@ -289,19 +295,21 @@
 	done
 	
 	#copy pkgconfig files and modify prefix
-	local files="${ROOTDIR}/sandbox/root-${ARCHS[0]}/lib/pkgconfig/*"
-	for f in ${files} ; do
-		status "patching pkgconfig file: ${f}"
-		local basename=`basename ${f}`
-		local SEDREP=`echo $ROOTDIR | awk '{gsub("\\\\\/", "\\\\\\/");print}'`
-		local SEDPAT="s/^prefix=.*/prefix=${SEDREP}\\/build/"
-		sed -e "${SEDPAT}" "${f}" > "${ROOTDIR}/build/lib/pkgconfig/${basename}"
-	done
+	if [ -d "${ROOTDIR}/sandbox/root-${ARCHS[0]}/lib/pkgconfig" ] ; then
+		local files="${ROOTDIR}/sandbox/root-${ARCHS[0]}/lib/pkgconfig/*"
+		for f in ${files} ; do
+			status "patching pkgconfig file: ${f}"
+			local basename=`basename ${f}`
+			local SEDREP=`echo $ROOTDIR | awk '{gsub("\\\\\/", "\\\\\\/");print}'`
+			local SEDPAT="s/^prefix=.*/prefix=${SEDREP}\\/build/"
+			sed -e "${SEDPAT}" "${f}" > "${ROOTDIR}/build/lib/pkgconfig/${basename}"
+		done
+	fi
 	
 	#copy .la files and modify
 	local files="${ROOTDIR}/sandbox/root-${ARCHS[0]}/lib/*.la"
 	for f in ${files} ; do
-		status "patching pkgconfig file: ${f}"
+		status "patching .la file: ${f}"
 		local basename=`basename ${f}`
 		local SEDREP=`echo $ROOTDIR | awk '{gsub("\\\\\/", "\\\\\\/");print}'`
 		local SEDPAT="s/^libdir=.*/libdir=\'${SEDREP}\\/build\\/lib\'/"
diff -r 4bcad311909f -r 349957b03894 Frameworks/OTR.framework/Headers
--- a/Frameworks/OTR.framework/Headers	Mon Sep 07 16:47:42 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Versions/Current/Headers
\ No newline at end of file
diff -r 4bcad311909f -r 349957b03894 Frameworks/OTR.framework/OTR
--- a/Frameworks/OTR.framework/OTR	Mon Sep 07 16:47:42 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Versions/Current/OTR
\ No newline at end of file
diff -r 4bcad311909f -r 349957b03894 Frameworks/OTR.framework/Resources
--- a/Frameworks/OTR.framework/Resources	Mon Sep 07 16:47:42 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Versions/Current/Resources
\ No newline at end of file
diff -r 4bcad311909f -r 349957b03894 Frameworks/OTR.framework/Versions/A/Headers/auth.h
--- a/Frameworks/OTR.framework/Versions/A/Headers/auth.h	Mon Sep 07 16:47:42 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
- *  Off-the-Record Messaging library
- *  Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
- *                           <otr at cypherpunks.ca>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of version 2.1 of the GNU Lesser General
- *  Public License as published by the Free Software Foundation.
- *
- *  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
- *  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, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __AUTH_H__
-#define __AUTH_H__
-
-#include <gcrypt.h>
-#include "dh.h"
-
-typedef enum {
-    OTRL_AUTHSTATE_NONE,
-    OTRL_AUTHSTATE_AWAITING_DHKEY,
-    OTRL_AUTHSTATE_AWAITING_REVEALSIG,
-    OTRL_AUTHSTATE_AWAITING_SIG,
-    OTRL_AUTHSTATE_V1_SETUP
-} OtrlAuthState;
-
-typedef struct {
-    OtrlAuthState authstate;              /* Our state */
-
-    DH_keypair our_dh;                    /* Our D-H key */
-    unsigned int our_keyid;               /* ...and its keyid */
-
-    unsigned char *encgx;                 /* The encrypted value of g^x */
-    size_t encgx_len;                     /*  ...and its length */
-    unsigned char r[16];                  /* The encryption key */
-
-    unsigned char hashgx[32];             /* SHA256(g^x) */
-
-    gcry_mpi_t their_pub;                 /* Their D-H public key */
-    unsigned int their_keyid;             /*  ...and its keyid */
-
-    gcry_cipher_hd_t enc_c, enc_cp;       /* c and c' encryption keys */
-    gcry_md_hd_t mac_m1, mac_m1p;         /* m1 and m1' MAC keys */
-    gcry_md_hd_t mac_m2, mac_m2p;         /* m2 and m2' MAC keys */
-
-    unsigned char their_fingerprint[20];  /* The fingerprint of their
-					     long-term signing key */
-
-    int initiated;                        /* Did we initiate this
-					     authentication? */
-
-    unsigned int protocol_version;        /* The protocol version number
-					     used to authenticate. */
-
-    unsigned char secure_session_id[20];  /* The secure session id */
-    size_t secure_session_id_len;         /* And its actual length,
-					     which may be either 20 (for
-					     v1) or 8 (for v2) */
-    OtrlSessionIdHalf session_id_half;    /* Which half of the session
-					     id gets shown in bold */
-
-    char *lastauthmsg;                    /* The last auth message
-					     (base-64 encoded) we sent,
-					     in case we need to
-					     retransmit it. */
-} OtrlAuthInfo;
-
-#include "privkey-t.h"
-
-/*
- * Initialize the fields of an OtrlAuthInfo (already allocated).
- */
-void otrl_auth_new(OtrlAuthInfo *auth);
-
-/*
- * Clear the fields of an OtrlAuthInfo (but leave it allocated).
- */
-void otrl_auth_clear(OtrlAuthInfo *auth);
-
-/*
- * Start a fresh AKE (version 2) using the given OtrlAuthInfo.  Generate
- * a fresh DH keypair to use.  If no error is returned, the message to
- * transmit will be contained in auth->lastauthmsg.
- */
-gcry_error_t otrl_auth_start_v2(OtrlAuthInfo *auth);
-
-/*
- * Handle an incoming D-H Commit Message.  If no error is returned, the
- * message to send will be left in auth->lastauthmsg.  Generate a fresh
- * keypair to use.
- */
-gcry_error_t otrl_auth_handle_commit(OtrlAuthInfo *auth,
-	const char *commitmsg);
-
-/*
- * Handle an incoming D-H Key Message.  If no error is returned, and
- * *havemsgp is 1, the message to sent will be left in auth->lastauthmsg.
- * Use the given private authentication key to sign messages.
- */
-gcry_error_t otrl_auth_handle_key(OtrlAuthInfo *auth, const char *keymsg,
-	int *havemsgp, OtrlPrivKey *privkey);
-
-/*
- * Handle an incoming Reveal Signature Message.  If no error is
- * returned, and *havemsgp is 1, the message to be sent will be left in
- * auth->lastauthmsg.  Use the given private authentication key to sign
- * messages.  Call the auth_succeeded callback if authentication is
- * successful.
- */
-gcry_error_t otrl_auth_handle_revealsig(OtrlAuthInfo *auth,
-	const char *revealmsg, int *havemsgp, OtrlPrivKey *privkey,
-	gcry_error_t (*auth_succeeded)(const OtrlAuthInfo *auth, void *asdata),
-	void *asdata);
-
-/*
- * Handle an incoming Signature Message.  If no error is returned, and
- * *havemsgp is 1, the message to be sent will be left in
- * auth->lastauthmsg.  Call the auth_succeeded callback if
- * authentication is successful.
- */
-gcry_error_t otrl_auth_handle_signature(OtrlAuthInfo *auth,
-	const char *sigmsg, int *havemsgp,
-	gcry_error_t (*auth_succeeded)(const OtrlAuthInfo *auth, void *asdata),
-	void *asdata);
-
-/*
- * Start a fresh AKE (version 1) using the given OtrlAuthInfo.  If
- * our_dh is NULL, generate a fresh DH keypair to use.  Otherwise, use a
- * copy of the one passed (with the given keyid).  Use the given private
- * key to sign the message.  If no error is returned, the message to
- * transmit will be contained in auth->lastauthmsg.
- */
-gcry_error_t otrl_auth_start_v1(OtrlAuthInfo *auth, DH_keypair *our_dh,
-	unsigned int our_keyid, OtrlPrivKey *privkey);
-
-/*
- * Handle an incoming v1 Key Exchange Message.  If no error is returned,
- * and *havemsgp is 1, the message to be sent will be left in
- * auth->lastauthmsg.  Use the given private authentication key to sign
- * messages.  Call the auth_secceeded callback if authentication is
- * successful.  If non-NULL, use a copy of the given D-H keypair, with
- * the given keyid.
- */
-gcry_error_t otrl_auth_handle_v1_key_exchange(OtrlAuthInfo *auth,
-	const char *keyexchmsg, int *havemsgp, OtrlPrivKey *privkey,
-	DH_keypair *our_dh, unsigned int our_keyid,
-	gcry_error_t (*auth_succeeded)(const OtrlAuthInfo *auth, void *asdata),
-	void *asdata);
-
-#endif
diff -r 4bcad311909f -r 349957b03894 Frameworks/OTR.framework/Versions/A/Headers/b64.h
--- a/Frameworks/OTR.framework/Versions/A/Headers/b64.h	Mon Sep 07 16:47:42 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- *  Off-the-Record Messaging library
- *  Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
- *                           <otr at cypherpunks.ca>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of version 2.1 of the GNU Lesser General
- *  Public License as published by the Free Software Foundation.
- *
- *  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
- *  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, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __B64_H__
-#define __B64_H__
-
-/*
- * base64 encode data.  Insert no linebreaks or whitespace.
- *
- * The buffer base64data must contain at least ((datalen+2)/3)*4 bytes of
- * space.  This function will return the number of bytes actually used.
- */
-size_t otrl_base64_encode(char *base64data, const unsigned char *data,
-	size_t datalen);
-
-/*
- * base64 decode data.  Skip non-base64 chars, and terminate at the
- * first '=', or the end of the buffer.
- *
- * The buffer data must contain at least (base64len / 4) * 3 bytes of
- * space.  This function will return the number of bytes actually used.
- */
-size_t otrl_base64_decode(unsigned char *data, const char *base64data,
-	size_t base64len);
-
-/*
- * Base64-encode a block of data, stick "?OTR:" and "." around it, and
- * return the result, or NULL in the event of a memory error.
- */
-char *otrl_base64_otr_encode(const unsigned char *buf, size_t buflen);
-
-/*
- * Base64-decode the portion of the given message between "?OTR:" and
- * ".".  Set *bufp to the decoded data, and set *lenp to its length.
- * The caller must free() the result.  Return 0 on success, -1 on a
- * memory error, or -2 on invalid input.
- */
-int otrl_base64_otr_decode(const char *msg, unsigned char **bufp,
-	size_t *lenp);
-
-#endif
diff -r 4bcad311909f -r 349957b03894 Frameworks/OTR.framework/Versions/A/Headers/context.h
--- a/Frameworks/OTR.framework/Versions/A/Headers/context.h	Mon Sep 07 16:47:42 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-/*
- *  Off-the-Record Messaging library
- *  Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
- *                           <otr at cypherpunks.ca>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of version 2.1 of the GNU Lesser General
- *  Public License as published by the Free Software Foundation.
- *
- *  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
- *  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, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __CONTEXT_H__
-#define __CONTEXT_H__
-
-#include <gcrypt.h>
-
-#include "dh.h"
-#include "auth.h"
-#include "sm.h"
-
-typedef enum {
-    OTRL_MSGSTATE_PLAINTEXT,           /* Not yet started an encrypted
-					  conversation */
-    OTRL_MSGSTATE_ENCRYPTED,           /* Currently in an encrypted
-					  conversation */
-    OTRL_MSGSTATE_FINISHED             /* The remote side has sent us a
-					  notification that he has ended
-					  his end of the encrypted
-					  conversation; prevent any
-					  further messages from being
-					  sent to him. */
-} OtrlMessageState;
-
-typedef struct s_fingerprint {
-    struct s_fingerprint *next;        /* The next fingerprint in the list */
-    struct s_fingerprint **tous;       /* A pointer to the pointer to us */
-    unsigned char *fingerprint;        /* The fingerprint, or NULL */
-    struct context *context;           /* The context to which we belong */
-    char *trust;                       /* The trust level of the fingerprint */
-} Fingerprint;
-
-typedef struct context {
-    struct context * next;             /* Linked list pointer */
-    struct context ** tous;            /* A pointer to the pointer to us */
-
-    char * username;                   /* The user this context is for */
-    char * accountname;                /* The username is relative to
-					  this account... */
-    char * protocol;                   /* ... and this protocol */
-
-    char *fragment;                    /* The part of the fragmented message
-					  we've seen so far */
-    size_t fragment_len;               /* The length of fragment */
-    unsigned short fragment_n;         /* The total number of fragments
-					  in this message */
-    unsigned short fragment_k;         /* The highest fragment number
-					  we've seen so far for this
-					  message */
-
-    OtrlMessageState msgstate;         /* The state of message disposition
-					  with this user */
-    OtrlAuthInfo auth;                 /* The state of ongoing
-					  authentication with this user */
-
-    Fingerprint fingerprint_root;      /* The root of a linked list of
-					  Fingerprints entries */
-    Fingerprint *active_fingerprint;   /* Which fingerprint is in use now?
-                                          A pointer into the above list */
-    unsigned int their_keyid;          /* current keyid used by other side;
-                                          this is set to 0 if we get a
-					  OTRL_TLV_DISCONNECTED message from
-					  them. */
-    gcry_mpi_t their_y;                /* Y[their_keyid] (their DH pubkey) */
-    gcry_mpi_t their_old_y;            /* Y[their_keyid-1] (their prev DH
-					  pubkey) */
-    unsigned int our_keyid;            /* current keyid used by us */
-    DH_keypair our_dh_key;             /* DH key[our_keyid] */
-    DH_keypair our_old_dh_key;         /* DH key[our_keyid-1] */
-
-    DH_sesskeys sesskeys[2][2];        /* sesskeys[i][j] are the session keys
-					  derived from DH key[our_keyid-i]
-					  and mpi Y[their_keyid-j] */
-
-    unsigned char sessionid[20];       /* The sessionid and bold half */
-    size_t sessionid_len;              /* determined when this private */
-    OtrlSessionIdHalf sessionid_half;  /* connection was established. */
-
-    unsigned int protocol_version;     /* The version of OTR in use */
-
-    unsigned char *preshared_secret;   /* A secret you share with this
-					  user, in order to do
-					  authentication. */
-    size_t preshared_secret_len;       /* The length of the above secret. */
-
-    /* saved mac keys to be revealed later */
-    unsigned int numsavedkeys;
-    unsigned char *saved_mac_keys;
-
-    /* generation number: increment every time we go private, and never
-     * reset to 0 (unless we remove the context entirely) */
-    unsigned int generation;
-
-    time_t lastsent;      /* The last time a Data Message was sent */
-    char *lastmessage;    /* The plaintext of the last Data Message sent */
-    int may_retransmit;   /* Is the last message eligible for
-			     retransmission? */
-
-    enum {
-	OFFER_NOT,
-	OFFER_SENT,
-	OFFER_REJECTED,
-	OFFER_ACCEPTED
-    } otr_offer;          /* Has this correspondent repsponded to our
-			     OTR offers? */
-
-    /* Application data to be associated with this context */
-    void *app_data;
-    /* A function to free the above data when we forget this context */
-    void (*app_data_free)(void *);
-
-    OtrlSMState *smstate;              /* The state of the current
-                                          socialist millionaires exchange */
-} ConnContext;
-
-#include "userstate.h"
-
-/* Look up a connection context by name/account/protocol from the given
- * OtrlUserState.  If add_if_missing is true, allocate and return a new
- * context if one does not currently exist.  In that event, call
- * add_app_data(data, context) so that app_data and app_data_free can be
- * filled in by the application, and set *addedp to 1. */
-ConnContext * otrl_context_find(OtrlUserState us, const char *user,
-	const char *accountname, const char *protocol, int add_if_missing,
-	int *addedp,
-	void (*add_app_data)(void *data, ConnContext *context), void *data);
-
-/* Find a fingerprint in a given context, perhaps adding it if not
- * present. */
-Fingerprint *otrl_context_find_fingerprint(ConnContext *context,
-	unsigned char fingerprint[20], int add_if_missing, int *addedp);
-
-/* Set the trust level for a given fingerprint */
-void otrl_context_set_trust(Fingerprint *fprint, const char *trust);
-
-/* Set the preshared secret for a given fingerprint.  Note that this
- * currently only stores the secret in the ConnContext structure, but
- * doesn't yet do anything with it. */
-void otrl_context_set_preshared_secret(ConnContext *context,
-	const unsigned char *secret, size_t secret_len);
-
-/* Force a context into the OTRL_MSGSTATE_FINISHED state. */
-void otrl_context_force_finished(ConnContext *context);
-
-/* Force a context into the OTRL_MSGSTATE_PLAINTEXT state. */
-void otrl_context_force_plaintext(ConnContext *context);
-
-/* Forget a fingerprint (so long as it's not the active one.  If it's a
- * fingerprint_root, forget the whole context (as long as
- * and_maybe_context is set, and it's PLAINTEXT).  Also, if it's not
- * the fingerprint_root, but it's the only fingerprint, and we're
- * PLAINTEXT, forget the whole context if and_maybe_context is set. */
-void otrl_context_forget_fingerprint(Fingerprint *fprint,
-	int and_maybe_context);
-
-/* Forget a whole context, so long as it's PLAINTEXT. */
-void otrl_context_forget(ConnContext *context);
-
-/* Forget all the contexts in a given OtrlUserState. */
-void otrl_context_forget_all(OtrlUserState us);
-
-#endif
diff -r 4bcad311909f -r 349957b03894 Frameworks/OTR.framework/Versions/A/Headers/dh.h
--- a/Frameworks/OTR.framework/Versions/A/Headers/dh.h	Mon Sep 07 16:47:42 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
- *  Off-the-Record Messaging library
- *  Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
- *                           <otr at cypherpunks.ca>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of version 2.1 of the GNU Lesser General
- *  Public License as published by the Free Software Foundation.
- *
- *  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
- *  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, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __DH_H__
-#define __DH_H__
-
-#define DH1536_GROUP_ID 5
-
-typedef struct {
-    unsigned int groupid;
-    gcry_mpi_t priv, pub;
-} DH_keypair;
-
-/* Which half of the secure session id should be shown in bold? */
-typedef enum {
-    OTRL_SESSIONID_FIRST_HALF_BOLD,
-    OTRL_SESSIONID_SECOND_HALF_BOLD
-} OtrlSessionIdHalf;
-
-typedef struct {
-    unsigned char sendctr[16];
-    unsigned char rcvctr[16];
-    gcry_cipher_hd_t sendenc;
-    gcry_cipher_hd_t rcvenc;
-    gcry_md_hd_t sendmac;
-    unsigned char sendmackey[20];
-    int sendmacused;
-    gcry_md_hd_t rcvmac;
-    unsigned char rcvmackey[20];
-    int rcvmacused;
-} DH_sesskeys;
-
-/*
- * Call this once, at plugin load time.  It sets up the modulus and
- * generator MPIs.
- */
-void otrl_dh_init(void);
-
-/*
- * Initialize the fields of a DH keypair.
- */
-void otrl_dh_keypair_init(DH_keypair *kp);
-
-/*
- * Copy a DH_keypair.
- */
-void otrl_dh_keypair_copy(DH_keypair *dst, const DH_keypair *src);
-
-/*
- * Deallocate the contents of a DH_keypair (but not the DH_keypair
- * itself)
- */
-void otrl_dh_keypair_free(DH_keypair *kp);
-
-/*
- * Generate a DH keypair for a specified group.
- */ 
-gcry_error_t otrl_dh_gen_keypair(unsigned int groupid, DH_keypair *kp);
-
-/*
- * Construct session keys from a DH keypair and someone else's public
- * key.
- */
-gcry_error_t otrl_dh_session(DH_sesskeys *sess, const DH_keypair *kp,
-	gcry_mpi_t y);
-
-/*
- * Compute the secure session id, two encryption keys, and four MAC keys
- * given our DH key and their DH public key.
- */
-gcry_error_t otrl_dh_compute_v2_auth_keys(const DH_keypair *our_dh,
-	gcry_mpi_t their_pub, unsigned char *sessionid, size_t *sessionidlenp,
-	gcry_cipher_hd_t *enc_c, gcry_cipher_hd_t *enc_cp,
-	gcry_md_hd_t *mac_m1, gcry_md_hd_t *mac_m1p,
-	gcry_md_hd_t *mac_m2, gcry_md_hd_t *mac_m2p);
-
-/*
- * Compute the secure session id, given our DH key and their DH public
- * key.
- */
-gcry_error_t otrl_dh_compute_v1_session_id(const DH_keypair *our_dh,
-	gcry_mpi_t their_pub, unsigned char *sessionid, size_t *sessionidlenp,
-	OtrlSessionIdHalf *halfp);
-
-/*
- * Deallocate the contents of a DH_sesskeys (but not the DH_sesskeys
- * itself)
- */
-void otrl_dh_session_free(DH_sesskeys *sess);
-
-/*
- * Blank out the contents of a DH_sesskeys (without releasing it)
- */
-void otrl_dh_session_blank(DH_sesskeys *sess);
-
-/* Increment the top half of a counter block */
-void otrl_dh_incctr(unsigned char *ctr);
-
-/* Compare two counter values (8 bytes each).  Return 0 if ctr1 == ctr2,
- * < 0 if ctr1 < ctr2 (as unsigned 64-bit values), > 0 if ctr1 > ctr2. */
-int otrl_dh_cmpctr(const unsigned char *ctr1, const unsigned char *ctr2);
-
-#endif
diff -r 4bcad311909f -r 349957b03894 Frameworks/OTR.framework/Versions/A/Headers/gcrypt-module.h
--- a/Frameworks/OTR.framework/Versions/A/Headers/gcrypt-module.h	Mon Sep 07 16:47:42 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-/* gcrypt-module.h - GNU cryptographic library interface
- * Copyright (C) 2003 Free Software Foundation, Inc.
- *
- * This file is part of Libgcrypt.
- *
- * Libgcrypt 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; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * Libgcrypt 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-/* This file contains the necessary declarations/definitions for
-   working with Libgcrypt modules.  */
-
-#ifndef _GCRYPT_MODULE_H
-#define _GCRYPT_MODULE_H
-
-#ifdef __cplusplus
-extern "C" {
-#if 0 /* keep Emacsens's auto-indent happy */
-}
-#endif
-#endif
-
-/* This type represents a `module'.  */
-typedef struct gcry_module *gcry_module_t;
-
-/* Check that the library fulfills the version requirement.  */
-
-/* Type for the cipher_setkey function.  */
-typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
-						 const unsigned char *key,
-						 unsigned keylen);
-
-/* Type for the cipher_encrypt function.  */
-typedef void (*gcry_cipher_encrypt_t) (void *c,
-				       unsigned char *outbuf,
-				       const unsigned char *inbuf);
-
-/* Type for the cipher_decrypt function.  */
-typedef void (*gcry_cipher_decrypt_t) (void *c,
-				       unsigned char *outbuf,
-				       const unsigned char *inbuf);
-
-/* Type for the cipher_stencrypt function.  */
-typedef void (*gcry_cipher_stencrypt_t) (void *c,
-					 unsigned char *outbuf,
-					 const unsigned char *inbuf,
-					 unsigned int n);
-
-/* Type for the cipher_stdecrypt function.  */
-typedef void (*gcry_cipher_stdecrypt_t) (void *c,
-					 unsigned char *outbuf,
-					 const unsigned char *inbuf,
-					 unsigned int n);
-
-typedef struct gcry_cipher_oid_spec
-{
-  const char *oid;
-  int mode;
-} gcry_cipher_oid_spec_t;
-
-/* Module specification structure for ciphers.  */
-typedef struct gcry_cipher_spec
-{
-  const char *name;
-  const char **aliases;
-  gcry_cipher_oid_spec_t *oids;
-  size_t blocksize;
-  size_t keylen;
-  size_t contextsize;
-  gcry_cipher_setkey_t setkey;
-  gcry_cipher_encrypt_t encrypt;
-  gcry_cipher_decrypt_t decrypt;
-  gcry_cipher_stencrypt_t stencrypt;
-  gcry_cipher_stdecrypt_t stdecrypt;
-} gcry_cipher_spec_t;
-
-/* Register a new cipher module whose specification can be found in
-   CIPHER.  On success, a new algorithm ID is stored in ALGORITHM_ID
-   and a pointer representhing this module is stored in MODULE.  */
-gcry_error_t gcry_cipher_register (gcry_cipher_spec_t *cipher,
-				   unsigned int *algorithm_id,
-				   gcry_module_t *module);
-
-/* Unregister the cipher identified by MODULE, which must have been
-   registered with gcry_cipher_register.  */
-void gcry_cipher_unregister (gcry_module_t module);
-
-/* ********************** */
-
-/* Type for the pk_generate function.  */
-typedef gcry_err_code_t (*gcry_pk_generate_t) (int algo,
-					       unsigned int nbits,
-					       unsigned long use_e,
-					       gcry_mpi_t *skey,
-					       gcry_mpi_t **retfactors);
-
-/* Type for the pk_check_secret_key function.  */
-typedef gcry_err_code_t (*gcry_pk_check_secret_key_t) (int algo,
-						       gcry_mpi_t *skey);
-
-/* Type for the pk_encrypt function.  */
-typedef gcry_err_code_t (*gcry_pk_encrypt_t) (int algo,
-					      gcry_mpi_t *resarr,
-					      gcry_mpi_t data,
-					      gcry_mpi_t *pkey,
-					      int flags);
-
-/* Type for the pk_decrypt function.  */
-typedef gcry_err_code_t (*gcry_pk_decrypt_t) (int algo,
-					      gcry_mpi_t *result,
-					      gcry_mpi_t *data,
-					      gcry_mpi_t *skey,
-					      int flags);
-
-/* Type for the pk_sign function.  */
-typedef gcry_err_code_t (*gcry_pk_sign_t) (int algo,
-					   gcry_mpi_t *resarr,
-					   gcry_mpi_t data,
-					   gcry_mpi_t *skey);
-
-/* Type for the pk_verify function.  */
-typedef gcry_err_code_t (*gcry_pk_verify_t) (int algo,
-					     gcry_mpi_t hash,
-					     gcry_mpi_t *data,
-					     gcry_mpi_t *pkey,
-					     int (*cmp) (void *, gcry_mpi_t),
-					     void *opaquev);
-
-/* Type for the pk_get_nbits function.  */
-typedef unsigned (*gcry_pk_get_nbits_t) (int algo, gcry_mpi_t *pkey);
-
-/* Module specification structure for message digests.  */
-typedef struct gcry_pk_spec




More information about the commits mailing list