From: <ul...@us...> - 2010-10-11 18:50:45
|
Revision: 43 http://adc.svn.sourceforge.net/adc/?rev=43&view=rev Author: ullner Date: 2010-10-11 18:50:39 +0000 (Mon, 11 Oct 2010) Log Message: ----------- Added Paths: ----------- trunk/Source/Microsoft Visual Studio/ trunk/Source/Microsoft Visual Studio/ADCLibrary.csproj Added: trunk/Source/Microsoft Visual Studio/ADCLibrary.csproj =================================================================== --- trunk/Source/Microsoft Visual Studio/ADCLibrary.csproj (rev 0) +++ trunk/Source/Microsoft Visual Studio/ADCLibrary.csproj 2010-10-11 18:50:39 UTC (rev 43) @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{F9C721FB-A66D-4D2A-B49E-BB41E4946A24}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ADCLibrary</RootNamespace> + <AssemblyName>ADCLibrary</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\Helper.cs"> + <Link>Helper.cs</Link> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:22:27
|
Revision: 60 http://adc.svn.sourceforge.net/adc/?rev=60&view=rev Author: ullner Date: 2010-10-31 12:22:20 +0000 (Sun, 31 Oct 2010) Log Message: ----------- add some files.. Modified Paths: -------------- trunk/Source/Helper.cs trunk/Source/Microsoft Visual Studio/ADCLibraryTest/ADCLibraryTest.csproj trunk/Source/readme.txt Added Paths: ----------- trunk/Source/Microsoft Visual Studio/ADCLibrary/ADCLibrary.sln trunk/Source/Microsoft Visual Studio/ADCLibrary.sln Modified: trunk/Source/Helper.cs =================================================================== --- trunk/Source/Helper.cs 2010-10-29 20:55:08 UTC (rev 59) +++ trunk/Source/Helper.cs 2010-10-31 12:22:20 UTC (rev 60) @@ -27,7 +27,6 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; using System.Text.RegularExpressions; @@ -56,5 +55,18 @@ return strOutput; } + + //public static string UnEscape(string strInput) + //{ + // string strOutput = strInput; + + // strOutput = strOutput.Replace("\\t", "\t"); + + // strOutput = strOutput.Replace("\\\\", "\\"); + + + + + //} } } Added: trunk/Source/Microsoft Visual Studio/ADCLibrary/ADCLibrary.sln =================================================================== --- trunk/Source/Microsoft Visual Studio/ADCLibrary/ADCLibrary.sln (rev 0) +++ trunk/Source/Microsoft Visual Studio/ADCLibrary/ADCLibrary.sln 2010-10-31 12:22:20 UTC (rev 60) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ADCLibrary", "ADCLibrary.csproj", "{F9C721FB-A66D-4D2A-B49E-BB41E4946A24}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/Source/Microsoft Visual Studio/ADCLibrary.sln =================================================================== --- trunk/Source/Microsoft Visual Studio/ADCLibrary.sln (rev 0) +++ trunk/Source/Microsoft Visual Studio/ADCLibrary.sln 2010-10-31 12:22:20 UTC (rev 60) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ADCLibrary", "ADCLibrary.csproj", "{F9C721FB-A66D-4D2A-B49E-BB41E4946A24}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9C721FB-A66D-4D2A-B49E-BB41E4946A24}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Modified: trunk/Source/Microsoft Visual Studio/ADCLibraryTest/ADCLibraryTest.csproj =================================================================== --- trunk/Source/Microsoft Visual Studio/ADCLibraryTest/ADCLibraryTest.csproj 2010-10-29 20:55:08 UTC (rev 59) +++ trunk/Source/Microsoft Visual Studio/ADCLibraryTest/ADCLibraryTest.csproj 2010-10-31 12:22:20 UTC (rev 60) @@ -40,6 +40,9 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> + <Compile Include="..\..\CodeTest.cs"> + <Link>CodeTest.cs</Link> + </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> Modified: trunk/Source/readme.txt =================================================================== --- trunk/Source/readme.txt 2010-10-29 20:55:08 UTC (rev 59) +++ trunk/Source/readme.txt 2010-10-31 12:22:20 UTC (rev 60) @@ -1 +1,43 @@ -All code that is submitted to the ADCProject should have a note specifying the transfer of copyright to the ADCProject. \ No newline at end of file + +Table of content + +1. Code structure + +All code shall follow the following general structure for naming convention; +* Namespace or package name should be ADC +* Files, classes and most (see below for exceptions) function names are named with initial upper case letter and upper case letters starting each new word. An abbreviation shall be spelt in all upper case letters. +Examples: file TigerTreeHashImplementation.h, class TTHImplementation, function CalculateTTH() +* All member variables shall be named with first word in lower case and upper case letters starting each new word. An abbreviation shall be spelt in all upper case letters. All variables shall be prefixed with an underscore ('_') or as the language recommendation unless the language is listed as below; + C++: m_ + C#: _ +Examples: m_fooBar, _fooBar +* All member properties (e.g. in C#) shall be named similarly as Files, classes and functions. In languages that do not support properties, function implementation of properties (get/set), 'get' and 'set' shall be prefixed with the 'property' name. +Examples: MessageType, getMessageType(), setMessageType(...) +* Function scoped variables shall be named with first word in lower case and upper case letters starting each new word. An abbreviation shall be spelt in all upper case letters. +Examples: lifeAndMeaningOfLife, debugSource + +Block structure +* Ifs and loops should always be surrounded by a code block, regardless if the code blocks are needed or not. +Example: +a) OK: if( 42 == lifeAndMeaningOfLife ) { print "42" } +b) Not OK: if ( 42 == lifeAndMeaningOfLife ) print "42" + +Code/Type safety +* Implementations should always strive to be as compile-time safe as possible. +* Functions should be as const-correct as possible. All get() functions should be constant. +Example: int getFooBar() const; + +Documentation +* All files, classes, functions and member variables shall be documented. +* All files shall contain a copyright notice pointing to the ADCProject and the New BSD license. See 2. Code license below. + +Return values +* Functions should return as few values as possible and instead rely on references as funtion parameters. + +2. Code license + +All code that is submitted to the ADCProject should have a note specifying the transfer of copyright to the ADCProject. + +The LICENSE is New BSD License (3-clause BSD license). + +See the file LICENSE for the text to use in each file. \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:24:14
|
Revision: 61 http://adc.svn.sourceforge.net/adc/?rev=61&view=rev Author: ullner Date: 2010-10-31 12:24:08 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Added Paths: ----------- trunk/Source/cpp/ trunk/Source/csharp/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2010-10-31 12:35:29
|
Revision: 65 http://adc.svn.sourceforge.net/adc/?rev=65&view=rev Author: ullner Date: 2010-10-31 12:35:23 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Removed Paths: ------------- trunk/Source/CodeTest.cs trunk/Source/Helper.cs trunk/Source/Microsoft Visual Studio/ Deleted: trunk/Source/CodeTest.cs =================================================================== --- trunk/Source/CodeTest.cs 2010-10-31 12:34:44 UTC (rev 64) +++ trunk/Source/CodeTest.cs 2010-10-31 12:35:23 UTC (rev 65) @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ADC -{ - public class CodeTest - { - public void TestHelper() - { - } - } -} Deleted: trunk/Source/Helper.cs =================================================================== --- trunk/Source/Helper.cs 2010-10-31 12:34:44 UTC (rev 64) +++ trunk/Source/Helper.cs 2010-10-31 12:35:23 UTC (rev 65) @@ -1,72 +0,0 @@ -/* -Copyright (c) 2010, ADCProject -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the ADCProject nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ADCProject BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Text; -using System.Text.RegularExpressions; - -namespace ADC -{ - public class Helper - { - /// <summary> - /// Escapes an ADC string. - /// </summary> - /// <param name="strInitial">The input string value.</param> - /// <returns>The escaped string value.</returns> - public static string Escape(string strInput) - { - string strOutput = strInput; - - // Escape backslash - strOutput = strOutput.Replace("\\", "\\\\"); - - // Escape tab - strOutput = strOutput.Replace("\t", "\\t"); - - // Escape space - Regex regex = new Regex(@"[ ]{1,}", RegexOptions.None); - strOutput = regex.Replace(strOutput, @"\s"); - - return strOutput; - } - - //public static string UnEscape(string strInput) - //{ - // string strOutput = strInput; - - // strOutput = strOutput.Replace("\\t", "\t"); - - // strOutput = strOutput.Replace("\\\\", "\\"); - - - - - //} - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ul...@us...> - 2012-08-17 16:37:09
|
Revision: 87 http://adc.svn.sourceforge.net/adc/?rev=87&view=rev Author: ullner Date: 2012-08-17 16:37:03 +0000 (Fri, 17 Aug 2012) Log Message: ----------- Added keyprint generation (for KEYP) based on OpenSSL and Python. Modified Paths: -------------- trunk/Source/Python/bloom.py Added Paths: ----------- trunk/Source/scripts/ trunk/Source/scripts/keyp_keyprint_generation.sh trunk/Source/scripts/keyp_keyprint_generation_readme.txt Modified: trunk/Source/Python/bloom.py =================================================================== --- trunk/Source/Python/bloom.py 2012-07-16 19:55:49 UTC (rev 86) +++ trunk/Source/Python/bloom.py 2012-08-17 16:37:03 UTC (rev 87) @@ -1,5 +1,5 @@ from math import log, ceil -import base64, sys +import sys import base32 try: from bitarray import bitarray Added: trunk/Source/scripts/keyp_keyprint_generation.sh =================================================================== --- trunk/Source/scripts/keyp_keyprint_generation.sh (rev 0) +++ trunk/Source/scripts/keyp_keyprint_generation.sh 2012-08-17 16:37:03 UTC (rev 87) @@ -0,0 +1,3 @@ +#!/bin/sh + +openssl x509 -noout -fingerprint -sha256 < "$1" | cut -d '=' -f 2 | tr -d ":" | python -c "import sys; import base64; print base64.b32encode(base64.b16decode(sys.stdin.readline()))" | tr -d "=" \ No newline at end of file Added: trunk/Source/scripts/keyp_keyprint_generation_readme.txt =================================================================== --- trunk/Source/scripts/keyp_keyprint_generation_readme.txt (rev 0) +++ trunk/Source/scripts/keyp_keyprint_generation_readme.txt 2012-08-17 16:37:03 UTC (rev 87) @@ -0,0 +1,13 @@ +This bash script generates a keyprint of a particular certificate in Linux, as used in the KEYP extension. + +The script uses OpenSSL, filters all the verbosity OpenSSL adds and then uses Python to encode it into Base32. + +The script first calls OpenSSL to get the fingerprint then remove the verbosity and the colons convert with Python and remove any padding. + +How to use: +./keyp_keyprint_generation.sh file + +Where 'file' is the name and path of the certificate file. + +Example: +./keyp_keyprint_generation.sh /etc/adchpp/certs/cacert.pem \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |