Contributed Source

See TagVault.org’s Source Code Licensing Policy for:

  • Details about submitting source code
  • Expectations members should have when using source code from this site

Unless otherwise noted, source code provided through this site is licensed under the Apache 2.0 license, which means it can be used in commercial and non-commercial products with or without changes, with the requirement that the original copyright of any prior authors is retained.  Note that the original author retains full rights to the source code without restriction.

SWID tag signing utility

Author Michael M. Welch
Employed by Symantec
License Specified Apache 2.0
Language used Java
Abstract This Java code utilizes the Java crypto library to create W3C XMLDSIG-compliant signatures for a SWID tag.  This code base was used to create the digitally signed SWID tag included in the final draft of the FDIS version of the ISO/IEC 19770-2 document.Note that this code does not include the use of timestamps as part of the example.  The example assumes a digital certificate that does not expire.When creating a tool or utility to digitally sign a SWID tag, the timestamp is strongly recommended, as most certificates will either have a timestamp specifying an expiration date, or could at some point be revoked.  Either way, with a timestamp included, the validation routine can validate that the SWID tag was signed while the certificate was valid and therefore the SWID tag can still be considered valid without having to re-sign the tag.
Download Note that the source code is provided in a standard .zip file./*
* XMLSigner.java – Apply digital signatures to the textual contents of XML
* documents
*
* Copyright (c) 2009, Symantec Corporation.
*
* Licensed under the Apache License, Version 2.0 (the “License”); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an “AS IS” BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/