Partager via


DTSSignatureStatus Enumeration

Describes the digital signature.

Espace de noms: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

Syntaxe

'Déclaration
Public Enumeration DTSSignatureStatus
public enum DTSSignatureStatus
public enum class DTSSignatureStatus
public enum DTSSignatureStatus
public enum DTSSignatureStatus

Members

Member name Description
Good The signature has been checked and is valid.
Invalid The signature has been checked and is invalid.
NotPresent The signature is not present.
Untrusted The signature is from an untrusted source.

Notes

A package can be signed with a digital signature and encrypted with a password or a user key. Using a digital signature ensures that only packages from trusted sources are opened and run. The package includes properties that enable you to name the certificate and to ensure the digital signature is always checked when the package loads. The Application and Package classes have a Boolean property of CheckSignatureOnLoad that determines whether the signature is checked. For more information, see Observations sur la sécurité pour Integration Services.

Exemple

The following code example specifies through the Application class that the package will have its signature checked on load.

Application app = new Application();
app.CheckSignatureOnLoad = CheckSignatureOnLoad;
pkg = app.LoadPackage(mysavedPackagePath, null);
DTSSignatureStatus expectedStatus = DTSSignatureStatus.Good;

DTSSignatureStatus dss = pkg.CheckSignature();
if (dss != expectedStatus)
{
    Console.WriteLine("Invalid status: found " + dss + ", expected " + expectedStatus);
}
Dim app As Application =  New Application() 
app.CheckSignatureOnLoad = CheckSignatureOnLoad
pkg = app.LoadPackage(mysavedPackagePath, Nothing)
Dim expectedStatus As DTSSignatureStatus =  DTSSignatureStatus.Good 
 
Dim dss As DTSSignatureStatus =  pkg.CheckSignature() 
If dss <> expectedStatus Then
    Console.WriteLine("Invalid status: found " + dss + ", expected " + expectedStatus)
End If

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

Microsoft.SqlServer.Dts.Runtime Namespace