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
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);
}
}
}
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