DERBY-5538

2017-09-28 Thread Dinuka Nadeeshan
Regarding DERBY-5538 <https://issues.apache.org/jira/browse/DERBY-5538>,
I did some changes regarding this issue and I made some updates. Here I
attached diff file and can you please check on this.



-- 
*K. A. Dinuka Nadeeshan*
Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
University of Peradeniya, Sri-Lanka
LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
<https://www.linkedin.com/in/dinuka-nadeeshan/>*
GitHub: *https://github.com/dinukanadeeshan
<https://github.com/dinukanadeeshan>*
Index: 
java/engine/org/apache/derby/impl/jdbc/authentication/AuthenticationServiceBase.java
===
--- 
java/engine/org/apache/derby/impl/jdbc/authentication/AuthenticationServiceBase.java
(revision 1810047)
+++ 
java/engine/org/apache/derby/impl/jdbc/authentication/AuthenticationServiceBase.java
(working copy)
@@ -409,7 +409,8 @@
 String userName =
 key.substring(Property.USER_PROPERTY_PREFIX.length());
 userPassword =
-encryptUsingDefaultAlgorithm(userName, userPassword, p);
+   //encryptUsingDefaultAlgorithm(userName, userPassword, 
p);
+   
encryptUsingDefaultAlgorithm(userName, userPassword.toCharArray(), p);
}
 
return userPassword;
@@ -452,9 +453,9 @@
 * @return encrypted user password (digest) as a String object
  * or {@code null} if the plaintext password is {@code null}
 */
-   protected String encryptPasswordSHA1Scheme(String plainTxtUserPassword)
+   protected String encryptPasswordSHA1Scheme(char[] plainTxtUserPassword)
{
-   if (plainTxtUserPassword == null)
+   if (plainTxtUserPassword == null || plainTxtUserPassword.length 
== 0)
return null;
 
MessageDigest algorithm = null;
@@ -503,13 +504,13 @@
  * @param str string
  * @return the byte[] (with hexadecimal format) form of the string (str)
  */
-private static byte[] toHexByte(String str)
+private static byte[] toHexByte(char[] str)
 {
-byte[] data = new byte[str.length() * 2];
+byte[] data = new byte[str.length * 2];
 
-for (int i = 0; i < str.length(); i++)
+for (int i = 0; i < str.length; i++)
 {
-char ch = str.charAt(i);
+char ch = str[i];
 int high_nibble = (ch & 0xf0) >>> 4;
 int low_nibble = (ch & 0x0f);
 data[i] = (byte)high_nibble;
@@ -537,10 +538,10 @@
  * @throws StandardException if the specified algorithm is not supported
  */
 String encryptPasswordConfigurableScheme(
-String user, String password, String algorithm)
+String user, char[] password, String algorithm)
 throws StandardException
 {
-if (password == null) {
+if (password == null || password.length == 0) {
 return null;
 }
 
@@ -556,7 +557,7 @@
 
 try {
 md.update(user.getBytes(ENCODING));
-md.update(password.getBytes(ENCODING));
+md.update(password.toString().getBytes(ENCODING));
 } catch (UnsupportedEncodingException uee) {
 // UTF-8 should always be available, so this should never happen.
 throw StandardException.plainWrapException(uee);
@@ -593,7 +594,7 @@
  * @throws StandardException if the specified algorithm is not supported
  */
 private String encryptUsingDefaultAlgorithm(String user,
-String password,
+char[] password,
 Dictionary props)
 throws StandardException {
 
@@ -676,9 +677,9 @@
  *
 * @return a substituted password.
  */
-protected String substitutePassword(
+protected char[] substitutePassword(
 String userName,
-String password,
+char[] password,
 Properties info,
 boolean databaseUser) {
 
@@ -711,7 +712,7 @@
 messageDigest.reset();
 
 byte[] bytePasswd = null;
-byte[] userBytes = toHexByte(userName);
+byte[] userBytes = toHexByte(userName.toCharArray());
 
 if (SanityManager.DEBUG)
 {
@@ -731,7 +732,7 @@
 byte[] targetSeed_ =
 StringUtil.fromHexString(targetSeedstr, 0, targetSeedstr.length());
 
-String hexString = null;
+char[] hexString = null;
 // If user is at the database level, we don't encrypt the password
 // as it is already encrypted (BUILTIN scheme) - we only do the
 // BUILTIN encryption if the user is defined at the system level
@@ -742,8 +743,8 @@
   

Making patch

2017-09-24 Thread Dinuka Nadeeshan
hi,

Can someone please help me with how to make the patch using svn.

thank you

-- 
*K. A. Dinuka Nadeeshan*
Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
University of Peradeniya, Sri-Lanka
LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
<https://www.linkedin.com/in/dinuka-nadeeshan/>*
GitHub: *https://github.com/dinukanadeeshan
<https://github.com/dinukanadeeshan>*


Re: DERBY-5538

2017-09-24 Thread Dinuka Nadeeshan
I am very sorry to bother you. I could assign to the issue. Thank you..

On Mon, Sep 25, 2017 at 9:21 AM, Dinuka Nadeeshan <
dinuka.nadeeshan1...@gmail.com> wrote:

> hi,
>
> Regarding DERBY-5538 <https://issues.apache.org/jira/browse/DERBY-5538>.
> I would like to working on this issue. Please can you assign me to
> DERBY-5538 <https://issues.apache.org/jira/browse/DERBY-5538>. And my
> JIRA user id is *dinuka.n.*
>
>
> *thank you...*
>
> --
> *K. A. Dinuka Nadeeshan*
> Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
> University of Peradeniya, Sri-Lanka
> LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
> <https://www.linkedin.com/in/dinuka-nadeeshan/>*
> GitHub: *https://github.com/dinukanadeeshan
> <https://github.com/dinukanadeeshan>*
>
>


-- 
*K. A. Dinuka Nadeeshan*
Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
University of Peradeniya, Sri-Lanka
LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
<https://www.linkedin.com/in/dinuka-nadeeshan/>*
GitHub: *https://github.com/dinukanadeeshan
<https://github.com/dinukanadeeshan>*


Regarding DERBY-5538

2017-09-24 Thread Dinuka Nadeeshan
hi,

According to the description of the issue, I understood that this can be
done by replacing 'password' variable from String to char[]. Can you please
help with this? Is it correct thing to do or has some other approach.

Thank you...

-- 
*K. A. Dinuka Nadeeshan*
Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
University of Peradeniya, Sri-Lanka
LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
<https://www.linkedin.com/in/dinuka-nadeeshan/>*
GitHub: *https://github.com/dinukanadeeshan
<https://github.com/dinukanadeeshan>*


DERBY-5538

2017-09-24 Thread Dinuka Nadeeshan
hi,

Regarding DERBY-5538 <https://issues.apache.org/jira/browse/DERBY-5538>. I
would like to working on this issue. Please can you assign me to DERBY-5538
<https://issues.apache.org/jira/browse/DERBY-5538>. And my JIRA user id is
*dinuka.n.*


*thank you...*

-- 
*K. A. Dinuka Nadeeshan*
Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
University of Peradeniya, Sri-Lanka
LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
<https://www.linkedin.com/in/dinuka-nadeeshan/>*
GitHub: *https://github.com/dinukanadeeshan
<https://github.com/dinukanadeeshan>*


DERBY-6814

2017-08-29 Thread Dinuka Nadeeshan
Regarding to DERBY-6814 ,
Where are those connection handling happens in Derby? What are the classes
mainly?

Thank you,

regards,
Dinuka


Re: DERBY-6512 Cannot use java.util.Arrays.toString( byte[] b ) as a function.

2017-07-26 Thread Dinuka Nadeeshan
hello,
I am trying to find the location that error occurs. To that I execute the
queries that mentioned in issue description. Then it says





*ERROR 42X51: The class
'org.apache.derbyTesting.functionTests.tests.lang.MergeStatementTest' does
not exist or is inaccessible. This can happen if the class is not
public.ERROR XJ001: Java exception:
'org.apache.derbyTesting.functionTests.tests.lang.MergeStatementTest:
java.lang.ClassNotFoundException'.*
So where should I put the classes. or how can I solve this.

thanks

On Sun, Jul 16, 2017 at 9:40 PM, Dinuka Nadeeshan <
dinuka.nadeeshan1...@gmail.com> wrote:

> ok thank you rick...
>
> On Jul 16, 2017 19:37, "Rick Hillegas" <rick.hille...@gmail.com> wrote:
>
>> On 7/15/17 7:57 AM, dinuka.nadeeshan1...@gmail.com wrote:
>>
>> hi rick,
>>
>> yes. it is correct. Dinuka Nadeeshan Kodithuwakku that is full name.
>> so my user id is dinuka.n
>> thanks
>>
>> Thanks, Dinuka. I have assigned the bug to you. Cheers!
>>
>>
>>
>>
>>  Original Message 
>> Subject: Re: DERBY-6512 Cannot use java.util.Arrays.toString( byte[] b )
>> as a function.
>> From: Rick Hillegas
>> To: derby-dev@db.apache.org
>> CC:
>>
>>
>> On 7/14/17 2:03 AM, Dinuka Nadeeshan wrote:
>>
>> Hi Rick,
>>
>> My JIRA user id is
>>
>> *dinuka.n *
>> thanks.
>>
>> On Fri, Jul 14, 2017 at 5:27 AM, Rick Hillegas <rick.hille...@gmail.com>
>> wrote:
>>
>>> On 7/13/17 12:14 PM, Dinuka Nadeeshan wrote:
>>>
>>> I would like to contribute to this issue. Please assign me to this issue.
>>>
>>> [DERBY-6512]
>>>
>>> --
>>> *K. A. Dinuka Nadeeshan*
>>> Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
>>> University of Peradeniya, Sri-Lanka
>>> LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
>>> <https://www.linkedin.com/in/dinuka-nadeeshan/>*
>>> GitHub: *https://github.com/dinukanadeeshan
>>> <https://github.com/dinukanadeeshan>*
>>>
>>> Hi Dinuka,
>>>
>>> What is your JIRA user id? We need that id in order to assign the issue
>>> to you. If you haven't already signed up for a JIRA id, please do so at
>>> https://issues.apache.org/jira/login.jsp
>>>
>>> Thanks,
>>>
>>> -Rick
>>>
>>
>>
>>
>> --
>> *K. A. Dinuka Nadeeshan*
>> Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
>> University of Peradeniya, Sri-Lanka
>> LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
>> <https://www.linkedin.com/in/dinuka-nadeeshan/>*
>> GitHub: *https://github.com/dinukanadeeshan
>> <https://github.com/dinukanadeeshan>*
>>
>> Hi Dinuka,
>>
>> Just to confirm: The name associated with that JIRA id is Dinuka
>> Kodithuwakku, which is not the name you used to sign this message. Is that
>> the correct JIRA id?
>>
>> Thanks,
>>
>> -Rick
>>
>>
>>


-- 
*K. A. Dinuka Nadeeshan*
Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
University of Peradeniya, Sri-Lanka
LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
<https://www.linkedin.com/in/dinuka-nadeeshan/>*
GitHub: *https://github.com/dinukanadeeshan
<https://github.com/dinukanadeeshan>*


Re: DERBY-6512 Cannot use java.util.Arrays.toString( byte[] b ) as a function.

2017-07-16 Thread Dinuka Nadeeshan
ok thank you rick...

On Jul 16, 2017 19:37, "Rick Hillegas" <rick.hille...@gmail.com> wrote:

> On 7/15/17 7:57 AM, dinuka.nadeeshan1...@gmail.com wrote:
>
> hi rick,
>
> yes. it is correct. Dinuka Nadeeshan Kodithuwakku that is full name.
> so my user id is dinuka.n
> thanks
>
> Thanks, Dinuka. I have assigned the bug to you. Cheers!
>
>
>
>
>  Original Message 
> Subject: Re: DERBY-6512 Cannot use java.util.Arrays.toString( byte[] b )
> as a function.
> From: Rick Hillegas
> To: derby-dev@db.apache.org
> CC:
>
>
> On 7/14/17 2:03 AM, Dinuka Nadeeshan wrote:
>
> Hi Rick,
>
> My JIRA user id is
>
> *dinuka.n *
> thanks.
>
> On Fri, Jul 14, 2017 at 5:27 AM, Rick Hillegas <rick.hille...@gmail.com>
> wrote:
>
>> On 7/13/17 12:14 PM, Dinuka Nadeeshan wrote:
>>
>> I would like to contribute to this issue. Please assign me to this issue.
>>
>> [DERBY-6512]
>>
>> --
>> *K. A. Dinuka Nadeeshan*
>> Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
>> University of Peradeniya, Sri-Lanka
>> LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
>> <https://www.linkedin.com/in/dinuka-nadeeshan/>*
>> GitHub: *https://github.com/dinukanadeeshan
>> <https://github.com/dinukanadeeshan>*
>>
>> Hi Dinuka,
>>
>> What is your JIRA user id? We need that id in order to assign the issue
>> to you. If you haven't already signed up for a JIRA id, please do so at
>> https://issues.apache.org/jira/login.jsp
>>
>> Thanks,
>>
>> -Rick
>>
>
>
>
> --
> *K. A. Dinuka Nadeeshan*
> Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
> University of Peradeniya, Sri-Lanka
> LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
> <https://www.linkedin.com/in/dinuka-nadeeshan/>*
> GitHub: *https://github.com/dinukanadeeshan
> <https://github.com/dinukanadeeshan>*
>
> Hi Dinuka,
>
> Just to confirm: The name associated with that JIRA id is Dinuka
> Kodithuwakku, which is not the name you used to sign this message. Is that
> the correct JIRA id?
>
> Thanks,
>
> -Rick
>
>
>


Re: DERBY-6512 Cannot use java.util.Arrays.toString( byte[] b ) as a function.

2017-07-14 Thread Dinuka Nadeeshan
Hi Rick,

My JIRA user id is

*dinuka.n*
thanks.

On Fri, Jul 14, 2017 at 5:27 AM, Rick Hillegas <rick.hille...@gmail.com>
wrote:

> On 7/13/17 12:14 PM, Dinuka Nadeeshan wrote:
>
> I would like to contribute to this issue. Please assign me to this issue.
>
> [DERBY-6512]
>
> --
> *K. A. Dinuka Nadeeshan*
> Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
> University of Peradeniya, Sri-Lanka
> LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
> <https://www.linkedin.com/in/dinuka-nadeeshan/>*
> GitHub: *https://github.com/dinukanadeeshan
> <https://github.com/dinukanadeeshan>*
>
> Hi Dinuka,
>
> What is your JIRA user id? We need that id in order to assign the issue to
> you. If you haven't already signed up for a JIRA id, please do so at
> https://issues.apache.org/jira/login.jsp
>
> Thanks,
>
> -Rick
>



-- 
*K. A. Dinuka Nadeeshan*
Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
University of Peradeniya, Sri-Lanka
LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
<https://www.linkedin.com/in/dinuka-nadeeshan/>*
GitHub: *https://github.com/dinukanadeeshan
<https://github.com/dinukanadeeshan>*


DERBY-6512 Cannot use java.util.Arrays.toString( byte[] b ) as a function.

2017-07-13 Thread Dinuka Nadeeshan
I would like to contribute to this issue. Please assign me to this issue.

[DERBY-6512]

-- 
*K. A. Dinuka Nadeeshan*
Undergraduate of Dept. of Computer Engineering, Faculty of Engineering,
University of Peradeniya, Sri-Lanka
LinkedIn:* https://www.linkedin.com/in/dinuka-nadeeshan/
<https://www.linkedin.com/in/dinuka-nadeeshan/>*
GitHub: *https://github.com/dinukanadeeshan
<https://github.com/dinukanadeeshan>*