summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 17:56:41 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 17:56:41 +0000
commit1bf23421a09040259569e71027dd0400a3aae9ed (patch)
tree39db066cc3593385e291a1046cd299774968a5ce /ppapi
parent236ca9fbfa1cc341bb185a74a7c390912e51cb71 (diff)
downloadchromium_src-1bf23421a09040259569e71027dd0400a3aae9ed.zip
chromium_src-1bf23421a09040259569e71027dd0400a3aae9ed.tar.gz
chromium_src-1bf23421a09040259569e71027dd0400a3aae9ed.tar.bz2
Fixed some PP_X509Certificate_Private_Field enum values.
-Added PP_X509CERTIFICATE_PRIVATE_SUBJECT_DISTINGUISHED_NAME/PP_X509CERTIFICATE_PRIVATE_ISSUER_DISTINGUISHED_NAME which I had missed originally. -Renamed: PP_X509CERTIFICATE_PRIVATE_ALGORITHM_OID -> PP_X509CERTIFICATE_PRIVATE_SIGNATURE_ALGORITHM_OID PP_X509CERTIFICATE_PRIVATE_ALGORITHM_PARAMATERS_RAW -> PP_X509CERTIFICATE_PRIVATE_SIGNATURE_ALGORITHM_PARAMATERS_RAW To be in-line with the flash names. This also fixes a bug in the tcp socket shared implementation which allows a resource to be released in a callback, before it is finished cleaning up. BUG=114626 TEST=out/Debug/browser_tests --gtest_filter=*PPAPITest.*X509Certificate* Review URL: http://codereview.chromium.org/10006048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/api/private/ppb_x509_certificate_private.idl12
-rw-r--r--ppapi/c/private/ppb_x509_certificate_private.h12
-rw-r--r--ppapi/shared_impl/private/tcp_socket_private_impl.cc4
-rw-r--r--ppapi/tests/test_x509_certificate_private.cc8
4 files changed, 27 insertions, 9 deletions
diff --git a/ppapi/api/private/ppb_x509_certificate_private.idl b/ppapi/api/private/ppb_x509_certificate_private.idl
index c68400b..c58403e 100644
--- a/ppapi/api/private/ppb_x509_certificate_private.idl
+++ b/ppapi/api/private/ppb_x509_certificate_private.idl
@@ -83,13 +83,13 @@ enum PP_X509Certificate_Private_Field {
* Note: This field is unimplemented and will return
* <code>PP_VARTYPE_NULL</code>.
*/
- PP_X509CERTIFICATE_PRIVATE_ALGORITHM_OID = 16,
+ PP_X509CERTIFICATE_PRIVATE_SIGNATURE_ALGORITHM_OID = 16,
/**
* Note: This field is unimplemented and will return
* <code>PP_VARTYPE_NULL</code>.
*/
- PP_X509CERTIFICATE_PRIVATE_ALGORITHM_PARAMATERS_RAW = 17,
+ PP_X509CERTIFICATE_PRIVATE_SIGNATURE_ALGORITHM_PARAMATERS_RAW = 17,
/**
* This corresponds to a double (<code>PP_VARTYPE_DOUBLE</code>) which
@@ -116,7 +116,13 @@ enum PP_X509Certificate_Private_Field {
* This corresponds to a byte array (<code>PP_VARTYPE_ARRAY_BUFFER</code>).
* This is the DER-encoded representation of the certificate.
*/
- PP_X509CERTIFICATE_PRIVATE_RAW = 22
+ PP_X509CERTIFICATE_PRIVATE_RAW = 22,
+
+ /** This corresponds to a string (<code>PP_VARTYPE_STRING</code>). */
+ PP_X509CERTIFICATE_PRIVATE_ISSUER_DISTINGUISHED_NAME = 23,
+
+ /** This corresponds to a string (<code>PP_VARTYPE_STRING</code>). */
+ PP_X509CERTIFICATE_PRIVATE_SUBJECT_DISTINGUISHED_NAME = 24
};
/**
diff --git a/ppapi/c/private/ppb_x509_certificate_private.h b/ppapi/c/private/ppb_x509_certificate_private.h
index ba7cb0c..da2fa8f 100644
--- a/ppapi/c/private/ppb_x509_certificate_private.h
+++ b/ppapi/c/private/ppb_x509_certificate_private.h
@@ -4,7 +4,7 @@
*/
/* From private/ppb_x509_certificate_private.idl,
- * modified Thu Mar 29 16:25:36 2012.
+ * modified Wed Apr 11 17:11:26 2012.
*/
#ifndef PPAPI_C_PRIVATE_PPB_X509_CERTIFICATE_PRIVATE_H_
@@ -87,12 +87,12 @@ typedef enum {
* Note: This field is unimplemented and will return
* <code>PP_VARTYPE_NULL</code>.
*/
- PP_X509CERTIFICATE_PRIVATE_ALGORITHM_OID = 16,
+ PP_X509CERTIFICATE_PRIVATE_SIGNATURE_ALGORITHM_OID = 16,
/**
* Note: This field is unimplemented and will return
* <code>PP_VARTYPE_NULL</code>.
*/
- PP_X509CERTIFICATE_PRIVATE_ALGORITHM_PARAMATERS_RAW = 17,
+ PP_X509CERTIFICATE_PRIVATE_SIGNATURE_ALGORITHM_PARAMATERS_RAW = 17,
/**
* This corresponds to a double (<code>PP_VARTYPE_DOUBLE</code>) which
* can be cast to a <code>PP_TIME</code>.
@@ -114,7 +114,11 @@ typedef enum {
* This corresponds to a byte array (<code>PP_VARTYPE_ARRAY_BUFFER</code>).
* This is the DER-encoded representation of the certificate.
*/
- PP_X509CERTIFICATE_PRIVATE_RAW = 22
+ PP_X509CERTIFICATE_PRIVATE_RAW = 22,
+ /** This corresponds to a string (<code>PP_VARTYPE_STRING</code>). */
+ PP_X509CERTIFICATE_PRIVATE_ISSUER_DISTINGUISHED_NAME = 23,
+ /** This corresponds to a string (<code>PP_VARTYPE_STRING</code>). */
+ PP_X509CERTIFICATE_PRIVATE_SUBJECT_DISTINGUISHED_NAME = 24
} PP_X509Certificate_Private_Field;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_X509Certificate_Private_Field, 4);
diff --git a/ppapi/shared_impl/private/tcp_socket_private_impl.cc b/ppapi/shared_impl/private/tcp_socket_private_impl.cc
index c37940b..a23066c 100644
--- a/ppapi/shared_impl/private/tcp_socket_private_impl.cc
+++ b/ppapi/shared_impl/private/tcp_socket_private_impl.cc
@@ -264,8 +264,12 @@ void TCPSocketPrivateImpl::OnSSLHandshakeCompleted(
certificate_fields);
TrackedCallback::ClearAndRun(&ssl_handshake_callback_, PP_OK);
} else {
+ // The resource might be released in the callback so we need to hold
+ // a reference so we can Disconnect() first.
+ AddRef();
TrackedCallback::ClearAndRun(&ssl_handshake_callback_, PP_ERROR_FAILED);
Disconnect();
+ Release();
}
}
diff --git a/ppapi/tests/test_x509_certificate_private.cc b/ppapi/tests/test_x509_certificate_private.cc
index a8bf649..6aee30f 100644
--- a/ppapi/tests/test_x509_certificate_private.cc
+++ b/ppapi/tests/test_x509_certificate_private.cc
@@ -199,11 +199,15 @@ std::string TestX509CertificatePrivate::TestValidCertificate() {
ASSERT_TRUE(FieldIsNull(certificate,
PP_X509CERTIFICATE_PRIVATE_ISSUER_UNIQUE_ID));
ASSERT_TRUE(FieldIsNull(certificate,
+ PP_X509CERTIFICATE_PRIVATE_SUBJECT_DISTINGUISHED_NAME));
+ ASSERT_TRUE(FieldIsNull(certificate,
+ PP_X509CERTIFICATE_PRIVATE_ISSUER_DISTINGUISHED_NAME));
+ ASSERT_TRUE(FieldIsNull(certificate,
PP_X509CERTIFICATE_PRIVATE_VERSION));
ASSERT_TRUE(FieldIsNull(certificate,
- PP_X509CERTIFICATE_PRIVATE_ALGORITHM_OID));
+ PP_X509CERTIFICATE_PRIVATE_SIGNATURE_ALGORITHM_OID));
ASSERT_TRUE(FieldIsNull(certificate,
- PP_X509CERTIFICATE_PRIVATE_ALGORITHM_PARAMATERS_RAW));
+ PP_X509CERTIFICATE_PRIVATE_SIGNATURE_ALGORITHM_PARAMATERS_RAW));
ASSERT_TRUE(FieldIsNull(certificate,
PP_X509CERTIFICATE_PRIVATE_SUBJECT_PUBLIC_KEY));