upload keys to sems key server

28 views
Skip to first unread message

Karim

unread,
Apr 28, 2017, 4:45:48 AM4/28/17
to DidiSoft Forum
Hello we writing a app for upload keys to sems key server 

The app seems work fine we can create keys export keys when we use the upload function the app give is upload is true but when we looking in sems server we see nothing pls advise many thanks 

didisoft

unread,
Apr 28, 2017, 7:03:00 AM4/28/17
to DidiSoft Forum
Hi Karim,

Uploading keys to SEMS requires some SEMS administration knowledge and appropriate configuration of the SEMS server.

By default the Symantec Encryption Server operates in Server Key mode (SKM). When uploading the public key if the email address doesn't match the same domain name as the Symantec Encryption Key Server then it gets uploaded in CKM (Client Key mode) but if it is a domain email address, then it's uploaded in SKM. 

Only keys in CKM mode are visible to the public. You can read more about Symantec server key modes in this great article:

Best Regards,
Peter Kalef

Karim

unread,
Apr 28, 2017, 8:27:33 AM4/28/17
to DidiSoft Forum
Hi Peter
Thanks for ure replay.

Our sems server is configure I think properly. If I sent a key from the pgp desktop client (standalone installation not I a domain ) then the keys are uploaded. What I can see in the sems logs is that the app make connection with sems but than the connection is broke but with pgp desktop goes fine

Rgds Karim

didisoft

unread,
Apr 28, 2017, 9:51:42 AM4/28/17
to DidiSoft Forum
Hi Karim,

Can you specify which of our products you are using and what is the error message in SEMS log?

Best Regards,
Peter Kalef

Karim

unread,
Apr 28, 2017, 11:24:08 AM4/28/17
to DidiSoft Forum
Hi Peter

We use the android library for it see pls the code what we use

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.widget.TextView;

import com.didisoft.pgp.net.LDAPClient;

/** */
public class LDAPDemo extends Activity {

//
private RequestServer reqs;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

requestServerAsync();
}


//
private void requestServerAsync()
{
reqs = new RequestServer();
reqs.execute();
}





// Async request of server
class RequestServer extends AsyncTask<String, Integer, String> {

LDAPClient ldap;
String error = "";

byte[] keyBytes;

// read the key into a byte array
// "pubkey.asc"
File file = getApplicationContext().getFileStreamPath(AppConstants.user+"_pubkey.asc");

FileInputStream fIn;

boolean submitted = false;

public RequestServer() {
super();
}

@Override
protected void onPreExecute() {

super.onPreExecute();

int ldapPort = 389;

// connect to LDAP server that supports pgp schema
ldap = new LDAPClient("keys.domainname.com", ldapPort);

if (file.exists())
{
System.err.println("file = "+file.getAbsolutePath());
}
else
{
System.err.println("file = "+file.getAbsolutePath()+" do not exists");
}

}

@Override
protected String doInBackground(String... aurl1)
{
//"pubkey.asc"
try
{
fIn = getApplicationContext().openFileInput(AppConstants.user+"_pubkey.asc");

final int length = (int)file.length();

keyBytes = new byte[length];

// final int count = fIn.read(keyBytes, 0, keyBytes.length);

// String asciiKey = new String(keyBytes, "ASCII");

// System.err.println("Key = "+asciiKey);

submitted = ldap.submitKey(keyBytes);
}
catch (IOException e)
{
error = "Error: " +e.getMessage();
}

return null;
}

@Override
protected void onProgressUpdate(Integer... progress) {}

@Override
protected void onPostExecute(String unused)
{
updateUI();
}

//
private void updateUI()
{
TextView tv = new TextView(LDAPDemo.this);
tv.append("Testing key upload ... \n");

if (error.compareTo("") != 0)
{
tv.append(error);
}

// this function returns true
tv.append("\npublic key submitted = "+submitted);

System.err.println("public key submitted = "+submitted);

setContentView(tv);
}
}
}

didisoft

unread,
Apr 28, 2017, 11:33:34 AM4/28/17
to DidiSoft Forum
Hi Karim,

What is the error message in SEMS log?

Best Regards,
Peter Kalef

Karim

unread,
Apr 28, 2017, 12:44:06 PM4/28/17
to DidiSoft Forum
Hi Peter

Only thing what I see on the log file is that connection goes open en closed and thatS it. And when goes to the part where the keys are stored than is see not the key tonight I will do trace log with wireshark maybe is see more info

Reply all
Reply to author
Forward
0 new messages