Validate secret in attest_tpm12_test, fix godoc

This commit is contained in:
Tom 2019-03-28 13:29:24 -07:00
parent 21c2bfd1dc
commit ca33c04742
9 changed files with 13 additions and 0 deletions

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
// Package attest abstracts TPM attestation operations. // Package attest abstracts TPM attestation operations.
package attest package attest

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
package attest package attest
import ( import (

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
package attest package attest
import ( import (

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
package attest package attest
import ( import (
@ -195,5 +196,9 @@ func TestTPMActivateCredential(t *testing.T) {
t.Fatalf("ActivateCredential failed: %v", err) t.Fatalf("ActivateCredential failed: %v", err)
} }
if !bytes.Equal(validation, nonce) {
t.Errorf("secret mismatch: expected %x, got %x", nonce, validation)
}
t.Logf("validation: %x", validation) t.Logf("validation: %x", validation)
} }

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
// +build windows // +build windows
package attest package attest

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
package attest package attest
import ( import (

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
// +build linux // +build linux
package attest package attest

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
// +build windows // +build windows
package attest package attest

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under // License for the specific language governing permissions and limitations under
// the License. // the License.
package attest package attest
// TCGVendorID represents a unique TCG manufacturer code. // TCGVendorID represents a unique TCG manufacturer code.