This repository has been archived by the owner on Jan 25, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved SSL certificate verification display
- Loading branch information
Showing
3 changed files
with
129 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/info/guardianproject/otr/app/im/app/CertDisplayActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package info.guardianproject.otr.app.im.app; | ||
|
||
import android.app.Activity; | ||
import android.app.AlertDialog; | ||
import android.content.DialogInterface; | ||
import android.content.DialogInterface.OnDismissListener; | ||
import android.os.Bundle; | ||
|
||
public class CertDisplayActivity extends Activity { | ||
|
||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
String msg = getIntent().getStringExtra("msg"); | ||
String issuer = getIntent().getStringExtra("issuer"); | ||
String fingerprint = getIntent().getStringExtra("fingerprint"); | ||
String subject = getIntent().getStringExtra("subject"); | ||
String issuedOn = getIntent().getStringExtra("issued"); | ||
String expiresOn = getIntent().getStringExtra("expires"); | ||
|
||
|
||
showDialog (msg + "\nIssued by: " + issuer + "\nIssued to: " + subject + "\nSHA1 Fingerprint: " + fingerprint | ||
+ "\nIssued on: " + issuedOn + "\nExpires on" + expiresOn | ||
); | ||
} | ||
|
||
|
||
|
||
private void showDialog (String msg) | ||
{ | ||
|
||
AlertDialog ad = new AlertDialog.Builder(this) | ||
.setTitle("Certificate Info") | ||
.setMessage(msg).show(); | ||
|
||
ad.setOnDismissListener(new OnDismissListener () { | ||
|
||
@Override | ||
public void onDismiss(DialogInterface arg0) { | ||
|
||
CertDisplayActivity.this.finish(); | ||
|
||
} | ||
|
||
}); | ||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters