summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdfapi/fpdf_serial.h4
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp9
2 files changed, 11 insertions, 2 deletions
diff --git a/core/include/fpdfapi/fpdf_serial.h b/core/include/fpdfapi/fpdf_serial.h
index 87ec7b5a05..a91870b5a5 100644
--- a/core/include/fpdfapi/fpdf_serial.h
+++ b/core/include/fpdfapi/fpdf_serial.h
@@ -1,7 +1,7 @@
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef _FPDF_SERIAL_
@@ -121,6 +121,8 @@ public:
~CPDF_Creator();
+ void RemoveSecurity();
+
FX_BOOL Create(FX_LPCWSTR filename, FX_DWORD flags = 0);
FX_BOOL Create(FX_LPCSTR filename, FX_DWORD flags = 0);
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index e5bb1cf985..bdbcccdf06 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -1,7 +1,7 @@
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../include/fpdfapi/fpdf_serial.h"
@@ -2113,6 +2113,13 @@ FX_BOOL CPDF_Creator::SetFileVersion(FX_INT32 fileVersion )
m_FileVersion = fileVersion;
return TRUE;
}
+void CPDF_Creator::RemoveSecurity()
+{
+ ResetStandardSecurity();
+ m_bSecurityChanged = TRUE;
+ m_pEncryptDict = NULL;
+ m_pCryptoHandler = NULL;
+}
void CPDF_Creator::ResetStandardSecurity()
{
if ((m_bStandardSecurity || m_bNewCrypto) && m_pCryptoHandler) {