Skip to content

Commit

Permalink
Revert of DERT61String change from 4402151
Browse files Browse the repository at this point in the history
Bug: 8685209

(cherry picked from commit 9de1ab8)

Change-Id: I0f75ffdcf0b82fcf600e85da2850cd66abd97e3b
  • Loading branch information
bdcgoogle committed Apr 23, 2013
1 parent 8c18c33 commit 57c3bb5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bcprov/src/main/java/org/bouncycastle/asn1/DERT61String.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,16 @@ public static DERT61String getInstance(
public DERT61String(
String string)
{
this.string = Strings.toUTF8ByteArray(string);
// BEGIN android-changed
this.string = Strings.toByteArray(string);
// END android-changed
}

public String getString()
{
return Strings.fromUTF8ByteArray(string);
// BEGIN android-changed
return Strings.fromByteArray(string);
// END android-changed
}

public String toString()
Expand Down
5 changes: 5 additions & 0 deletions import_bouncycastle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ function update_timestamps() {

find "$git_dir" -type f -print0 | while IFS= read -r -d $'\0' file; do
file_rev="$(git rev-list -n 1 HEAD "$file")"
if [ "$file_rev" == "" ]; then
echo
echo -n "WARNING: No file revision for file $file..."
continue
fi
file_time="$(git show --pretty=format:%ai --abbrev-commit "$file_rev" | head -n 1)"
touch -d "$file_time" "${target_dir}${file#$git_dir}"
done
Expand Down
22 changes: 22 additions & 0 deletions patches/bcprov.patch
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,28 @@ diff -Naur bcprov-jdk15on-148.orig/org/bouncycastle/asn1/DERPrintableString.java

/**
* return a printable string from the passed in object.
diff -Naur bcprov-jdk15on-148.orig/org/bouncycastle/asn1/DERT61String.java bcprov-jdk15on-148/org/bouncycastle/asn1/DERT61String.java
--- bcprov-jdk15on-148.orig/org/bouncycastle/asn1/DERT61String.java 2013-02-10 00:37:58.000000000 +0000
+++ bcprov-jdk15on-148/org/bouncycastle/asn1/DERT61String.java 2013-01-31 02:26:40.000000000 +0000
@@ -82,12 +82,16 @@
public DERT61String(
String string)
{
- this.string = Strings.toUTF8ByteArray(string);
+ // BEGIN android-changed
+ this.string = Strings.toByteArray(string);
+ // END android-changed
}

public String getString()
{
- return Strings.fromUTF8ByteArray(string);
+ // BEGIN android-changed
+ return Strings.fromByteArray(string);
+ // END android-changed
}

public String toString()
diff -Naur bcprov-jdk15on-148.orig/org/bouncycastle/asn1/cms/ContentInfo.java bcprov-jdk15on-148/org/bouncycastle/asn1/cms/ContentInfo.java
--- bcprov-jdk15on-148.orig/org/bouncycastle/asn1/cms/ContentInfo.java 2013-02-10 00:37:58.000000000 +0000
+++ bcprov-jdk15on-148/org/bouncycastle/asn1/cms/ContentInfo.java 2012-09-17 23:04:47.000000000 +0000
Expand Down

0 comments on commit 57c3bb5

Please sign in to comment.