WEB开发网
开发学院数据库MSSQL Server 详述SQL Server 2005对称密钥加密技术 阅读

详述SQL Server 2005对称密钥加密技术

 2007-10-30 09:49:19 来源:WEB开发网   
核心提示: 2. 证书 2.1 创建证书 当你配置好服务主密钥和数据库主密钥后,你就可以创建证书了,详述SQL Server 2005对称密钥加密技术(4),SQL Server可以创建自签名的X.509证书,使用CREATE CERTIFICATE语句来创建证书: CREATE CERTIFICA

2. 证书

2.1 创建证书

当你配置好服务主密钥和数据库主密钥后,你就可以创建证书了。SQL Server可以创建自签名的X.509证书。使用CREATE CERTIFICATE语句来创建证书:

CREATE CERTIFICATE certificate_name [ AUTHORIZATION user_name ]
  { FROM <existing_keys> | <generate_new_keys> }
  [ ACTIVE FOR BEGIN_DIALOG = { ON | OFF } ]
  
<existing_keys> ::=
  ASSEMBLY assembly_name
  | {
    [ EXECUTABLE ] FILE = 'path_to_file'
    [ WITH PRIVATE KEY ( <private_key_options> ) ]
   }
  
<generate_new_keys> ::=
  [ ENCRYPTION BY PASSWORD = 'password']
  WITH SUBJECT = 'certificate_subject_name'
  [ , <date_options> [ ,...n ] ]
  
<private_key_options> ::=
  FILE = 'path_to_private_key'
   [ , DECRYPTION BY PASSWORD = 'password' ]
   [ , ENCRYPTION BY PASSWORD = 'password' ]
  
<date_options> ::=
START_DATE = 'mm/dd/yyyy' | EXPIRY_DATE = 'mm/dd/yyyy'

CREATE CERTIFICATE语句有这么多的选项,幸运的是,大多数时候只用到很少的选项。下面的语句创建一个使用密码来保护的证书:

CREATE CERTIFICATE TestCertificate
  ENCRYPTION BY PASSWORD = 'thisIsAP@$$w0rd'
  WITH SUBJECT = 'This is a test certificate',
  START_DATE = '1/1/2006',
  EXPIRY_DATE = '12/31/2008';

上一页  1 2 3 4 5 6 7 8  下一页

Tags:详述 SQL Server

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接