addcertsldap

来自「Perl写的CA认证程序」· 代码 · 共 47 行

TXT
47
字号
## OpenCA - RA Server Command## (c) 2000-2001 by Michael Bell and OpenCA Group####   File Name: addCertsLDAP##       Brief: Add all certificates to LDAP server## Description: Add all issued certificates to LDAP server##  Parameters: if ( $cmd !~ /addCertsLDAP/i ) {        configError( "Wrong Command Usage ($cmd/importReqs)!" );        exit 1;}                                                                                            ## ca-certificatesprint startLogPage ("Exporting certificates to LDAP");print startLogSection ("Exporting CA certificate(s) to LDAP server ... ");my @items = $db->searchItems ( DATATYPE => "VALID_CA_CERTIFICATE" );for my $h (@items) {  my $result = eximObjectToLDAP ( AUTHORITY_CERTIFICATE => $h );  if ($result and $result->{STATUS}) {    print addPreLogLine ("Certificate ".$h->getParsed()->{SERIAL}." OK");  } else {    print addPreLogLine ("<FONT COLOR=#ff0000>".                         "Certificate ".$h->getParsed()->{SERIAL}.                         " FAILED</FONT>");  }}print closeLogSection ();## certificatesprint startLogSection ("Exporting certificates to LDAP ...");my @items = $db->searchItems ( DATATYPE => "VALID_CERTIFICATE" );for my $h (@items) {  my $result = eximObjectToLDAP ( CERTIFICATE => $h );  if ($result and $result->{STATUS}) {    print addPreLogLine ("Certificate ".$h->getParsed()->{SERIAL}." OK");  } else {    print addPreLogLine ("<FONT COLOR=#ff0000>".                         "Certificate ".$h->getParsed()->{SERIAL}.                         " FAILED</FONT>");  }}print closeLogSection ();print closePage ();1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?