Ich habe ein Script erstellt, dass die XZertifikate für eine Organisationseinheit aus dem "Domino Directory" ins "Persönliches Adressbuch" kopiert.
Aufgerufen wird dies mit:
call getXCertificates("O=MyCompany")
Sub getXCertificates(cert As String)
' Copy the Cross-Certificate of the Organisation in the local Addressbook
On Error Goto failue
Dim s As New NotesSession
Dim db As NotesDatabase
Dim persdb As NotesDatabase
Dim adrdb As NotesDatabase
Dim server As String
Dim v As NotesView
Dim crossdocs As NotesDocumentCollection
Dim perNames As String
Dim crossdoc As NotesDocument
Dim persView As NotesView
perNames = s.GetEnvironmentString("names",True)
If perNames="" Then
Print "No notes.ini entry, using default!"
perNames="names.nsf"
End If
Print "User personal Adressbook: '"+perNames+"'"
Set persdb = s.GetDatabase("",perNames)
Set persView = persdb.GetView("($CrossCertByName)")
Set db = s.CurrentDatabase
server = db.Server
Set adrdb = s.GetDatabase(server,"names")
Set v = adrdb.GetView("($CrossCertByName)")
Set crossdocs = v.GetAllDocumentsByKey(cert+":",False)
If crossdocs.count = 0 Then
Print "No Docs found!"
Exit Sub
End If
For i=1 To crossdocs.Count
Set crossdoc = crossdocs.GetNthDocument(i)
key = crossdoc.IssuedBy(0)+":"+crossdoc.IssuedTo(0)
If persView.GetDocumentByKey(key,True) Is Nothing Then
Print "Copy Entry for "+key
Set xdoc = crossdoc.CopyToDatabase(persdb)
Call xdoc.save(True,True)
End If
Next
ende:
Exit Sub
failue:
Print "X-Certification had failed!"
Resume ende
End Sub
Vielleicht kann man den Code so aufbohren, dass dieser allen hier nutzt?
Gruss & Guten Rutsch
Chris