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
// License for the specific language governing permissions and limitations under
// the License.
// Package attest abstracts TPM attestation operations.
package attest

View File

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

View File

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

View File

@ -11,6 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
package attest
import (
@ -195,5 +196,9 @@ func TestTPMActivateCredential(t *testing.T) {
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)
}

View File

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

View File

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

View File

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

View File

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

View File

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