summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--org.tizen.common.sdblib/src/org/tizen/sdblib/daemon/AbstractServer.java1
-rwxr-xr-xorg.tizen.common.sign/src/org/tizen/common/sign/command/ReadSigningProfileFileCommand.java43
-rw-r--r--org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfile.java5
-rwxr-xr-xorg.tizen.common/src/org/tizen/common/daemon/AbstractServer.java1
-rw-r--r--package/changelog3
-rw-r--r--package/pkginfo.manifest2
6 files changed, 44 insertions, 11 deletions
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/daemon/AbstractServer.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/daemon/AbstractServer.java
index ae17f5293..67005fa24 100644
--- a/org.tizen.common.sdblib/src/org/tizen/sdblib/daemon/AbstractServer.java
+++ b/org.tizen.common.sdblib/src/org/tizen/sdblib/daemon/AbstractServer.java
@@ -280,6 +280,7 @@ implements Server, Runnable
{
thread = new Thread( this, name );
}
+ thread.setDaemon( true );
thread.start();
setStatus( ServerState.Initializing );
}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/command/ReadSigningProfileFileCommand.java b/org.tizen.common.sign/src/org/tizen/common/sign/command/ReadSigningProfileFileCommand.java
index 4ecefcd09..188cc0198 100755
--- a/org.tizen.common.sign/src/org/tizen/common/sign/command/ReadSigningProfileFileCommand.java
+++ b/org.tizen.common.sign/src/org/tizen/common/sign/command/ReadSigningProfileFileCommand.java
@@ -101,6 +101,14 @@ extends AbstractCommand<Object>
this.container = new SigningProfileContainer();
this.container.readProfileXML( profileInputStream );
+ for ( SigningProfile profile : this.container.getProfiles() ) {
+ logger.info( "profile : {}", profile.getProfileName() );
+ logger.info( " author : {}", profile.getAuthorProfileItem() );
+ for ( SigningProfileItem item : profile.getDistributorProfileItems() ) {
+ logger.info( "dist : {}", item );
+ }
+ }
+
interactForPassword( executor, context );
validateSigningInfo();
@@ -120,7 +128,8 @@ extends AbstractCommand<Object>
boolean isCorrectPassword = false;
try {
- String password = new String( item.getPassword() );
+ char[] pass = item.getPassword();
+ String password = pass == null ? StringUtil.EMPTY_STRING : new String( pass );
String path = item.getKeyLocation();
isCorrectPassword = HashingSigning.CheckPkcs12Password( path, password );
} catch (FileNotFoundException e) {
@@ -173,7 +182,9 @@ extends AbstractCommand<Object>
if ( ! hasAuthor || ! hasDist1 ) {
// If don't have author certificate, no interact.
- return;
+ String msg = "Both an author and a first distributor must be required. Please check your profile infomation.";
+ context.getPrompter().notify( msg );
+ throw new CertificationException( msg );
}
// get an optional profile item
@@ -188,10 +199,11 @@ extends AbstractCommand<Object>
// generate fields
List<UserField> fieldList = new ArrayList<UserField>();
+
Object[][] fields = new Object[][] {
- new Object[] { SignatureConstants.AUTHOR, "Author password: ", true, authorItem.getPassword(), "Input author password.", "authorPwdSavable", "Save author password" },
- new Object[] { SignatureConstants.DISTRIBUTOR_1ST, "Distributor1 password: ", true, dist1Item.getPassword(), "Input distributor1 password.", "dist1PwdSavable", "Save distributor1 password" },
- new Object[] { SignatureConstants.DISTRIBUTOR_2ND, "Distributor2 password: ", hasDist2, dist2Item.getPassword(), "Input distributor2 password.", "dist2PwdSavable", "Save distributor2 password" },
+ new Object[] { SignatureConstants.AUTHOR, "Author password: ", isModifiable( authorItem ), authorItem.getPassword(), "Input author password.", "authorPwdSavable", "Save author password" },
+ new Object[] { SignatureConstants.DISTRIBUTOR_1ST, "Distributor1 password: ", isModifiable( dist1Item ), dist1Item.getPassword(), "Input distributor1 password.", "dist1PwdSavable", "Save distributor1 password" },
+ new Object[] { SignatureConstants.DISTRIBUTOR_2ND, "Distributor2 password: ", isModifiable( dist2Item ), hasDist2 ? dist2Item.getPassword() : new char[0], "Input distributor2 password.", "dist2PwdSavable", "Save distributor2 password" },
};
for (Object[] field : fields ) {
final String textId = (String) field[0];
@@ -217,7 +229,7 @@ extends AbstractCommand<Object>
context.getPrompter().batch( fieldList, options );
// write savable profile items
- boolean[] updateFlags = { true, true, hasDist2 };
+ boolean[] updateFlags = { (Boolean) fields[0][2], (Boolean) fields[1][2], (Boolean) fields[2][2] };
for ( int i = SigningProfile.AUTHOR_ORDINAL; i <= SigningProfile.MAX_DISTRIBUTOR; i++ ) {
updateProfileItem( profile, i, fieldList.get( i * 2 ), fieldList.get( i * 2 + 1), updateFlags[ i ], true );
}
@@ -237,8 +249,10 @@ extends AbstractCommand<Object>
if ( modifiable && saveValue ) {
SigningProfileItem profileItem = profile.removeProfileItem( ordinal );
- profileItem.setPassword( (char[]) text.getValue() );
- profile.setProfileItem( ordinal, profileItem );
+ if ( profileItem != null ) {
+ profileItem.setPassword( (char[]) text.getValue() );
+ profile.setProfileItem( ordinal, profileItem );
+ }
}
}
@@ -316,6 +330,19 @@ extends AbstractCommand<Object>
return item == null ? false : item.hasKeyLocation();
}
+ protected boolean isModifiable(SigningProfileItem item) {
+ if ( ! isValidItem( item ) ) {
+ return false;
+ }
+
+ char[] password = item.getPassword();
+ if ( password != null && ! StringUtil.isEmpty( new String( password ) ) ) {
+ return false;
+ }
+
+ return true;
+ }
+
protected boolean getBoolean(Object obj) {
return ( obj == null ) ? true : Boolean.parseBoolean( String.valueOf( obj ) );
}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfile.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfile.java
index 8aedeb990..3e943bda9 100644
--- a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfile.java
+++ b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfile.java
@@ -262,7 +262,7 @@ public class SigningProfile {
return null;
}
- logger.trace( "item - key :{}, ordinal :{}, ca :{}, rootca :{}, pass {}", new Object[] { key, ordinal, ca, rootca, pass } );
+ logger.trace( "item - key :{}, ordinal :{}, ca :{}, rootca :{}, pass : {}", new Object[] { key, ordinal, ca, rootca, pass } );
return createProfileItem( ordinal, key, pass, ca, rootca );
}
@@ -283,7 +283,8 @@ public class SigningProfile {
XMLUtil.setElementAttribute( doc, SignatureConstants.PROFILEITEM_ATTR_ROOTCA, item.getRootCAPath(), element );
// encrypt password. if failed, write an original password.
- String pass = new String( item.getPassword() );
+ char[] password = item.getPassword();
+ String pass = password == null ? StringUtil.EMPTY_STRING : new String( item.getPassword() );
try {
pass = CipherUtil.getEncryptedString( pass );
// TODO: Organize exceptions
diff --git a/org.tizen.common/src/org/tizen/common/daemon/AbstractServer.java b/org.tizen.common/src/org/tizen/common/daemon/AbstractServer.java
index eb566d27f..616d46d44 100755
--- a/org.tizen.common/src/org/tizen/common/daemon/AbstractServer.java
+++ b/org.tizen.common/src/org/tizen/common/daemon/AbstractServer.java
@@ -284,6 +284,7 @@ implements Server, Runnable
{
thread = new Thread( this, name );
}
+ thread.setDaemon( true );
thread.start();
setStatus( ServerState.Initializing );
}
diff --git a/package/changelog b/package/changelog
index 03a3c6e6f..c67eb9111 100644
--- a/package/changelog
+++ b/package/changelog
@@ -1,3 +1,6 @@
+* 2.1.82
+- fixed bugs
+== jihoon80.song <jihoon80.song@samsung.com> 2013-07-01 19:24
* 2.1.81
- Added tizenhwkey handler
== changhyun1.lee <changhyun1.lee@samsung.com> 2013-06-29 19:21
diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest
index 3ee4347fc..160537c2d 100644
--- a/package/pkginfo.manifest
+++ b/package/pkginfo.manifest
@@ -1,4 +1,4 @@
-Version:2.1.81
+Version:2.1.82
Source:common-eplugin
Maintainer:kangho kim <kh5325.kim@samsung.com>, yoonki park <yoonki.park@samsung.com>, hyunsik non <hyunsik.noh@samsung.com>, taeyoung son <taeyoung2.son@samsung.com>, gune Kim <gune.kim@samsung.com>, ho namkoong <ho.namkoong@samsung.com>, hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>, shingil kang <shingil.kang@samsung.com>