Skip to content

Commit d7e44b8

Browse files
committed
Initial release
0 parents  commit d7e44b8

File tree

1,262 files changed

+244470
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,262 files changed

+244470
-0
lines changed

Diff for: .gitignore

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# compiled python for systems tests
2+
*.pyc
3+
4+
# NetBeans specific #
5+
private/
6+
build/
7+
dist/
8+
.nb-gradle-properties
9+
10+
# Eclipse specific #
11+
.classpath
12+
.project
13+
.settings/
14+
.checkstyle
15+
16+
# IDEA specific #
17+
*.iml
18+
.idea
19+
cmake-build-debug/
20+
21+
# Gradle specific #
22+
.gradle
23+
24+
# Class Files #
25+
*.class
26+
classes/
27+
28+
# Package Files #
29+
*.war
30+
*.ear
31+
*.rpm
32+
*.deb
33+
34+
# Specific RPMs used for testing
35+
!HIRS_Utils/src/test/resources/repository/vim-common-7.2.411-1.8.el6.x86_64.rpm
36+
!HIRS_Utils/src/test/resources/repository/kernel-2.6.32-642.6.1.el6.x86_64.rpm
37+
!HIRS_Utils/src/test/resources/testrepo/*
38+
!Systems_Tests/resources/**
39+
40+
# DEB Sources #
41+
DEB_SOURCES/
42+
43+
# RPM Files #
44+
BUILD/
45+
BUILDROOT/
46+
SOURCES/
47+
SPECS/
48+
RPM/
49+
SRPM/
50+
PLUGIN_SOURCE/
51+
52+
# C++ Files #
53+
*.o
54+
55+
# Vagrant Files #
56+
.vagrant/
57+
.vagrantfile.swp
58+
vagrant/tmp/
59+
60+
# tpm_module #
61+
tpm_module/tpm_module
62+
main.o
63+
main.d
64+
65+
# Misc Files #
66+
*~
67+
bin/
68+
!package/extras/*/bin
69+
*/test-output/
70+
71+
# MAC OSX Finder Files #
72+
.DS_Store
73+
74+
# Log Files #
75+
*.log
76+
77+
/.nb-gradle/
78+
79+
80+
# rejected diff applications
81+
*.rej
82+
83+
# cmake artifacts from manual build
84+
cmake_install.cmake
85+
HIRS_ProvisionerTPM2/*.cmake
86+
HIRS_ProvisionerTPM2/HIRS_ProvisionerTPM2.cbp
87+
HIRS_ProvisionerTPM2/CMakeCache.txt
88+
Makefile
89+
CMakeFiles/
90+
HIRS_ProvisionerTPM2/DartConfiguration.tcl
91+
HIRS_ProvisionerTPM2/lib/cpplint-download/
92+
HIRS_ProvisionerTPM2/lib/cpplint/
93+
HIRS_ProvisionerTPM2/lib/cpr-build/
94+
HIRS_ProvisionerTPM2/lib/cpr-download/
95+
HIRS_ProvisionerTPM2/lib/cpr-src/
96+
HIRS_ProvisionerTPM2/lib/googletest-build/
97+
HIRS_ProvisionerTPM2/lib/googletest-download/
98+
HIRS_ProvisionerTPM2/lib/googletest-src/
99+
HIRS_ProvisionerTPM2/lib/*.a
100+
HIRS_ProvisionerTPM2/lib/*.so
101+
HIRS_ProvisionerTPM2/install_manifest.txt
102+
HIRS_ProvisionerTPM2/src/libTPM2_PROVISIONER_LIBRARY.a
103+
HIRS_ProvisionerTPM2/test/CTestTestfile.cmake
104+
105+
# C++ Doxygen Documentation
106+
HIRS_ProvisionerTPM2/docs/html/
107+
HIRS_ProvisionerTPM2/docs/latex/
108+
HIRS_ProvisionerTPM2/CMakeDoxyfile.in
109+
110+
# C++ Style Checker
111+
HIRS_ProvisionerTPM2/lint
112+
113+
/*/out
114+
115+
HIRS_ProvisionerTPM2/cmake-build-debug
116+
117+
# autogenerated protobuf files
118+
*.pb.cc
119+
*.pb.h
120+
HIRS_AttestationCA/src/main/java/hirs/attestationca/configuration/provisionerTpm2/ProvisionerTpm2.java
121+
122+
# these files are copied over by ProvisionerTPM2 CMake build
123+
HIRS_ProvisionerTPM2/config/logging.properties
124+
HIRS_ProvisionerTPM2/scripts/tpm_aca_provision

Diff for: .gitlab-ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# NOTE: if you are editing this, try using the lint tool to check your work before pushing: https://forge.outer.jhuapl.edu/ci/lint
2+
3+
before_script:
4+
- echo "running CI jobs for HIRS"
5+
6+
stages:
7+
- build
8+
9+
gradle_build:
10+
stage: build
11+
script: ./gradlew build
12+
artifacts:
13+
when: on_failure
14+
untracked: true
15+
expire_in: 3 days
16+
17+
rpm_build_centos6:
18+
stage: build
19+
script: ONLY_BUILD_EL6_RPMS=true ./package/package.centos.sh
20+
artifacts:
21+
paths:
22+
- package/rpm/RPMS/
23+
expire_in: 3 days
24+
25+
rpm_build_centos7:
26+
stage: build
27+
script: ONLY_BUILD_EL7_RPMS=true ./package/package.centos.sh
28+
artifacts:
29+
paths:
30+
- package/rpm/RPMS/
31+
expire_in: 3 days

Diff for: CONTRIBUTING.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
All contributions to this project will be released as follows:
2+
3+
1. If you are a U.S. government employee, then your changes are exempt from copyright in the U.S. and will be released under the [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) [Universal license](https://creativecommons.org/publicdomain/zero/1.0/legalcode) worldwide.
4+
1. If you are a not a U.S. government employee, then your changes will be released under the [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) [Universal license](https://creativecommons.org/publicdomain/zero/1.0/legalcode) in the U.S. and worldwide.
5+
6+
By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

Diff for: DISCLAIMER.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Disclaimer of Warranty
2+
This Work is provided "as is." 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 the United States Government 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 Guidance, even if advised of the possibility of such damage.
3+
4+
The User of this Work agrees to hold harmless and indemnify the United States Government, its agents and employees from every claim or liability (whether in tort or in contract), including attorneys' fees, court costs, and expenses, arising in direct consequence of Recipient's use of the item, including, but not limited to, claims or liabilities made for injury to or death of personnel of User or third parties, damage to or destruction of property of User or third parties, and infringement or other violations of intellectual property or technical data rights.
5+
6+
Nothing in this Work is intended to constitute an endorsement, explicit or implied, by the United States Government of any particular manufacturer's product or service.
7+
8+
## Disclaimer of Endorsement
9+
Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise, in this Work does not constitute an endorsement, recommendation, or favoring by the United States Government and shall not be used for advertising or product endorsement purposes.

Diff for: HIRS_AttestationCA/build.gradle

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
apply plugin: 'war'
2+
apply plugin: 'checkstyle'
3+
4+
evaluationDependsOn(':HIRS_Utils')
5+
6+
sourceCompatibility = 1.8
7+
8+
dependencies {
9+
compile project(':TPM_Utils')
10+
compile project(':HIRS_Structs')
11+
compile project(':HIRS_Utils')
12+
13+
compile libs.bouncy_castle
14+
compile libs.commons_codec
15+
compile libs.commons_lang
16+
compile libs.spring_webmvc
17+
compile libs.log4j2
18+
compile libs.log4j2_web
19+
compile libs.protobuf_java
20+
21+
providedCompile libs.servlet_api
22+
23+
testCompile project(':HIRS_Utils').sourceSets.test.output
24+
testCompile project(':HIRS_Utils').sourceSets.test.resources
25+
26+
testCompile libs.commons_lang
27+
testCompile libs.spring_test
28+
testCompile libs.mockito
29+
testCompile libs.testng
30+
testCompile libs.hsqldb
31+
}
32+
33+
task generateProtoBuf(type:Exec) {
34+
workingDir 'config'
35+
36+
commandLine './genJavaProtoBuf.sh'
37+
}
38+
39+
compileJava.dependsOn generateProtoBuf
40+
41+
ext.configDir = new File(projectDir, 'config')
42+
ext.checkstyleConfigDir = "$configDir/checkstyle"
43+
checkstyle {
44+
toolVersion = '5.7'
45+
configFile = checkstyleConfigFile
46+
configProperties.put('basedir', checkstyleConfigDir)
47+
ignoreFailures = false
48+
showViolations = true
49+
}
50+
51+
war {
52+
archiveName = 'HIRS_AttestationCA.war'
53+
}
54+
55+
publishing {
56+
publications {
57+
maven(MavenPublication) {
58+
artifactId 'hirs-attestationca'
59+
artifact jar
60+
pom.withXml {
61+
def dependenciesNode = asNode().appendNode('dependencies')
62+
63+
configurations.runtime.allDependencies.each {
64+
if (it.group != null && it.name != null) {
65+
def dependencyNode = dependenciesNode.appendNode('dependency')
66+
dependencyNode.appendNode('groupId', it.group)
67+
dependencyNode.appendNode('artifactId', it.name)
68+
dependencyNode.appendNode('version', it.version)
69+
70+
if (it.excludeRules.size() > 0) {
71+
def exclusionsNode = dependencyNode.appendNode('exclusions')
72+
it.excludeRules.each { rule ->
73+
def exclusionNode = exclusionsNode.appendNode('exclusion')
74+
exclusionNode.appendNode('groupId', rule.group)
75+
exclusionNode.appendNode('artifactId', rule.module)
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}
83+
}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
5+
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
6+
7+
<suppressions>
8+
9+
<suppress checks="MagicNumber" files=".*[/\\]src[/\\]test[/\\]+" />
10+
<suppress checks="FinalParameters" files=".*[/\\]src[/\\]test[/\\]+" />
11+
<suppress checks="JavadocPackage" files=".*[/\\]src[/\\]test[/\\]+" />
12+
<suppress files="src/main/java/hirs/attestationca/configuration/provisionerTpm2/ProvisionerTpm2\.java" checks="[a-zA-Z0-9]*"/>
13+
14+
</suppressions>

Diff for: HIRS_AttestationCA/config/genJavaProtoBuf.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Script to generate protobuf Java code. Called by gradle to compile the
4+
# protobuf spec file to Java source. Generates the file
5+
# hirs/attestationca/configuration/provisionerTpm2/ProvisionerTpm2.java.
6+
7+
dir=$(pwd)
8+
# Relative paths are different when building locally versus on CI
9+
if [[ "$dir" == *"package"* ]]; then
10+
SRC_DIR=$dir/../../../../../../HIRS_ProvisionerTPM2/src
11+
DEST_DIR=$dir/../src/main/java
12+
else
13+
SRC_DIR=../../HIRS_ProvisionerTPM2/src
14+
DEST_DIR=../src/main/java
15+
fi
16+
protoc -I=$SRC_DIR --java_out=$DEST_DIR $SRC_DIR/ProvisionerTpm2.proto

0 commit comments

Comments
 (0)