Compare commits
107 Commits
v7.3.0.159
...
v7.3.3.36
| Author | SHA1 | Date | |
|---|---|---|---|
| ce64eca658 | |||
| 8a0c070990 | |||
| 1d0bb53607 | |||
| e83e025748 | |||
| 66ac071c58 | |||
| cd8ce24a70 | |||
| a7c70687c9 | |||
| 5d0f0875be | |||
| 365d8bf95a | |||
| 313af0b405 | |||
| 4aa56f8aa0 | |||
| ffe2806bc8 | |||
| 7dcbd57aa7 | |||
| cdb72bab80 | |||
| b15aff55d1 | |||
| d3423f93eb | |||
| 0f9cc64520 | |||
| 2309f915b4 | |||
| 60bae43495 | |||
| 77297aedc8 | |||
| ecd2a5eba1 | |||
| 698def3934 | |||
| 00e9550927 | |||
| 8e36d60e4b | |||
| daa392556a | |||
| eea5608399 | |||
| a03b876269 | |||
| eecf268ac9 | |||
| 7e767f0f3f | |||
| cf37e1edef | |||
| eedcaa9768 | |||
| c615afa80e | |||
| 93435fce9f | |||
| c6d767d8d9 | |||
| 8a9861a583 | |||
| e71e4068e4 | |||
| 29804158f9 | |||
| 9683d6e78c | |||
| 4cfe02a387 | |||
| f79ad969a4 | |||
| 916635782d | |||
| 96ff2246fa | |||
| 1b10918258 | |||
| 11099d2575 | |||
| 52071831de | |||
| a133ce4714 | |||
| 608b04ca26 | |||
| 2b6ad83b36 | |||
| 0b9dc3c296 | |||
| 47e0ccbe29 | |||
| 5d720e75f5 | |||
| ad03ae0390 | |||
| 90d709972d | |||
| f77d3440f6 | |||
| 1b84274673 | |||
| f601d95d27 | |||
| c16d63c011 | |||
| 4e0e0265d0 | |||
| bbf661e74e | |||
| e5253bbf35 | |||
| c2591eea02 | |||
| cf0e9febe5 | |||
| a3696b07df | |||
| 32e1be7493 | |||
| 46a37c9199 | |||
| aea4996a45 | |||
| 28257fca25 | |||
| f846881e88 | |||
| 961e955ee4 | |||
| ac7569bc51 | |||
| 1cd49c52d2 | |||
| 8338ff75c8 | |||
| a215476303 | |||
| 7e765011b8 | |||
| c2e4fcfebd | |||
| e649ecb7a0 | |||
| fc45ed4aaf | |||
| 5c6956b5d5 | |||
| 8a728e2ec9 | |||
| 9a515fc99e | |||
| 71ab0560f2 | |||
| 255c8cd547 | |||
| e36b2bcd93 | |||
| 79aede17c6 | |||
| 23afcb430c | |||
| 5d4d2d817c | |||
| 8a2234d2b5 | |||
| 3526b286c3 | |||
| d0b9a8e052 | |||
| 497ec9b2f1 | |||
| 7a4353bc4a | |||
| 0b2fa174d5 | |||
| 9b0cd732e3 | |||
| 062e410efc | |||
| 1faa2c3f77 | |||
| 70c7635af6 | |||
| 7ae87cf15a | |||
| c73e91094f | |||
| 98df4659b5 | |||
| b2e2b06fc2 | |||
| a039a36b8f | |||
| d6c4b2b95c | |||
| 276de3c7b0 | |||
| ab2f79bd19 | |||
| 7f1e2370d2 | |||
| a2aec43d22 | |||
| 24e04314d8 |
@ -1282,7 +1282,10 @@ namespace NSCSS
|
||||
|
||||
Scale(nValue, enScalingDirection);
|
||||
|
||||
sValueString += std::to_wstring(nValue);
|
||||
sValueString += std::to_wstring(nValue);
|
||||
|
||||
if (!iswdigit(sValueTemp.back()))
|
||||
sValueString += sValueTemp.back();
|
||||
}
|
||||
else
|
||||
sValueString += sValueTemp;
|
||||
|
||||
@ -2023,7 +2023,7 @@ namespace NSCSS
|
||||
if (sValue.empty())
|
||||
return BorderSide();
|
||||
|
||||
const std::vector<std::wstring> arValues = NS_STATIC_FUNCTIONS::GetWordsW(sValue, L" ");
|
||||
const std::vector<std::wstring> arValues = NS_STATIC_FUNCTIONS::GetWordsW(NS_STATIC_FUNCTIONS::NormalizeRGB(sValue), L" ");
|
||||
BorderSide oBorderSide;
|
||||
for (std::wstring sValue : arValues)
|
||||
{
|
||||
|
||||
@ -315,6 +315,26 @@ namespace NSCSS
|
||||
return sValue.empty() ? false : std::all_of(sValue.begin(), sValue.end(), [] (const wchar_t& cChar) { return iswdigit(cChar); });
|
||||
}
|
||||
|
||||
inline std::wstring NormalizeRGB(const std::wstring& wsValue)
|
||||
{
|
||||
std::wstring wsNewValue = wsValue;
|
||||
|
||||
size_t unBegin = 0, unEnd;
|
||||
|
||||
while (std::wstring::npos != (unBegin = wsNewValue.find(L"rgb(", unBegin)))
|
||||
{
|
||||
unEnd = wsNewValue.find(L")", unBegin);
|
||||
|
||||
while ((unBegin = wsNewValue.find(L" ", unBegin)) != std::wstring::npos && unBegin < unEnd)
|
||||
{
|
||||
wsNewValue.replace(unBegin, 1, L",");
|
||||
++unBegin;
|
||||
}
|
||||
}
|
||||
|
||||
return wsNewValue;
|
||||
}
|
||||
|
||||
inline std::wstring ConvertRgbToHex(const std::wstring& sRgbValue)
|
||||
{
|
||||
size_t posFirst = sRgbValue.find_first_of(L"01234567890");
|
||||
|
||||
@ -17,12 +17,12 @@ if not base.is_dir("gumbo-parser"):
|
||||
base.replaceInFile(base_directory + "/gumbo-parser/src/tag.c", "isspace(*c)", "isspace((unsigned char)*c)")
|
||||
|
||||
if not base.is_dir("katana-parser"):
|
||||
base.cmd("git", ["clone", "https://github.com/hackers-painters/katana-parser.git"])
|
||||
base.cmd_in_dir("katana-parser", "git", ["checkout", "499118d32c387a893fdc9dda2cb95eee524bdb9b"])
|
||||
base.cmd("git", ["clone", "https://github.com/jasenhuang/katana-parser.git"])
|
||||
base.cmd_in_dir("katana-parser", "git", ["checkout", "be6df458d4540eee375c513958dcb862a391cdd1"])
|
||||
|
||||
# fix katana
|
||||
base.replaceInFile(base_directory + "/katana-parser/src/tokenizer.c", "static inline bool katana_is_html_space(char c);", "static inline bool2 katana_is_html_space(char c);")
|
||||
base.replaceInFile(base_directory + "/katana-parser/src/tokenizer.c", "inline bool katana_is_html_space(char c)", "static inline bool katana_is_html_space(char c)")
|
||||
base.replaceInFile(base_directory + "/katana-parser/src/tokenizer.c", "static inline bool2 katana_is_html_space(char c);", "static inline bool katana_is_html_space(char c);")
|
||||
base.replaceInFile(base_directory + "/katana-parser/src/parser.c", "katanaget_text(parser->scanner)", "/*katanaget_text(parser->scanner)*/\"error\"")
|
||||
|
||||
base.replaceInFile(base_directory + "/katana-parser/src/parser.c", "#define KATANA_PARSER_STRING(literal) (KatanaParserString){", "#define KATANA_PARSER_STRING(literal) {")
|
||||
|
||||
21
Common/Network/WebSocket/src/socketio/make.py
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../../../../../../build_tools/scripts')
|
||||
import base
|
||||
|
||||
file_path = "./socketio_internal_private_no_tls.h"
|
||||
if not base.is_file(file_path):
|
||||
file.delete_file(file_path)
|
||||
|
||||
base.copy_file("./socketio_internal_private.h", file_path)
|
||||
|
||||
header = "///////////////////////////////////////////////////////////\n"
|
||||
header += "/// auto generated file. please use generator (make.py) ///\n"
|
||||
header += "///////////////////////////////////////////////////////////\n"
|
||||
header += "\n#pragma once"
|
||||
|
||||
base.replaceInFile(file_path, "#pragma once", header)
|
||||
base.replaceInFile(file_path, "/socket.io-client-cpp/src/", "/socket.io-client-cpp/src_no_tls/")
|
||||
base.replaceInFile(file_path, "sio::", "sio_no_tls::")
|
||||
base.replaceInFile(file_path, "CIOWebSocket_private_tls", "CIOWebSocket_private_no_tls")
|
||||
@ -30,149 +30,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "socketio_internal.h"
|
||||
#include <iostream>
|
||||
#include "../../../../3dParty/socketio/socket.io-client-cpp/src/internal/sio_packet.h"
|
||||
#include "../../../../3dParty/socketio/socket.io-client-cpp/src/sio_client.h"
|
||||
#include "../../../../../DesktopEditor/graphics/TemporaryCS.h"
|
||||
#include "socketio_internal_private.h"
|
||||
#include "socketio_internal_private_no_tls.h"
|
||||
|
||||
namespace NSNetwork
|
||||
{
|
||||
namespace NSWebSocket
|
||||
{
|
||||
class CIOWebSocket_private
|
||||
{
|
||||
public:
|
||||
sio::client m_socket;
|
||||
NSCriticalSection::CRITICAL_SECTION m_oCS;
|
||||
CIOWebSocket* m_base;
|
||||
|
||||
public:
|
||||
CIOWebSocket_private(CIOWebSocket* base)
|
||||
{
|
||||
m_base = base;
|
||||
m_oCS.InitializeCriticalSection();
|
||||
}
|
||||
~CIOWebSocket_private()
|
||||
{
|
||||
m_socket.close();
|
||||
m_oCS.DeleteCriticalSection();
|
||||
}
|
||||
|
||||
public:
|
||||
void event_onConnected()
|
||||
{
|
||||
m_base->listener->onOpen();
|
||||
}
|
||||
void event_onClose(sio::client::close_reason const& reason)
|
||||
{
|
||||
m_base->listener->onClose(0, "");
|
||||
}
|
||||
void event_onFail()
|
||||
{
|
||||
m_base->listener->onError("");
|
||||
}
|
||||
|
||||
public:
|
||||
void open(const std::map<std::string, std::string>& query)
|
||||
{
|
||||
m_socket.set_open_listener (std::bind(&CIOWebSocket_private::event_onConnected, this));
|
||||
m_socket.set_close_listener(std::bind(&CIOWebSocket_private::event_onClose, this, std::placeholders::_1));
|
||||
m_socket.set_fail_listener (std::bind(&CIOWebSocket_private::event_onFail, this));
|
||||
|
||||
sio::message::ptr objAuth = sio::object_message::create();
|
||||
//std::string sAuth;
|
||||
|
||||
std::map<std::string, std::string> queryDst = query;
|
||||
std::map<std::string, std::string>::iterator iterAuth = queryDst.find("token");
|
||||
if (iterAuth != queryDst.end())
|
||||
{
|
||||
objAuth->get_map()["token"] = sio::string_message::create(iterAuth->second);
|
||||
//sAuth = "{\"token\":\"" + iterAuth->second + "\"}";
|
||||
queryDst.erase(iterAuth);
|
||||
}
|
||||
|
||||
//webSocket.connect(url, queryDst, sio::string_message::create(sAuth));
|
||||
m_socket.connect(m_base->url, queryDst, objAuth);
|
||||
|
||||
m_socket.socket()->on("message", [&](sio::event& event){
|
||||
CTemporaryCS oCS(&m_oCS);
|
||||
const sio::message::ptr& message = event.get_message();
|
||||
if (!message)
|
||||
return;
|
||||
|
||||
// TODO: пока только текстовые и json команды
|
||||
switch (message->get_flag())
|
||||
{
|
||||
case sio::message::flag_null:
|
||||
{
|
||||
m_base->listener->onMessage("null");
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_integer:
|
||||
case sio::message::flag_double:
|
||||
case sio::message::flag_boolean:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_binary:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_array:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_object:
|
||||
{
|
||||
sio::packet_manager manager;
|
||||
|
||||
std::stringstream ss;
|
||||
sio::packet packet("/", message);
|
||||
manager.encode( packet, [&](bool isBinary, std::shared_ptr<const std::string> const& json)
|
||||
{
|
||||
ss << *json;
|
||||
});
|
||||
manager.reset();
|
||||
|
||||
std::string result = ss.str();
|
||||
|
||||
std::size_t indexList = result.find('[');
|
||||
std::size_t indexObject = result.find('{');
|
||||
std::size_t indexString = result.find('"');
|
||||
|
||||
std::size_t index = indexList;
|
||||
if (indexObject != std::string::npos && indexObject < index)
|
||||
index = indexObject;
|
||||
if (indexString != std::string::npos && indexString < index)
|
||||
index = indexString;
|
||||
|
||||
if (index != std::string::npos)
|
||||
result = result.substr(index);
|
||||
else
|
||||
result = "";
|
||||
|
||||
m_base->listener->onMessage(result);
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_string:
|
||||
{
|
||||
m_base->listener->onMessage(message->get_string());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
CIOWebSocket::CIOWebSocket(const std::string& url, std::shared_ptr<IListener> listener): CWebWorkerBase(url, listener)
|
||||
{
|
||||
m_internal = new CIOWebSocket_private(this);
|
||||
if (0 == url.find("http://"))
|
||||
m_internal = new CIOWebSocket_private_no_tls(this);
|
||||
else
|
||||
m_internal = new CIOWebSocket_private_tls(this);
|
||||
}
|
||||
|
||||
void CIOWebSocket::open(const std::map<std::string, std::string>& query)
|
||||
@ -182,36 +52,12 @@ namespace NSNetwork
|
||||
|
||||
void CIOWebSocket::send(const std::string& message_str)
|
||||
{
|
||||
//CTemporaryCS (&m_internal->m_oCS);
|
||||
|
||||
// если json -то надо объект
|
||||
if (0 == message_str.find("{") ||
|
||||
0 == message_str.find("["))
|
||||
{
|
||||
sio::packet_manager manager;
|
||||
sio::message::ptr message;
|
||||
manager.set_decode_callback([&](sio::packet const& p)
|
||||
{
|
||||
message = p.get_message();
|
||||
});
|
||||
|
||||
// Magic message type / ID
|
||||
manager.put_payload("42" + message_str);
|
||||
manager.reset();
|
||||
|
||||
m_internal->m_socket.socket()->emit("message", message);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_internal->m_socket.socket()->emit("message", sio::string_message::create(message_str));
|
||||
}
|
||||
m_internal->send(message_str);
|
||||
}
|
||||
|
||||
void CIOWebSocket::close()
|
||||
{
|
||||
//CTemporaryCS (&m_internal->m_oCS);
|
||||
m_internal->m_socket.socket()->off_all();
|
||||
m_internal->m_socket.close();
|
||||
m_internal->close();
|
||||
}
|
||||
|
||||
CIOWebSocket::~CIOWebSocket()
|
||||
|
||||
@ -34,12 +34,37 @@
|
||||
#define _IO_WEB_SOCKET_H_
|
||||
|
||||
#include "../websocketbase.h"
|
||||
#include "../../../../../DesktopEditor/graphics/TemporaryCS.h"
|
||||
|
||||
namespace NSNetwork
|
||||
{
|
||||
namespace NSWebSocket
|
||||
{
|
||||
class CIOWebSocket_private;
|
||||
class CIOWebSocket;
|
||||
class CIOWebSocket_private
|
||||
{
|
||||
protected:
|
||||
CIOWebSocket* m_base;
|
||||
NSCriticalSection::CRITICAL_SECTION m_oCS;
|
||||
NSCriticalSection::CRITICAL_SECTION m_oCS_Events;
|
||||
public:
|
||||
CIOWebSocket_private(CIOWebSocket* base)
|
||||
{
|
||||
m_base = base;
|
||||
m_oCS.InitializeCriticalSection();
|
||||
m_oCS_Events.InitializeCriticalSection();
|
||||
}
|
||||
virtual ~CIOWebSocket_private()
|
||||
{
|
||||
m_oCS_Events.DeleteCriticalSection();
|
||||
m_oCS.DeleteCriticalSection();
|
||||
}
|
||||
|
||||
virtual void open(const std::map<std::string, std::string>& query) = 0;
|
||||
virtual void send(const std::string& message) = 0;
|
||||
virtual void close() = 0;
|
||||
};
|
||||
|
||||
class CIOWebSocket: public CWebWorkerBase
|
||||
{
|
||||
private:
|
||||
@ -55,6 +80,8 @@ namespace NSNetwork
|
||||
virtual void close() override;
|
||||
|
||||
friend class CIOWebSocket_private;
|
||||
friend class CIOWebSocket_private_tls;
|
||||
friend class CIOWebSocket_private_no_tls;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,235 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2021
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
|
||||
* street, Riga, Latvia, EU, LV-1050.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "socketio_internal.h"
|
||||
#include <iostream>
|
||||
#include "../../../../3dParty/socketio/socket.io-client-cpp/src/internal/sio_packet.h"
|
||||
#include "../../../../3dParty/socketio/socket.io-client-cpp/src/sio_client.h"
|
||||
#include <memory>
|
||||
#include "../../../../../DesktopEditor/graphics/BaseThread.h"
|
||||
|
||||
namespace NSNetwork
|
||||
{
|
||||
namespace NSWebSocket
|
||||
{
|
||||
class CIOWebSocket_private_tls : public CIOWebSocket_private
|
||||
{
|
||||
public:
|
||||
std::shared_ptr<sio::client> m_socket;
|
||||
// проблема закрытия сокета, пока он не приконнектился
|
||||
bool m_connecting_in_process;
|
||||
bool m_closing_in_progress;
|
||||
|
||||
public:
|
||||
CIOWebSocket_private_tls(CIOWebSocket* base) : CIOWebSocket_private(base)
|
||||
{
|
||||
m_connecting_in_process = false;
|
||||
m_closing_in_progress = false;
|
||||
m_base = base;
|
||||
}
|
||||
~CIOWebSocket_private_tls()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
public:
|
||||
void event_onConnected()
|
||||
{
|
||||
CTemporaryCS oCS(&m_oCS_Events);
|
||||
m_connecting_in_process = false;
|
||||
|
||||
if (!m_closing_in_progress)
|
||||
m_base->listener->onOpen();
|
||||
}
|
||||
void event_onClose(sio::client::close_reason const& reason)
|
||||
{
|
||||
CTemporaryCS oCS(&m_oCS_Events);
|
||||
m_connecting_in_process = false;
|
||||
|
||||
if (!m_closing_in_progress)
|
||||
m_base->listener->onClose(0, "");
|
||||
}
|
||||
void event_onFail()
|
||||
{
|
||||
CTemporaryCS oCS(&m_oCS_Events);
|
||||
m_connecting_in_process = false;
|
||||
|
||||
if (!m_closing_in_progress)
|
||||
m_base->listener->onError("");
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void open(const std::map<std::string, std::string>& query) override
|
||||
{
|
||||
m_socket = std::make_shared<sio::client>();
|
||||
m_socket->set_open_listener (std::bind(&CIOWebSocket_private_tls::event_onConnected, this));
|
||||
m_socket->set_close_listener(std::bind(&CIOWebSocket_private_tls::event_onClose, this, std::placeholders::_1));
|
||||
m_socket->set_fail_listener (std::bind(&CIOWebSocket_private_tls::event_onFail, this));
|
||||
|
||||
sio::message::ptr objAuth = sio::object_message::create();
|
||||
//std::string sAuth;
|
||||
|
||||
std::map<std::string, std::string> queryDst = query;
|
||||
std::map<std::string, std::string>::iterator iterAuth = queryDst.find("token");
|
||||
if (iterAuth != queryDst.end())
|
||||
{
|
||||
objAuth->get_map()["token"] = sio::string_message::create(iterAuth->second);
|
||||
//sAuth = "{\"token\":\"" + iterAuth->second + "\"}";
|
||||
queryDst.erase(iterAuth);
|
||||
}
|
||||
|
||||
//webSocket.connect(url, queryDst, sio::string_message::create(sAuth));
|
||||
m_connecting_in_process = true;
|
||||
m_socket->connect(m_base->url, queryDst, objAuth);
|
||||
|
||||
m_socket->socket()->on("message", [&](sio::event& event){
|
||||
CTemporaryCS oCS(&m_oCS_Events);
|
||||
if (m_closing_in_progress)
|
||||
return;
|
||||
|
||||
const sio::message::ptr& message = event.get_message();
|
||||
if (!message)
|
||||
return;
|
||||
|
||||
// TODO: пока только текстовые и json команды
|
||||
switch (message->get_flag())
|
||||
{
|
||||
case sio::message::flag_null:
|
||||
{
|
||||
m_base->listener->onMessage("null");
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_integer:
|
||||
case sio::message::flag_double:
|
||||
case sio::message::flag_boolean:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_binary:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_array:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_object:
|
||||
{
|
||||
sio::packet_manager manager;
|
||||
|
||||
std::stringstream ss;
|
||||
sio::packet packet("/", message);
|
||||
manager.encode( packet, [&](bool isBinary, std::shared_ptr<const std::string> const& json)
|
||||
{
|
||||
ss << *json;
|
||||
});
|
||||
manager.reset();
|
||||
|
||||
std::string result = ss.str();
|
||||
|
||||
std::size_t indexList = result.find('[');
|
||||
std::size_t indexObject = result.find('{');
|
||||
std::size_t indexString = result.find('"');
|
||||
|
||||
std::size_t index = indexList;
|
||||
if (indexObject != std::string::npos && indexObject < index)
|
||||
index = indexObject;
|
||||
if (indexString != std::string::npos && indexString < index)
|
||||
index = indexString;
|
||||
|
||||
if (index != std::string::npos)
|
||||
result = result.substr(index);
|
||||
else
|
||||
result = "";
|
||||
|
||||
m_base->listener->onMessage(result);
|
||||
break;
|
||||
}
|
||||
case sio::message::flag_string:
|
||||
{
|
||||
m_base->listener->onMessage(message->get_string());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
virtual void send(const std::string& message_str) override
|
||||
{
|
||||
//CTemporaryCS (&m_internal->m_oCS);
|
||||
|
||||
// если json -то надо объект
|
||||
if (0 == message_str.find("{") ||
|
||||
0 == message_str.find("["))
|
||||
{
|
||||
sio::packet_manager manager;
|
||||
sio::message::ptr message;
|
||||
manager.set_decode_callback([&](sio::packet const& p)
|
||||
{
|
||||
message = p.get_message();
|
||||
});
|
||||
|
||||
// Magic message type / ID
|
||||
manager.put_payload("42" + message_str);
|
||||
manager.reset();
|
||||
|
||||
m_socket->socket()->emit("message", message);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_socket->socket()->emit("message", sio::string_message::create(message_str));
|
||||
}
|
||||
}
|
||||
|
||||
virtual void close() override
|
||||
{
|
||||
CTemporaryCS oCS(&m_oCS);
|
||||
|
||||
m_oCS_Events.Enter();
|
||||
m_closing_in_progress = true;
|
||||
m_oCS_Events.Leave();
|
||||
|
||||
// https://github.com/socketio/socket.io-client-cpp/issues/254
|
||||
while (m_connecting_in_process)
|
||||
NSThreads::Sleep(50);
|
||||
|
||||
m_socket.reset();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,239 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2021
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
|
||||
* street, Riga, Latvia, EU, LV-1050.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
/// auto generated file. please use generator (make.py) ///
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
#include "socketio_internal.h"
|
||||
#include <iostream>
|
||||
#include "../../../../3dParty/socketio/socket.io-client-cpp/src_no_tls/internal/sio_packet.h"
|
||||
#include "../../../../3dParty/socketio/socket.io-client-cpp/src_no_tls/sio_client.h"
|
||||
#include <memory>
|
||||
#include "../../../../../DesktopEditor/graphics/BaseThread.h"
|
||||
|
||||
namespace NSNetwork
|
||||
{
|
||||
namespace NSWebSocket
|
||||
{
|
||||
class CIOWebSocket_private_no_tls : public CIOWebSocket_private
|
||||
{
|
||||
public:
|
||||
std::shared_ptr<sio_no_tls::client> m_socket;
|
||||
// проблема закрытия сокета, пока он не приконнектился
|
||||
bool m_connecting_in_process;
|
||||
bool m_closing_in_progress;
|
||||
|
||||
public:
|
||||
CIOWebSocket_private_no_tls(CIOWebSocket* base) : CIOWebSocket_private(base)
|
||||
{
|
||||
m_connecting_in_process = false;
|
||||
m_closing_in_progress = false;
|
||||
m_base = base;
|
||||
}
|
||||
~CIOWebSocket_private_no_tls()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
public:
|
||||
void event_onConnected()
|
||||
{
|
||||
CTemporaryCS oCS(&m_oCS_Events);
|
||||
m_connecting_in_process = false;
|
||||
|
||||
if (!m_closing_in_progress)
|
||||
m_base->listener->onOpen();
|
||||
}
|
||||
void event_onClose(sio_no_tls::client::close_reason const& reason)
|
||||
{
|
||||
CTemporaryCS oCS(&m_oCS_Events);
|
||||
m_connecting_in_process = false;
|
||||
|
||||
if (!m_closing_in_progress)
|
||||
m_base->listener->onClose(0, "");
|
||||
}
|
||||
void event_onFail()
|
||||
{
|
||||
CTemporaryCS oCS(&m_oCS_Events);
|
||||
m_connecting_in_process = false;
|
||||
|
||||
if (!m_closing_in_progress)
|
||||
m_base->listener->onError("");
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void open(const std::map<std::string, std::string>& query) override
|
||||
{
|
||||
m_socket = std::make_shared<sio_no_tls::client>();
|
||||
m_socket->set_open_listener (std::bind(&CIOWebSocket_private_no_tls::event_onConnected, this));
|
||||
m_socket->set_close_listener(std::bind(&CIOWebSocket_private_no_tls::event_onClose, this, std::placeholders::_1));
|
||||
m_socket->set_fail_listener (std::bind(&CIOWebSocket_private_no_tls::event_onFail, this));
|
||||
|
||||
sio_no_tls::message::ptr objAuth = sio_no_tls::object_message::create();
|
||||
//std::string sAuth;
|
||||
|
||||
std::map<std::string, std::string> queryDst = query;
|
||||
std::map<std::string, std::string>::iterator iterAuth = queryDst.find("token");
|
||||
if (iterAuth != queryDst.end())
|
||||
{
|
||||
objAuth->get_map()["token"] = sio_no_tls::string_message::create(iterAuth->second);
|
||||
//sAuth = "{\"token\":\"" + iterAuth->second + "\"}";
|
||||
queryDst.erase(iterAuth);
|
||||
}
|
||||
|
||||
//webSocket.connect(url, queryDst, sio_no_tls::string_message::create(sAuth));
|
||||
m_connecting_in_process = true;
|
||||
m_socket->connect(m_base->url, queryDst, objAuth);
|
||||
|
||||
m_socket->socket()->on("message", [&](sio_no_tls::event& event){
|
||||
CTemporaryCS oCS(&m_oCS_Events);
|
||||
if (m_closing_in_progress)
|
||||
return;
|
||||
|
||||
const sio_no_tls::message::ptr& message = event.get_message();
|
||||
if (!message)
|
||||
return;
|
||||
|
||||
// TODO: пока только текстовые и json команды
|
||||
switch (message->get_flag())
|
||||
{
|
||||
case sio_no_tls::message::flag_null:
|
||||
{
|
||||
m_base->listener->onMessage("null");
|
||||
break;
|
||||
}
|
||||
case sio_no_tls::message::flag_integer:
|
||||
case sio_no_tls::message::flag_double:
|
||||
case sio_no_tls::message::flag_boolean:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio_no_tls::message::flag_binary:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio_no_tls::message::flag_array:
|
||||
{
|
||||
m_base->listener->onMessage("");
|
||||
break;
|
||||
}
|
||||
case sio_no_tls::message::flag_object:
|
||||
{
|
||||
sio_no_tls::packet_manager manager;
|
||||
|
||||
std::stringstream ss;
|
||||
sio_no_tls::packet packet("/", message);
|
||||
manager.encode( packet, [&](bool isBinary, std::shared_ptr<const std::string> const& json)
|
||||
{
|
||||
ss << *json;
|
||||
});
|
||||
manager.reset();
|
||||
|
||||
std::string result = ss.str();
|
||||
|
||||
std::size_t indexList = result.find('[');
|
||||
std::size_t indexObject = result.find('{');
|
||||
std::size_t indexString = result.find('"');
|
||||
|
||||
std::size_t index = indexList;
|
||||
if (indexObject != std::string::npos && indexObject < index)
|
||||
index = indexObject;
|
||||
if (indexString != std::string::npos && indexString < index)
|
||||
index = indexString;
|
||||
|
||||
if (index != std::string::npos)
|
||||
result = result.substr(index);
|
||||
else
|
||||
result = "";
|
||||
|
||||
m_base->listener->onMessage(result);
|
||||
break;
|
||||
}
|
||||
case sio_no_tls::message::flag_string:
|
||||
{
|
||||
m_base->listener->onMessage(message->get_string());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
virtual void send(const std::string& message_str) override
|
||||
{
|
||||
//CTemporaryCS (&m_internal->m_oCS);
|
||||
|
||||
// если json -то надо объект
|
||||
if (0 == message_str.find("{") ||
|
||||
0 == message_str.find("["))
|
||||
{
|
||||
sio_no_tls::packet_manager manager;
|
||||
sio_no_tls::message::ptr message;
|
||||
manager.set_decode_callback([&](sio_no_tls::packet const& p)
|
||||
{
|
||||
message = p.get_message();
|
||||
});
|
||||
|
||||
// Magic message type / ID
|
||||
manager.put_payload("42" + message_str);
|
||||
manager.reset();
|
||||
|
||||
m_socket->socket()->emit("message", message);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_socket->socket()->emit("message", sio_no_tls::string_message::create(message_str));
|
||||
}
|
||||
}
|
||||
|
||||
virtual void close() override
|
||||
{
|
||||
CTemporaryCS oCS(&m_oCS);
|
||||
|
||||
m_oCS_Events.Enter();
|
||||
m_closing_in_progress = true;
|
||||
m_oCS_Events.Leave();
|
||||
|
||||
// https://github.com/socketio/socket.io-client-cpp/issues/254
|
||||
while (m_connecting_in_process)
|
||||
NSThreads::Sleep(50);
|
||||
|
||||
m_socket.reset();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -35,6 +35,19 @@ libsocketio {
|
||||
$$SOCKET_IO_LIB/src/sio_socket.cpp \
|
||||
$$SOCKET_IO_LIB/src/sio_client.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$SOCKET_IO_LIB/src_no_tls/internal/sio_client_impl.h \
|
||||
$$SOCKET_IO_LIB/src_no_tls/internal/sio_packet.h \
|
||||
$$SOCKET_IO_LIB/src_no_tls/sio_message.h \
|
||||
$$SOCKET_IO_LIB/src_no_tls/sio_socket.h \
|
||||
$$SOCKET_IO_LIB/src_no_tls/sio_client.h
|
||||
|
||||
SOURCES += \
|
||||
$$SOCKET_IO_LIB/src_no_tls/internal/sio_client_impl.cpp \
|
||||
$$SOCKET_IO_LIB/src_no_tls/internal/sio_packet.cpp \
|
||||
$$SOCKET_IO_LIB/src_no_tls/sio_socket.cpp \
|
||||
$$SOCKET_IO_LIB/src_no_tls/sio_client.cpp
|
||||
|
||||
DEFINES += \
|
||||
BOOST_DATE_TIME_NO_LIB \
|
||||
BOOST_REGEX_NO_LIB \
|
||||
@ -45,13 +58,18 @@ libsocketio {
|
||||
_WEBSOCKETPP_CPP11_TYPE_TRAITS_ \
|
||||
_WEBSOCKETPP_CPP11_CHRONO_ \
|
||||
\
|
||||
"SIO_TLS=1"
|
||||
"SIO_TLS=1" \
|
||||
"SIO_TLS_NO=0"
|
||||
|
||||
include($$PWD/../../3dParty/boost/boost.pri)
|
||||
|
||||
DEFINES += USE_IOWEBSOCKET
|
||||
|
||||
HEADERS += $$PWD/src/socketio/socketio_internal.h
|
||||
HEADERS += \
|
||||
$$PWD/src/socketio/socketio_internal.h \
|
||||
$$PWD/src/socketio/socketio_internal_private.h \
|
||||
$$PWD/src/socketio/socketio_internal_private_no_tls.h
|
||||
|
||||
SOURCES += $$PWD/src/socketio/socketio_internal.cpp
|
||||
}
|
||||
|
||||
|
||||
@ -267,6 +267,7 @@ core_ios {
|
||||
QMAKE_CFLAGS += -fembed-bitcode
|
||||
QMAKE_CXXFLAGS += -fembed-bitcode
|
||||
QMAKE_LFLAGS += -fembed-bitcode
|
||||
QMAKE_CXXFLAGS += -fobjc-arc
|
||||
|
||||
bundle_xcframeworks {
|
||||
xcframework_platform_ios_simulator {
|
||||
|
||||
@ -40,13 +40,30 @@ using namespace CFCPP;
|
||||
|
||||
CFCPP::Stream CFCPP::OpenFileStream(const std::wstring & filename, bool bRewrite, bool trunc)
|
||||
{
|
||||
BYTE* pUtf8 = nullptr;
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
|
||||
CFCPP::Stream st;
|
||||
|
||||
// it's not good, but otherwise file doesn't create or if use ios::app, then the seek for writing will be blocked
|
||||
if (bRewrite)
|
||||
std::wfstream create(filename, std::ios::app | std::ios::out);
|
||||
|
||||
if (trunc && bRewrite)
|
||||
st.reset(new FStreamWrapper(filename, std::ios::binary | std::ios::in | std::ios::out | std::ios::trunc));
|
||||
else if (bRewrite)
|
||||
st.reset(new FStreamWrapper(filename, std::ios::binary | std::ios::in | std::ios::out));
|
||||
else
|
||||
st.reset(new FStreamWrapper(filename, std::ios::binary | std::ios::in));
|
||||
|
||||
return st;
|
||||
#else
|
||||
BYTE* pUtf8 = nullptr;
|
||||
LONG lLen = 0;
|
||||
NSFile::CUtf8Converter::GetUtf8StringFromUnicode(filename.c_str(), filename.length(), pUtf8, lLen, false);
|
||||
std::string utf8filename((char*)pUtf8, lLen);
|
||||
delete [] pUtf8;
|
||||
|
||||
return OpenFileStream(utf8filename, bRewrite, trunc);
|
||||
#endif
|
||||
}
|
||||
|
||||
CFCPP::Stream CFCPP::OpenFileStream(const std::string & filename, bool bRewrite, bool trunc)
|
||||
|
||||
@ -42,7 +42,11 @@ class FStreamWrapper : public IStream, public std::fstream
|
||||
public:
|
||||
FStreamWrapper(std::string filename, std::ios_base::openmode openmode) :
|
||||
std::fstream(filename, openmode) {}
|
||||
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
|
||||
FStreamWrapper(std::wstring filename, std::ios_base::openmode openmode) :
|
||||
std::fstream(filename, openmode) {}
|
||||
#endif
|
||||
inline _INT64 tell() override {
|
||||
return std::fstream::tellg();
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ std::shared_ptr<CFStream> CFStorage::GetStream(const std::wstring& streamName)
|
||||
}
|
||||
else
|
||||
{
|
||||
throw CFItemNotFound(L"Cannot find item [" + streamName + L"] within the current storage");
|
||||
return std::shared_ptr<CFStream>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ using namespace CFCPP;
|
||||
CompoundFile::CompoundFile() : _impl(new CFCPP::CompoundFile_impl())
|
||||
{
|
||||
}
|
||||
CompoundFile::CompoundFile(const std::wstring &fileName, CFSUpdateMode updateMode, CFSConfiguration configParameters) :
|
||||
CompoundFile::CompoundFile(const std::wstring &fileName, CFSUpdateMode updateMode, int configParameters) :
|
||||
_impl(new CFCPP::CompoundFile_impl(fileName, updateMode, configParameters))
|
||||
{
|
||||
}
|
||||
@ -115,7 +115,7 @@ CompoundFile_impl::CompoundFile_impl() :
|
||||
CompoundFile_impl(CFSVersion::Ver_3, CFSConfiguration::Default)
|
||||
{}
|
||||
|
||||
CompoundFile_impl::CompoundFile_impl(const std::wstring &fileName, CFSUpdateMode updateMode, CFSConfiguration configParameters)
|
||||
CompoundFile_impl::CompoundFile_impl(const std::wstring &fileName, CFSUpdateMode updateMode, int configParameters)
|
||||
{
|
||||
configuration = configParameters;
|
||||
isValidationExceptionEnabled = !(configParameters & CFSConfiguration::NoValidationException);
|
||||
@ -1796,7 +1796,6 @@ _INT32 CompoundFile_impl::GetSectorSize()
|
||||
{
|
||||
return 2 << (header->sectorShift - 1);
|
||||
}
|
||||
|
||||
void CompoundFile_impl::Dispose(bool disposing)
|
||||
{
|
||||
try
|
||||
|
||||
@ -56,7 +56,7 @@ class CompoundFile_impl;
|
||||
class CompoundFile
|
||||
{
|
||||
public:
|
||||
CompoundFile(const std::wstring &fileName, CFSUpdateMode updateMode, CFSConfiguration configParameters = Default);
|
||||
CompoundFile(const std::wstring &fileName, CFSUpdateMode updateMode, int configParameters = Default);
|
||||
CompoundFile(CFSVersion cfsVersion, CFSConfiguration configFlags);
|
||||
CompoundFile(const std::wstring &fileName);
|
||||
CompoundFile(Stream stream);
|
||||
|
||||
@ -49,7 +49,7 @@ class DirectoryEntry;
|
||||
class CompoundFile_impl
|
||||
{
|
||||
public:
|
||||
CompoundFile_impl(const std::wstring &fileName, CFSUpdateMode updateMode, CFSConfiguration configParameters = Default);
|
||||
CompoundFile_impl(const std::wstring &fileName, CFSUpdateMode updateMode, int configParameters = Default);
|
||||
CompoundFile_impl(CFSVersion cfsVersion, CFSConfiguration configFlags);
|
||||
CompoundFile_impl(const std::wstring &fileName);
|
||||
CompoundFile_impl(Stream stream);
|
||||
@ -62,7 +62,6 @@ public:
|
||||
void Save(std::wstring wFileName);
|
||||
void Save(Stream stream);
|
||||
|
||||
|
||||
void Commit(bool releaseMemory = false);
|
||||
bool HasSourceStream() const;
|
||||
bool ValidationExceptionEnabled() const;
|
||||
@ -140,7 +139,7 @@ private:
|
||||
CFSVersion getVersion() const;
|
||||
|
||||
public:
|
||||
CFSConfiguration configuration = Default;
|
||||
int configuration = Default;
|
||||
std::unique_ptr<Header> header;
|
||||
Stream sourceStream;
|
||||
|
||||
|
||||
@ -810,6 +810,7 @@
|
||||
#define ASC_COAUTH_EVENT_TYPE_INSERT_URL_IMAGE 21000
|
||||
#define ASC_COAUTH_EVENT_TYPE_LOAD_URL_IMAGE 21001
|
||||
#define ASC_COAUTH_EVENT_TYPE_REPLACE_URL_IMAGE 21002
|
||||
#define ASC_COAUTH_EVENT_TYPE_INSERT_SCREEN_URL_IMAGE 21003
|
||||
|
||||
#define ASC_MENU_EVENT_TYPE_ADVANCED_OPTIONS 22000
|
||||
#define ASC_MENU_EVENT_TYPE_SET_PASSWORD 22001
|
||||
|
||||
@ -1448,10 +1448,12 @@ namespace NSFile
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
|
||||
src.open(strSrc.c_str(), std::ios::binary);
|
||||
dst.open(strDst.c_str(), std::ios::binary);
|
||||
if (src.is_open())
|
||||
dst.open(strDst.c_str(), std::ios::binary);
|
||||
#else
|
||||
src.open(strSrcA.c_str(), std::ios::binary);
|
||||
dst.open(strDstA.c_str(), std::ios::binary);
|
||||
if (src.is_open())
|
||||
dst.open(strDstA.c_str(), std::ios::binary);
|
||||
#endif
|
||||
|
||||
bool bRet = false;
|
||||
@ -1469,6 +1471,7 @@ namespace NSFile
|
||||
return bRet;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CFileBinary::Remove(const std::wstring& strFileName)
|
||||
{
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
|
||||
|
||||
@ -442,6 +442,10 @@ namespace NSStringExt
|
||||
{
|
||||
m_internal = new CStringUnicodeIterator_private(string);
|
||||
}
|
||||
CStringUnicodeIterator::~CStringUnicodeIterator()
|
||||
{
|
||||
delete m_internal;
|
||||
}
|
||||
|
||||
bool CStringUnicodeIterator::Check()
|
||||
{
|
||||
|
||||
@ -144,6 +144,7 @@ namespace NSStringExt
|
||||
|
||||
public:
|
||||
CStringUnicodeIterator(const std::wstring& string);
|
||||
~CStringUnicodeIterator();
|
||||
bool Check();
|
||||
void Next();
|
||||
unsigned int Value();
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#define CXIMAGE_MAX_MEMORY 268435456
|
||||
#define CXIMAGE_MAX_MEMORY 1073741824 // 1Gb
|
||||
|
||||
#define CXIMAGE_DEFAULT_DPI 96
|
||||
|
||||
|
||||
@ -487,6 +487,8 @@ bool CxImageJPG::CxExifInfo::ProcessExifDir(uint8_t * DirStart, uint8_t * Offset
|
||||
break;
|
||||
|
||||
case TAG_USERCOMMENT:
|
||||
if (ByteCount > 0)
|
||||
{
|
||||
// Olympus has this padded with trailing spaces. Remove these first.
|
||||
for (a=ByteCount;;){
|
||||
a--;
|
||||
@ -497,6 +499,7 @@ bool CxImageJPG::CxExifInfo::ProcessExifDir(uint8_t * DirStart, uint8_t * Offset
|
||||
}
|
||||
if (a == 0) break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Copy the comment */
|
||||
if (memcmp(ValuePtr, "ASCII",5) == 0){
|
||||
@ -803,7 +806,7 @@ bool CxImageJPG::CxExifInfo::ProcessExifDir2(CSafeReader DirStart, CSafeReader O
|
||||
|
||||
case TAG_USERCOMMENT:
|
||||
// Olympus has this padded with trailing spaces. Remove these first.
|
||||
if (ValuePtr.Check(ByteCount))
|
||||
if (ValuePtr.Check(ByteCount) && ByteCount > 0)
|
||||
{
|
||||
for (a=ByteCount;;){
|
||||
a--;
|
||||
|
||||
@ -76,8 +76,8 @@ bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRender
|
||||
{
|
||||
LOGGER_SPEED_START
|
||||
|
||||
if (retValue)
|
||||
retValue->Clear();
|
||||
if (retValue)
|
||||
retValue->Clear();
|
||||
|
||||
std::string commandA = U_TO_UTF8(command);
|
||||
//commandA = "Api." + commandA;
|
||||
@ -87,7 +87,7 @@ bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRender
|
||||
|
||||
LOGGER_SPEED_LAP("compile_command")
|
||||
|
||||
JSSmart<CJSValue> retNativeVal = m_context->runScript(commandA, try_catch);
|
||||
JSSmart<CJSValue> retNativeVal = m_context->runScript(commandA, try_catch);
|
||||
if(try_catch->Check())
|
||||
return false;
|
||||
|
||||
@ -100,7 +100,7 @@ bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRender
|
||||
|
||||
LOGGER_SPEED_LAP("run_command")
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string CV8RealTimeWorker::GetGlobalVariable()
|
||||
@ -139,7 +139,7 @@ bool CV8RealTimeWorker::OpenFile(const std::wstring& sBasePath, const std::wstri
|
||||
{
|
||||
LOGGER_SPEED_START
|
||||
|
||||
JSSmart<CJSContextScope> context_scope = m_context->CreateContextScope();
|
||||
JSSmart<CJSContextScope> context_scope = m_context->CreateContextScope();
|
||||
JSSmart<CJSTryCatch> try_catch = m_context->GetExceptions();
|
||||
|
||||
LOGGER_SPEED_LAP("compile");
|
||||
@ -150,7 +150,7 @@ bool CV8RealTimeWorker::OpenFile(const std::wstring& sBasePath, const std::wstri
|
||||
|
||||
LOGGER_SPEED_LAP("run")
|
||||
|
||||
if (true)
|
||||
if (true)
|
||||
{
|
||||
std::string sArg = m_sUtf8ArgumentJSON;
|
||||
if (sArg.empty())
|
||||
@ -249,7 +249,7 @@ bool CV8RealTimeWorker::OpenFile(const std::wstring& sBasePath, const std::wstri
|
||||
|
||||
LOGGER_SPEED_LAP("open")
|
||||
|
||||
return !bIsBreak;
|
||||
return !bIsBreak;
|
||||
}
|
||||
|
||||
bool CV8RealTimeWorker::SaveFileWithChanges(int type, const std::wstring& _path, const std::wstring& sJsonParams)
|
||||
|
||||
@ -890,7 +890,7 @@ namespace NSDoctRenderer
|
||||
|
||||
LOGGER_SPEED_START
|
||||
|
||||
CheckFileDir();
|
||||
CheckFileDir();
|
||||
NSDirectory::CreateDirectory(m_sFileDir + L"/changes");
|
||||
|
||||
std::wstring sExtCopy = GetFileCopyExt(path);
|
||||
@ -912,8 +912,8 @@ namespace NSDoctRenderer
|
||||
|
||||
LOGGER_SPEED_LAP("open_convert")
|
||||
|
||||
if (0 == nReturnCode)
|
||||
return 0;
|
||||
if (0 == nReturnCode)
|
||||
return 0;
|
||||
|
||||
NSDirectory::DeleteDirectory(m_sFileDir);
|
||||
m_sFileDir = L"";
|
||||
|
||||
@ -380,25 +380,6 @@ namespace NSDoctRenderer
|
||||
{
|
||||
std::string sHTML_Utf8 = js_result2->toStringA();
|
||||
|
||||
JSSmart<CJSValue> js_objectCoreVal = js_objectApi->call_func("asc_getCoreProps", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"core_props\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (js_objectCoreVal->isObject())
|
||||
{
|
||||
JSSmart<CJSObject> js_objectCore = js_objectCoreVal->toObject();
|
||||
JSSmart<CJSValue> js_results = js_objectCore->call_func("asc_getTitle", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_title\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull() && sHTML_Utf8.find("<title>") == std::string::npos)
|
||||
sHTML_Utf8.insert(sHTML_Utf8.find("</head>"), "<title>" + js_results->toStringA() + "</title>");
|
||||
}
|
||||
|
||||
NSFile::CFileBinary oFile;
|
||||
if (true == oFile.CreateFileW(pParams->m_strDstFilePath))
|
||||
{
|
||||
@ -844,129 +825,6 @@ namespace NSDoctRenderer
|
||||
bIsBreak = Doct_renderer_SaveFile(&m_oParams, pNative, context, args, strError, js_objectApi);
|
||||
}
|
||||
|
||||
// CORE PARAMS
|
||||
if (!bIsBreak && !bIsMailMerge &&
|
||||
(m_oParams.m_eDstFormat == DoctRendererFormat::HTML ||
|
||||
m_oParams.m_eDstFormat == DoctRendererFormat::PDF))
|
||||
{
|
||||
JSSmart<CJSValue> js_objectCoreVal = js_objectApi->call_func("asc_getCoreProps", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"core_props\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (js_objectCoreVal->isObject())
|
||||
{
|
||||
JSSmart<CJSObject> js_objectCore = js_objectCoreVal->toObject();
|
||||
JSSmart<CJSValue> js_results = js_objectCore->call_func("asc_getTitle", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_title\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
strReturnParams += L"<dc:title>";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</dc:title>";
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getCreator", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_creator\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
if (!js_results->toStringW().empty())
|
||||
{
|
||||
strReturnParams += L"<dc:creator>";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</dc:creator>";
|
||||
}
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getDescription", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_description\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
strReturnParams += L"<dc:description>";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</dc:description>";
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getSubject", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_subject\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
strReturnParams += L"<dc:subject>";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</dc:subject>";
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getIdentifier", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_identifier\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
strReturnParams += L"<dc:identifier>";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</dc:identifier>";
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getLanguage", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_language\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
strReturnParams += L"<dc:language>";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</dc:language>";
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getKeywords", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_keywords\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
strReturnParams += L"<cp:keywords>";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</cp:keywords>";
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getVersion", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_version\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
strReturnParams += L"<cp:version>";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</cp:version>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOGGER_SPEED_LAP("save")
|
||||
}
|
||||
|
||||
@ -1142,9 +1000,6 @@ namespace NSDoctRenderer
|
||||
}
|
||||
else if (sReturnParams.length() != 0)
|
||||
{
|
||||
// TODO: после обработки sReturnParams в командах рендерера - убрать sReturnParams вообще
|
||||
// пока ставим заглушку, чтобы x2t не считал ошибкой
|
||||
string_replace(sReturnParams, L"error", L"Error");
|
||||
strError = L"<result>" + sReturnParams + L"</result>";
|
||||
}
|
||||
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
-(JSValue*) CheckNextChange;
|
||||
-(JSValue*) GetCountChanges;
|
||||
-(JSValue*) GetChangesFile : (JSValue*)index;
|
||||
-(JSValue*) Save_AllocNative : (JSValue*)len;
|
||||
-(JSValue*) Save_ReAllocNative : (JSValue*)pos : (JSValue*)len;
|
||||
//-(JSValue*) Save_AllocNative : (JSValue*)len;
|
||||
//-(JSValue*) Save_ReAllocNative : (JSValue*)pos : (JSValue*)len;
|
||||
-(JSValue*) Save_End : (JSValue*)pos : (JSValue*)len;
|
||||
-(JSValue*) AddImageInChanges : (JSValue*)img;
|
||||
-(JSValue*) ConsoleLog : (JSValue*)message;
|
||||
@ -54,8 +54,8 @@ FUNCTION_WRAPPER_JS(GetEditorType, GetEditorType)
|
||||
FUNCTION_WRAPPER_JS(CheckNextChange, CheckNextChange)
|
||||
FUNCTION_WRAPPER_JS(GetCountChanges, GetCountChanges)
|
||||
FUNCTION_WRAPPER_JS_1(GetChangesFile, GetChangesFile)
|
||||
FUNCTION_WRAPPER_JS_1(Save_AllocNative, Save_AllocNative)
|
||||
FUNCTION_WRAPPER_JS_2(Save_ReAllocNative, Save_ReAllocNative)
|
||||
//FUNCTION_WRAPPER_JS_1(Save_AllocNative, Save_AllocNative)
|
||||
//FUNCTION_WRAPPER_JS_2(Save_ReAllocNative, Save_ReAllocNative)
|
||||
FUNCTION_WRAPPER_JS_2(Save_End, Save_End)
|
||||
FUNCTION_WRAPPER_JS_1(AddImageInChanges, AddImageInChanges)
|
||||
FUNCTION_WRAPPER_JS_1(ConsoleLog, ConsoleLog)
|
||||
|
||||
@ -3,147 +3,159 @@
|
||||
|
||||
namespace NSNativeControl
|
||||
{
|
||||
#define CURRENTWRAPPER CNativeControlEmbed
|
||||
#define CURRENTWRAPPER CNativeControlEmbed
|
||||
|
||||
FUNCTION_WRAPPER_V8(_GetFilePath, GetFilePath)
|
||||
FUNCTION_WRAPPER_V8_1(_SetFilePath, SetFilePath)
|
||||
FUNCTION_WRAPPER_V8(_GetFileId, GetFileId)
|
||||
FUNCTION_WRAPPER_V8_1(_SetFileId, SetFileId)
|
||||
FUNCTION_WRAPPER_V8_1(_GetFileArrayBuffer, GetFileBinary)
|
||||
FUNCTION_WRAPPER_V8_1(_GetFontArrayBuffer, GetFontBinary)
|
||||
FUNCTION_WRAPPER_V8(_GetFontsDirectory, GetFontsDirectory)
|
||||
FUNCTION_WRAPPER_V8_1(_GetFileString, GetFileString)
|
||||
FUNCTION_WRAPPER_V8(_GetEditorType, GetEditorType)
|
||||
FUNCTION_WRAPPER_V8(_CheckNextChange, CheckNextChange)
|
||||
FUNCTION_WRAPPER_V8(_GetChangesCount, GetCountChanges)
|
||||
FUNCTION_WRAPPER_V8_1(_GetChangesFile, GetChangesFile)
|
||||
FUNCTION_WRAPPER_V8_1(_Save_AllocNative, Save_AllocNative)
|
||||
FUNCTION_WRAPPER_V8_2(_Save_ReAllocNative, Save_ReAllocNative)
|
||||
FUNCTION_WRAPPER_V8_2(_Save_End, Save_End)
|
||||
FUNCTION_WRAPPER_V8_1(_AddImageInChanges, AddImageInChanges)
|
||||
FUNCTION_WRAPPER_V8_1(_ConsoleLog, ConsoleLog)
|
||||
FUNCTION_WRAPPER_V8_3(_SaveChanges, SaveChanges)
|
||||
FUNCTION_WRAPPER_V8_1(_zipOpenFile, zipOpenFile)
|
||||
FUNCTION_WRAPPER_V8_1(_zipOpenFileBase64, zipOpenFileBase64)
|
||||
FUNCTION_WRAPPER_V8_1(_zipGetFileAsString, zipGetFileAsString)
|
||||
FUNCTION_WRAPPER_V8_1(_zipGetFileAsBinary, zipGetFileAsBinary)
|
||||
FUNCTION_WRAPPER_V8(_zipCloseFile, zipCloseFile)
|
||||
FUNCTION_WRAPPER_V8_1(_GetImageUrl, GetImageUrl)
|
||||
FUNCTION_WRAPPER_V8_1(_GetImageOriginalSize, GetImageOriginalSize)
|
||||
FUNCTION_WRAPPER_V8(_GetImagesPath, GetImagesPath)
|
||||
FUNCTION_WRAPPER_V8(_GetFilePath, GetFilePath)
|
||||
FUNCTION_WRAPPER_V8_1(_SetFilePath, SetFilePath)
|
||||
FUNCTION_WRAPPER_V8(_GetFileId, GetFileId)
|
||||
FUNCTION_WRAPPER_V8_1(_SetFileId, SetFileId)
|
||||
FUNCTION_WRAPPER_V8_1(_GetFileArrayBuffer, GetFileBinary)
|
||||
FUNCTION_WRAPPER_V8_1(_GetFontArrayBuffer, GetFontBinary)
|
||||
FUNCTION_WRAPPER_V8(_GetFontsDirectory, GetFontsDirectory)
|
||||
FUNCTION_WRAPPER_V8_1(_GetFileString, GetFileString)
|
||||
FUNCTION_WRAPPER_V8(_GetEditorType, GetEditorType)
|
||||
FUNCTION_WRAPPER_V8(_CheckNextChange, CheckNextChange)
|
||||
FUNCTION_WRAPPER_V8(_GetChangesCount, GetCountChanges)
|
||||
FUNCTION_WRAPPER_V8_1(_GetChangesFile, GetChangesFile)
|
||||
FUNCTION_WRAPPER_V8_1(_Save_AllocNative, Save_AllocNative)
|
||||
FUNCTION_WRAPPER_V8_2(_Save_ReAllocNative, Save_ReAllocNative)
|
||||
FUNCTION_WRAPPER_V8_2(_Save_End, Save_End)
|
||||
FUNCTION_WRAPPER_V8_1(_AddImageInChanges, AddImageInChanges)
|
||||
FUNCTION_WRAPPER_V8_1(_ConsoleLog, ConsoleLog)
|
||||
FUNCTION_WRAPPER_V8_3(_SaveChanges, SaveChanges)
|
||||
FUNCTION_WRAPPER_V8_1(_zipOpenFile, zipOpenFile)
|
||||
FUNCTION_WRAPPER_V8_1(_zipOpenFileBase64, zipOpenFileBase64)
|
||||
FUNCTION_WRAPPER_V8_1(_zipGetFileAsString, zipGetFileAsString)
|
||||
FUNCTION_WRAPPER_V8_1(_zipGetFileAsBinary, zipGetFileAsBinary)
|
||||
FUNCTION_WRAPPER_V8(_zipCloseFile, zipCloseFile)
|
||||
FUNCTION_WRAPPER_V8_1(_GetImageUrl, GetImageUrl)
|
||||
FUNCTION_WRAPPER_V8_1(_GetImageOriginalSize, GetImageOriginalSize)
|
||||
FUNCTION_WRAPPER_V8(_GetImagesPath, GetImagesPath)
|
||||
|
||||
v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplate(v8::Isolate* isolate)
|
||||
{
|
||||
v8::EscapableHandleScope handle_scope(isolate);
|
||||
v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplate(v8::Isolate* isolate)
|
||||
{
|
||||
v8::EscapableHandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(V8IsolateOneArg);
|
||||
result->SetInternalFieldCount(1);
|
||||
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(V8IsolateOneArg);
|
||||
result->SetInternalFieldCount(1);
|
||||
|
||||
NSV8Objects::Template_Set(result, "SetFilePath", _SetFilePath);
|
||||
NSV8Objects::Template_Set(result, "GetFilePath", _GetFilePath);
|
||||
NSV8Objects::Template_Set(result, "SetFileId", _SetFileId);
|
||||
NSV8Objects::Template_Set(result, "GetFileId", _GetFileId);
|
||||
NSV8Objects::Template_Set(result, "GetFileBinary", _GetFileArrayBuffer);
|
||||
NSV8Objects::Template_Set(result, "GetFontBinary", _GetFontArrayBuffer);
|
||||
NSV8Objects::Template_Set(result, "GetFontsDirectory", _GetFontsDirectory);
|
||||
NSV8Objects::Template_Set(result, "GetFileString", _GetFileString);
|
||||
NSV8Objects::Template_Set(result, "GetEditorType", _GetEditorType);
|
||||
NSV8Objects::Template_Set(result, "CheckNextChange", _CheckNextChange);
|
||||
NSV8Objects::Template_Set(result, "GetCountChanges", _GetChangesCount);
|
||||
NSV8Objects::Template_Set(result, "GetChangesFile", _GetChangesFile);
|
||||
NSV8Objects::Template_Set(result, "Save_AllocNative", _Save_AllocNative);
|
||||
NSV8Objects::Template_Set(result, "Save_ReAllocNative", _Save_ReAllocNative);
|
||||
NSV8Objects::Template_Set(result, "Save_End", _Save_End);
|
||||
NSV8Objects::Template_Set(result, "AddImageInChanges", _AddImageInChanges);
|
||||
NSV8Objects::Template_Set(result, "ConsoleLog", _ConsoleLog);
|
||||
NSV8Objects::Template_Set(result, "SaveChanges", _SaveChanges);
|
||||
NSV8Objects::Template_Set(result, "ZipOpen", _zipOpenFile);
|
||||
NSV8Objects::Template_Set(result, "ZipOpenBase64", _zipOpenFileBase64);
|
||||
NSV8Objects::Template_Set(result, "ZipFileAsString", _zipGetFileAsString);
|
||||
NSV8Objects::Template_Set(result, "ZipFileAsBinary", _zipGetFileAsBinary);
|
||||
NSV8Objects::Template_Set(result, "ZipClose", _zipCloseFile);
|
||||
NSV8Objects::Template_Set(result, "getImageUrl", _GetImageUrl);
|
||||
NSV8Objects::Template_Set(result, "getImagesDirectory", _GetImagesPath);
|
||||
NSV8Objects::Template_Set(result, "GetImageOriginalSize", _GetImageOriginalSize);
|
||||
NSV8Objects::Template_Set(result, "SetFilePath", _SetFilePath);
|
||||
NSV8Objects::Template_Set(result, "GetFilePath", _GetFilePath);
|
||||
NSV8Objects::Template_Set(result, "SetFileId", _SetFileId);
|
||||
NSV8Objects::Template_Set(result, "GetFileId", _GetFileId);
|
||||
NSV8Objects::Template_Set(result, "GetFileBinary", _GetFileArrayBuffer);
|
||||
NSV8Objects::Template_Set(result, "GetFontBinary", _GetFontArrayBuffer);
|
||||
NSV8Objects::Template_Set(result, "GetFontsDirectory", _GetFontsDirectory);
|
||||
NSV8Objects::Template_Set(result, "GetFileString", _GetFileString);
|
||||
NSV8Objects::Template_Set(result, "GetEditorType", _GetEditorType);
|
||||
NSV8Objects::Template_Set(result, "CheckNextChange", _CheckNextChange);
|
||||
NSV8Objects::Template_Set(result, "GetCountChanges", _GetChangesCount);
|
||||
NSV8Objects::Template_Set(result, "GetChangesFile", _GetChangesFile);
|
||||
//NSV8Objects::Template_Set(result, "Save_AllocNative", _Save_AllocNative);
|
||||
//NSV8Objects::Template_Set(result, "Save_ReAllocNative", _Save_ReAllocNative);
|
||||
NSV8Objects::Template_Set(result, "Save_End", _Save_End);
|
||||
NSV8Objects::Template_Set(result, "AddImageInChanges", _AddImageInChanges);
|
||||
NSV8Objects::Template_Set(result, "ConsoleLog", _ConsoleLog);
|
||||
NSV8Objects::Template_Set(result, "SaveChanges", _SaveChanges);
|
||||
NSV8Objects::Template_Set(result, "ZipOpen", _zipOpenFile);
|
||||
NSV8Objects::Template_Set(result, "ZipOpenBase64", _zipOpenFileBase64);
|
||||
NSV8Objects::Template_Set(result, "ZipFileAsString", _zipGetFileAsString);
|
||||
NSV8Objects::Template_Set(result, "ZipFileAsBinary", _zipGetFileAsBinary);
|
||||
NSV8Objects::Template_Set(result, "ZipClose", _zipCloseFile);
|
||||
NSV8Objects::Template_Set(result, "getImageUrl", _GetImageUrl);
|
||||
NSV8Objects::Template_Set(result, "getImagesDirectory", _GetImagesPath);
|
||||
NSV8Objects::Template_Set(result, "GetImageOriginalSize", _GetImageOriginalSize);
|
||||
|
||||
return handle_scope.Escape(result);
|
||||
}
|
||||
return handle_scope.Escape(result);
|
||||
}
|
||||
|
||||
// Без SaveChanges
|
||||
v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplateBuilder(v8::Isolate* isolate)
|
||||
{
|
||||
v8::EscapableHandleScope handle_scope(isolate);
|
||||
// Без SaveChanges
|
||||
v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplateBuilder(v8::Isolate* isolate)
|
||||
{
|
||||
v8::EscapableHandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(V8IsolateOneArg);
|
||||
result->SetInternalFieldCount(1);
|
||||
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(V8IsolateOneArg);
|
||||
result->SetInternalFieldCount(1);
|
||||
|
||||
NSV8Objects::Template_Set(result, "SetFilePath", _SetFilePath);
|
||||
NSV8Objects::Template_Set(result, "GetFilePath", _GetFilePath);
|
||||
NSV8Objects::Template_Set(result, "SetFileId", _SetFileId);
|
||||
NSV8Objects::Template_Set(result, "GetFileId", _GetFileId);
|
||||
NSV8Objects::Template_Set(result, "GetFileBinary", _GetFileArrayBuffer);
|
||||
NSV8Objects::Template_Set(result, "GetFontBinary", _GetFontArrayBuffer);
|
||||
NSV8Objects::Template_Set(result, "GetFontsDirectory", _GetFontsDirectory);
|
||||
NSV8Objects::Template_Set(result, "GetFileString", _GetFileString);
|
||||
NSV8Objects::Template_Set(result, "GetEditorType", _GetEditorType);
|
||||
NSV8Objects::Template_Set(result, "CheckNextChange", _CheckNextChange);
|
||||
NSV8Objects::Template_Set(result, "GetCountChanges", _GetChangesCount);
|
||||
NSV8Objects::Template_Set(result, "GetChangesFile", _GetChangesFile);
|
||||
NSV8Objects::Template_Set(result, "Save_AllocNative", _Save_AllocNative);
|
||||
NSV8Objects::Template_Set(result, "Save_ReAllocNative", _Save_ReAllocNative);
|
||||
NSV8Objects::Template_Set(result, "Save_End", _Save_End);
|
||||
NSV8Objects::Template_Set(result, "AddImageInChanges", _AddImageInChanges);
|
||||
NSV8Objects::Template_Set(result, "ConsoleLog", _ConsoleLog);
|
||||
NSV8Objects::Template_Set(result, "ZipOpen", _zipOpenFile);
|
||||
NSV8Objects::Template_Set(result, "ZipOpenBase64", _zipOpenFileBase64);
|
||||
NSV8Objects::Template_Set(result, "ZipFileAsString", _zipGetFileAsString);
|
||||
NSV8Objects::Template_Set(result, "ZipFileAsBinary", _zipGetFileAsBinary);
|
||||
NSV8Objects::Template_Set(result, "ZipClose", _zipCloseFile);
|
||||
NSV8Objects::Template_Set(result, "getImageUrl", _GetImageUrl);
|
||||
NSV8Objects::Template_Set(result, "getImagesDirectory", _GetImagesPath);
|
||||
NSV8Objects::Template_Set(result, "GetImageOriginalSize", _GetImageOriginalSize);
|
||||
NSV8Objects::Template_Set(result, "SetFilePath", _SetFilePath);
|
||||
NSV8Objects::Template_Set(result, "GetFilePath", _GetFilePath);
|
||||
NSV8Objects::Template_Set(result, "SetFileId", _SetFileId);
|
||||
NSV8Objects::Template_Set(result, "GetFileId", _GetFileId);
|
||||
NSV8Objects::Template_Set(result, "GetFileBinary", _GetFileArrayBuffer);
|
||||
NSV8Objects::Template_Set(result, "GetFontBinary", _GetFontArrayBuffer);
|
||||
NSV8Objects::Template_Set(result, "GetFontsDirectory", _GetFontsDirectory);
|
||||
NSV8Objects::Template_Set(result, "GetFileString", _GetFileString);
|
||||
NSV8Objects::Template_Set(result, "GetEditorType", _GetEditorType);
|
||||
NSV8Objects::Template_Set(result, "CheckNextChange", _CheckNextChange);
|
||||
NSV8Objects::Template_Set(result, "GetCountChanges", _GetChangesCount);
|
||||
NSV8Objects::Template_Set(result, "GetChangesFile", _GetChangesFile);
|
||||
//NSV8Objects::Template_Set(result, "Save_AllocNative", _Save_AllocNative);
|
||||
//NSV8Objects::Template_Set(result, "Save_ReAllocNative", _Save_ReAllocNative);
|
||||
NSV8Objects::Template_Set(result, "Save_End", _Save_End);
|
||||
NSV8Objects::Template_Set(result, "AddImageInChanges", _AddImageInChanges);
|
||||
NSV8Objects::Template_Set(result, "ConsoleLog", _ConsoleLog);
|
||||
NSV8Objects::Template_Set(result, "ZipOpen", _zipOpenFile);
|
||||
NSV8Objects::Template_Set(result, "ZipOpenBase64", _zipOpenFileBase64);
|
||||
NSV8Objects::Template_Set(result, "ZipFileAsString", _zipGetFileAsString);
|
||||
NSV8Objects::Template_Set(result, "ZipFileAsBinary", _zipGetFileAsBinary);
|
||||
NSV8Objects::Template_Set(result, "ZipClose", _zipCloseFile);
|
||||
NSV8Objects::Template_Set(result, "getImageUrl", _GetImageUrl);
|
||||
NSV8Objects::Template_Set(result, "getImagesDirectory", _GetImagesPath);
|
||||
NSV8Objects::Template_Set(result, "GetImageOriginalSize", _GetImageOriginalSize);
|
||||
|
||||
return handle_scope.Escape(result);
|
||||
}
|
||||
return handle_scope.Escape(result);
|
||||
}
|
||||
|
||||
void CreateNativeObject(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
v8::Isolate* isolate = args.GetIsolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
void CreateNativeObject(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
v8::Isolate* isolate = args.GetIsolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
|
||||
v8::Handle<v8::ObjectTemplate> NativeObjectTemplate = CreateNativeControlTemplate(isolate);
|
||||
CNativeControlEmbed* pNativeObject = new CNativeControlEmbed();
|
||||
if (CIsolateAdditionalData::CheckSingletonType(isolate, CIsolateAdditionalData::iadtSingletonNative))
|
||||
{
|
||||
args.GetReturnValue().Set(v8::Undefined(isolate));
|
||||
return;
|
||||
}
|
||||
|
||||
v8::Local<v8::Object> obj = NativeObjectTemplate->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();
|
||||
obj->SetInternalField(0, v8::External::New(CV8Worker::GetCurrent(), pNativeObject));
|
||||
v8::Handle<v8::ObjectTemplate> NativeObjectTemplate = CreateNativeControlTemplate(isolate);
|
||||
CNativeControlEmbed* pNativeObject = new CNativeControlEmbed();
|
||||
|
||||
args.GetReturnValue().Set(obj);
|
||||
}
|
||||
v8::Local<v8::Object> obj = NativeObjectTemplate->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();
|
||||
obj->SetInternalField(0, v8::External::New(CV8Worker::GetCurrent(), pNativeObject));
|
||||
|
||||
// Без SaveChanges
|
||||
void CreateNativeObjectBuilder(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
v8::Isolate* isolate = args.GetIsolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
args.GetReturnValue().Set(obj);
|
||||
}
|
||||
|
||||
v8::Handle<v8::ObjectTemplate> NativeObjectTemplate = CreateNativeControlTemplateBuilder(isolate);
|
||||
CNativeControlEmbed* pNativeObject = new CNativeControlEmbed();
|
||||
// Без SaveChanges
|
||||
void CreateNativeObjectBuilder(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
v8::Isolate* isolate = args.GetIsolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
|
||||
v8::Local<v8::Object> obj = NativeObjectTemplate->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();
|
||||
obj->SetInternalField(0, v8::External::New(CV8Worker::GetCurrent(), pNativeObject));
|
||||
if (CIsolateAdditionalData::CheckSingletonType(isolate, CIsolateAdditionalData::iadtSingletonNative))
|
||||
{
|
||||
args.GetReturnValue().Set(v8::Undefined(isolate));
|
||||
return;
|
||||
}
|
||||
|
||||
args.GetReturnValue().Set(obj);
|
||||
}
|
||||
v8::Handle<v8::ObjectTemplate> NativeObjectTemplate = CreateNativeControlTemplateBuilder(isolate);
|
||||
CNativeControlEmbed* pNativeObject = new CNativeControlEmbed();
|
||||
|
||||
v8::Local<v8::Object> obj = NativeObjectTemplate->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();
|
||||
obj->SetInternalField(0, v8::External::New(CV8Worker::GetCurrent(), pNativeObject));
|
||||
|
||||
args.GetReturnValue().Set(obj);
|
||||
}
|
||||
}
|
||||
|
||||
void CNativeControlEmbed::CreateObjectInContext(const std::string& name, JSSmart<CJSContext> context)
|
||||
{
|
||||
v8::Isolate* current = CV8Worker::GetCurrent();
|
||||
context->m_internal->m_global->Set(current, name.c_str(), v8::FunctionTemplate::New(current, NSNativeControl::CreateNativeObject));
|
||||
v8::Isolate* current = CV8Worker::GetCurrent();
|
||||
context->m_internal->m_global->Set(current, name.c_str(), v8::FunctionTemplate::New(current, NSNativeControl::CreateNativeObject));
|
||||
}
|
||||
|
||||
void CNativeControlEmbed::CreateObjectBuilderInContext(const std::string& name, JSSmart<CJSContext> context)
|
||||
{
|
||||
v8::Isolate* current = CV8Worker::GetCurrent();
|
||||
context->m_internal->m_global->Set(current, name.c_str(), v8::FunctionTemplate::New(current, NSNativeControl::CreateNativeObjectBuilder));
|
||||
v8::Isolate* current = CV8Worker::GetCurrent();
|
||||
context->m_internal->m_global->Set(current, name.c_str(), v8::FunctionTemplate::New(current, NSNativeControl::CreateNativeObjectBuilder));
|
||||
}
|
||||
|
||||
@ -219,6 +219,17 @@ namespace NSJSBase
|
||||
#ifdef V8_INSPECTOR
|
||||
v8_debug::disposeInspector(m_internal->m_context);
|
||||
#endif
|
||||
unsigned int nEmbedDataCount = m_internal->m_isolate->GetNumberOfDataSlots();
|
||||
if (nEmbedDataCount > 0)
|
||||
{
|
||||
void* pSingletonData = m_internal->m_isolate->GetData(0);
|
||||
if (NULL != pSingletonData)
|
||||
{
|
||||
CIsolateAdditionalData* pData = (CIsolateAdditionalData*)pSingletonData;
|
||||
delete pData;
|
||||
}
|
||||
}
|
||||
|
||||
m_internal->m_isolate->Dispose();
|
||||
m_internal->m_isolate = NULL;
|
||||
}
|
||||
|
||||
@ -72,6 +72,44 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
class CIsolateAdditionalData
|
||||
{
|
||||
public:
|
||||
enum IsolateAdditionlDataType {
|
||||
iadtSingletonNative = 0,
|
||||
iadtUndefined = 255
|
||||
};
|
||||
|
||||
IsolateAdditionlDataType m_eType;
|
||||
public:
|
||||
CIsolateAdditionalData(const IsolateAdditionlDataType& type = iadtUndefined) { m_eType = type; }
|
||||
virtual ~CIsolateAdditionalData() {}
|
||||
|
||||
static bool CheckSingletonType(v8::Isolate* isolate, const IsolateAdditionlDataType& type, const bool& isAdd = true)
|
||||
{
|
||||
unsigned int nCount = isolate->GetNumberOfDataSlots();
|
||||
if (nCount == 0)
|
||||
return false;
|
||||
|
||||
void* pSingletonData = isolate->GetData(0);
|
||||
if (NULL != pSingletonData)
|
||||
{
|
||||
CIsolateAdditionalData* pData = (CIsolateAdditionalData*)pSingletonData;
|
||||
if (pData->m_eType == type)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isAdd)
|
||||
{
|
||||
isolate->SetData(0, (void*)(new CIsolateAdditionalData(type)));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class CV8Initializer
|
||||
{
|
||||
private:
|
||||
|
||||
@ -193,6 +193,8 @@ namespace Aggplus
|
||||
|
||||
void CClipMulti::Create(LONG width, LONG height)
|
||||
{
|
||||
m_lWidth = width;
|
||||
m_lHeight = height;
|
||||
m_rasterizer.clip_box(0, 0, width, height);
|
||||
m_bIsClip = false;
|
||||
m_bIsClip2 = false;
|
||||
@ -227,6 +229,7 @@ namespace Aggplus
|
||||
{
|
||||
// смешивать надо с растерайзером
|
||||
agg::rasterizer_scanline_aa<> rasterizer;
|
||||
rasterizer.clip_box(0, 0, m_lWidth, m_lHeight);
|
||||
|
||||
typedef agg::conv_transform<agg::path_storage> trans_type;
|
||||
trans_type trans(pPath->m_internal->m_agg_ps, pMatrix->m_internal->m_agg_mtx);
|
||||
@ -249,6 +252,7 @@ namespace Aggplus
|
||||
{
|
||||
// надо смешивать со стораджем
|
||||
agg::rasterizer_scanline_aa<> rasterizer;
|
||||
rasterizer.clip_box(0, 0, m_lWidth, m_lHeight);
|
||||
|
||||
typedef agg::conv_transform<agg::path_storage> trans_type;
|
||||
trans_type trans(pPath->m_internal->m_agg_ps, pMatrix->m_internal->m_agg_mtx);
|
||||
|
||||
@ -151,6 +151,9 @@ public:
|
||||
bool m_bIsClip;
|
||||
bool m_bIsClip2;
|
||||
|
||||
LONG m_lWidth;
|
||||
LONG m_lHeight;
|
||||
|
||||
public:
|
||||
CClipMulti();
|
||||
~CClipMulti();
|
||||
|
||||
@ -69,6 +69,8 @@ namespace Aggplus
|
||||
|
||||
m_nTextRenderMode = FT_RENDER_MODE_NORMAL;
|
||||
m_nBlendMode = agg::comp_op_src_over;
|
||||
|
||||
m_bIs0PenWidthAs1px = false;
|
||||
}
|
||||
|
||||
CGraphics::CGraphics(int dwWidth, int dwHeight, int stride, BYTE* pBuffer) : m_dwConfigFlags(0)
|
||||
@ -103,6 +105,8 @@ namespace Aggplus
|
||||
|
||||
m_nTextRenderMode = FT_RENDER_MODE_NORMAL;
|
||||
m_nBlendMode = agg::comp_op_src_over;
|
||||
|
||||
m_bIs0PenWidthAs1px = false;
|
||||
}
|
||||
|
||||
CGraphics::CGraphics(CImage* pImage) : m_dwConfigFlags(0)
|
||||
@ -142,6 +146,8 @@ namespace Aggplus
|
||||
|
||||
m_nTextRenderMode = FT_RENDER_MODE_NORMAL;
|
||||
m_nBlendMode = agg::comp_op_src_over;
|
||||
|
||||
m_bIs0PenWidthAs1px = false;
|
||||
}
|
||||
|
||||
CGraphics::~CGraphics()
|
||||
@ -609,7 +615,8 @@ namespace Aggplus
|
||||
|
||||
if ((0 == dWidth && !m_bIntegerGrid) || dWidth < dWidthMinSize)
|
||||
{
|
||||
//dWidth = dWidthMinSize;
|
||||
if (m_bIs0PenWidthAs1px)
|
||||
dWidth = dWidthMinSize;
|
||||
}
|
||||
|
||||
double dblMiterLimit = pPen->MiterLimit;
|
||||
|
||||
@ -309,6 +309,8 @@ public:
|
||||
int m_nTextRenderMode;
|
||||
unsigned int m_nBlendMode;
|
||||
|
||||
bool m_bIs0PenWidthAs1px;
|
||||
|
||||
public:
|
||||
|
||||
CGraphics();
|
||||
|
||||
@ -1158,6 +1158,9 @@ HRESULT CGraphicsRenderer::CommandLong(const LONG& lType, const LONG& lCommand)
|
||||
m_pRenderer->m_bIsDarkMode = (1 == lCommand);
|
||||
if (c_nUseDictionaryFonts == lType && m_pFontManager)
|
||||
m_pFontManager->SetUseCorrentFontByName((1 == lCommand) ? true : false);
|
||||
if (c_nPenWidth0As1px == lType && m_pRenderer)
|
||||
m_pRenderer->m_bIs0PenWidthAs1px = (1 == lCommand) ? true : false;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CGraphicsRenderer::CommandDouble(const LONG& lType, const double& dCommand)
|
||||
|
||||
@ -107,6 +107,7 @@ const long c_nParamFlipY = 0x0002;
|
||||
const long c_nFlipNextRotate = 0x0004;
|
||||
const long c_nDarkMode = 0x0008;
|
||||
const long c_nUseDictionaryFonts = 0x0010;
|
||||
const long c_nPenWidth0As1px = 0x0020;
|
||||
|
||||
// типы рендерера
|
||||
const long c_nUnknownRenderer = 0x0000;
|
||||
|
||||
@ -1223,10 +1223,17 @@ namespace NSOnlineOfficeBinToPdf
|
||||
}
|
||||
case ctDocInfo:
|
||||
{
|
||||
std::wstring wsTitle = ReadString(current, curindex);
|
||||
std::wstring wsCreator = ReadString(current, curindex);
|
||||
std::wstring wsSubject = ReadString(current, curindex);
|
||||
std::wstring wsKeywords = ReadString(current, curindex);
|
||||
int nFlags = ReadInt(current, curindex);
|
||||
|
||||
std::wstring wsTitle, wsCreator, wsSubject, wsKeywords;
|
||||
if (nFlags & 1)
|
||||
wsTitle = ReadString(current, curindex);
|
||||
if (nFlags & 2)
|
||||
wsCreator = ReadString(current, curindex);
|
||||
if (nFlags & 4)
|
||||
wsSubject = ReadString(current, curindex);
|
||||
if (nFlags & 8)
|
||||
wsKeywords = ReadString(current, curindex);
|
||||
|
||||
pRenderer->DocInfo(wsTitle, wsCreator, wsSubject, wsKeywords);
|
||||
break;
|
||||
@ -1548,6 +1555,21 @@ namespace NSOnlineOfficeBinToPdf
|
||||
curindex = nStartIndex + nLen;
|
||||
break;
|
||||
}
|
||||
case ctDocInfo:
|
||||
{
|
||||
int nFlags = ReadInt(current, curindex);
|
||||
|
||||
std::wstring wsTitle, wsCreator, wsSubject, wsKeywords;
|
||||
if (nFlags & 1)
|
||||
SkipString(current, curindex);
|
||||
if (nFlags & 2)
|
||||
SkipString(current, curindex);
|
||||
if (nFlags & 4)
|
||||
SkipString(current, curindex);
|
||||
if (nFlags & 8)
|
||||
SkipString(current, curindex);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
||||
@ -177,7 +177,7 @@ int READ_INT(BYTE* x)
|
||||
#include "../../../../../fontengine/ApplicationFontsWorker.h"
|
||||
#include "../../../../../common/Directory.h"
|
||||
|
||||
int main()
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
// CHECK SYSTEM FONTS
|
||||
CApplicationFontsWorker oWorker;
|
||||
@ -242,7 +242,7 @@ int main()
|
||||
nLength -= 4;
|
||||
|
||||
int nPagesCount = 0;
|
||||
int nTestPage = 0;
|
||||
int nTestPage = argc > 1 ? atoi(argv[1]) : 0;
|
||||
int nWidth = 100;
|
||||
int nHeight = 100;
|
||||
|
||||
@ -292,7 +292,7 @@ int main()
|
||||
RELEASEARRAYOBJECTS(res);
|
||||
}
|
||||
|
||||
if (nPagesCount > 0)
|
||||
if (false && nPagesCount > 0)
|
||||
{
|
||||
BYTE* pLinks = GetLinks(pGrFile, nTestPage);
|
||||
nLength = READ_INT(pLinks);
|
||||
@ -327,7 +327,7 @@ int main()
|
||||
free(pLinks);
|
||||
}
|
||||
|
||||
if (true)
|
||||
if (false)
|
||||
{
|
||||
BYTE* pStructure = GetStructure(pGrFile);
|
||||
nLength = READ_INT(pStructure);
|
||||
|
||||
@ -40,13 +40,16 @@
|
||||
#include "JBig2/source/JBig2File.h"
|
||||
#endif
|
||||
|
||||
void CxImageToMediaFrame( CxImage& img, CBgraFrame* bgra )
|
||||
#include <cmath>
|
||||
#define BGRA_FRAME_CXIMAGE_MAX_MEMORY 67108864 // 256Mb (*4 channel)
|
||||
|
||||
void CxImageToMediaFrame( CxImage* img, CBgraFrame* bgra )
|
||||
{
|
||||
if( !img.IsValid() )
|
||||
if( !img || !img->IsValid() )
|
||||
return;
|
||||
|
||||
int nWidth = img.GetWidth();
|
||||
int nHeight = img.GetHeight();
|
||||
int nWidth = img->GetWidth();
|
||||
int nHeight = img->GetHeight();
|
||||
|
||||
BYTE* pData = new BYTE[4 * nWidth * nHeight];
|
||||
|
||||
@ -60,11 +63,11 @@ void CxImageToMediaFrame( CxImage& img, CBgraFrame* bgra )
|
||||
|
||||
BYTE* pPixels = bgra->get_Data();
|
||||
|
||||
int nBitsPerPixel = img.GetBpp();
|
||||
int nStride = img.GetEffWidth();
|
||||
BYTE* pBuffer = img.GetBits();
|
||||
RGBQUAD* pPalette = img.GetPalette();
|
||||
bool bIsAlphaPalettePresent = img.AlphaPaletteIsEnabled();
|
||||
int nBitsPerPixel = img->GetBpp();
|
||||
int nStride = img->GetEffWidth();
|
||||
BYTE* pBuffer = img->GetBits();
|
||||
RGBQUAD* pPalette = img->GetPalette();
|
||||
bool bIsAlphaPalettePresent = img->AlphaPaletteIsEnabled();
|
||||
bool bIsAlphaApplied = false;
|
||||
bool bIsRGBA = !bgra->get_IsRGBA();
|
||||
|
||||
@ -149,7 +152,7 @@ void CxImageToMediaFrame( CxImage& img, CBgraFrame* bgra )
|
||||
BYTE* src = pBuffer;
|
||||
BYTE* dst = pPixels;
|
||||
|
||||
int nTransIndex = img.GetTransIndex();
|
||||
int nTransIndex = img->GetTransIndex();
|
||||
if (bIsAlphaApplied)
|
||||
nTransIndex = -1;
|
||||
|
||||
@ -185,7 +188,7 @@ void CxImageToMediaFrame( CxImage& img, CBgraFrame* bgra )
|
||||
|
||||
nStride -= nWidth;
|
||||
|
||||
int nTransIndex = img.GetTransIndex();
|
||||
int nTransIndex = img->GetTransIndex();
|
||||
if (bIsAlphaApplied)
|
||||
nTransIndex = -1;
|
||||
|
||||
@ -269,10 +272,10 @@ void CxImageToMediaFrame( CxImage& img, CBgraFrame* bgra )
|
||||
return;
|
||||
}
|
||||
|
||||
if( img.AlphaIsValid() )
|
||||
if( img->AlphaIsValid() )
|
||||
{
|
||||
BYTE* pAlpha = img.AlphaGetPointer();
|
||||
DWORD nMaxAlpha = img.AlphaGetMax();
|
||||
BYTE* pAlpha = img->AlphaGetPointer();
|
||||
DWORD nMaxAlpha = img->AlphaGetMax();
|
||||
|
||||
if( 255 == nMaxAlpha )
|
||||
{
|
||||
@ -440,13 +443,50 @@ bool CBgraFrame::OpenFile(const std::wstring& strFileName, unsigned int nFileTyp
|
||||
if (!oFile.OpenFile(strFileName))
|
||||
return false;
|
||||
|
||||
CxImage img;
|
||||
CxImage* img = new CxImage();
|
||||
|
||||
if (!img.Decode(oFile.GetFileNative(), m_nFileType))
|
||||
if (!img->Decode(oFile.GetFileNative(), m_nFileType))
|
||||
return false;
|
||||
|
||||
CxImageToMediaFrame(img, this);
|
||||
m_bIsGrayScale = img.IsGrayScale();
|
||||
CxImage* imgResample = NULL;
|
||||
|
||||
if (false)
|
||||
{
|
||||
// slow!!!
|
||||
int nWidth = img->GetWidth();
|
||||
int nHeight = img->GetHeight();
|
||||
|
||||
double dSizeWH = (double)nWidth * nHeight;
|
||||
double dSizeLimit = (double)BGRA_FRAME_CXIMAGE_MAX_MEMORY;
|
||||
if (dSizeWH > dSizeLimit)
|
||||
{
|
||||
double dKoef = sqrt(dSizeLimit / dSizeWH);
|
||||
int nW = (int)(dKoef * nWidth);
|
||||
int nH = (int)(dKoef * nHeight);
|
||||
|
||||
if (nW > 10 && nH > 10)
|
||||
{
|
||||
imgResample = new CxImage();
|
||||
if (!img->Resample(nW, nH, 2/*bicubic spline interpolation*/, imgResample))
|
||||
{
|
||||
delete imgResample;
|
||||
imgResample = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CxImage* imageFinal = img;
|
||||
if (imgResample)
|
||||
{
|
||||
delete img;
|
||||
imageFinal = imgResample;
|
||||
}
|
||||
|
||||
CxImageToMediaFrame(imageFinal, this);
|
||||
m_bIsGrayScale = imageFinal->IsGrayScale();
|
||||
delete imageFinal;
|
||||
|
||||
return true;
|
||||
}
|
||||
bool CBgraFrame::Decode(BYTE* pBuffer, int nSize, unsigned int nFileType)
|
||||
@ -472,7 +512,7 @@ bool CBgraFrame::Decode(BYTE* pBuffer, int nSize, unsigned int nFileType)
|
||||
if (!img.Decode(pBuffer, nSize, m_nFileType))
|
||||
return false;
|
||||
|
||||
CxImageToMediaFrame(img, this);
|
||||
CxImageToMediaFrame(&img, this);
|
||||
m_bIsGrayScale = img.IsGrayScale();
|
||||
return true;
|
||||
}
|
||||
@ -548,7 +588,7 @@ bool CBgraFrame::Resize(const long& nNewWidth, const long& nNewHeight, bool bDes
|
||||
if (bDestroyData)
|
||||
Destroy();
|
||||
|
||||
CxImageToMediaFrame( imgDst, this );
|
||||
CxImageToMediaFrame( &imgDst, this );
|
||||
return true;
|
||||
}
|
||||
bool CBgraFrame::ReColorPatternImage(const std::wstring& strFileName, unsigned int rgbColorBack, unsigned int rgbColorFore)
|
||||
|
||||
@ -363,8 +363,9 @@ namespace openjpeg
|
||||
|
||||
if (!opj_set_decode_area(l_codec, image, image->x0, nOffsetY, image->x1, nOffsetY + nTileHeight))
|
||||
{
|
||||
opj_stream_destroy(l_stream);
|
||||
opj_destroy_codec(l_codec);
|
||||
opj_stream_destroy(l_stream); l_stream = NULL;
|
||||
opj_destroy_codec(l_codec); l_codec = NULL;
|
||||
opj_image_destroy(image); image = NULL;
|
||||
|
||||
l_stream = get_file_stream(pFileData, nFileSize, codec);
|
||||
|
||||
|
||||
@ -1077,4 +1077,15 @@ namespace MetaFile
|
||||
return owsStream.str();
|
||||
}
|
||||
|
||||
std::wstring ConvertToWString(const std::vector<double>& arValues, int nAccuracy)
|
||||
{
|
||||
std::wstringstream owsStream;
|
||||
|
||||
for (double dValue : arValues)
|
||||
owsStream << std::fixed << std::setprecision((-1 != nAccuracy) ? nAccuracy : GetMinAccuracy(dValue)) << dValue << L" ";
|
||||
|
||||
owsStream.seekp(-1, std::ios_base::end);
|
||||
|
||||
return owsStream.str();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1219,6 +1219,8 @@ namespace MetaFile
|
||||
std::wstring GetTempFilename(const std::wstring& sFolder = L"");
|
||||
|
||||
std::wstring StringNormalization(std::wstring wsString);
|
||||
|
||||
std::wstring ConvertToWString(double dValue, int nAccuracy = -1);
|
||||
std::wstring ConvertToWString(const std::vector<double>& arValues, int nAccuracy = -1);
|
||||
};
|
||||
#endif // _METAFILE_COMMON_METAFILEUTILS_H
|
||||
|
||||
@ -98,7 +98,7 @@ namespace MetaFile
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_RESTOREDC(const int &nIndexDC)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_FILLPATH(const TEmfRectL &oBounds)
|
||||
@ -130,22 +130,22 @@ namespace MetaFile
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_SELECTCLIPPATH(const unsigned int &unRegionMode)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_EXCLUDECLIPRECT(const TEmfRectL &oClip)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_EXTSELECTCLIPRGN(const unsigned int &unRgnDataSize, const unsigned int &unRegionMode, CDataStream &oDataStream)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_INTERSECTCLIPRECT(const TEmfRectL &oClip)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_ANGLEARC(const TEmfPointL &oCenter, const unsigned int &unRadius, const double &dStartAngle, const double &dSweepAngle)
|
||||
@ -365,14 +365,24 @@ namespace MetaFile
|
||||
{
|
||||
std::wstring wsText = NSStringExt::CConverter::GetUnicodeFromUTF16((unsigned short*)oTEmfExtTextoutA.aEmrText.OutputString, oTEmfExtTextoutA.aEmrText.Chars);
|
||||
|
||||
WriteText(wsText, TPointD(oTEmfExtTextoutA.aEmrText.Reference.x, oTEmfExtTextoutA.aEmrText.Reference.y), oTEmfExtTextoutA.Bounds, TPointD(oTEmfExtTextoutA.exScale, oTEmfExtTextoutA.eyScale));
|
||||
std::vector<double> arDx(0);
|
||||
|
||||
if (NULL != oTEmfExtTextoutA.aEmrText.OutputDx)
|
||||
arDx = std::vector<double>(oTEmfExtTextoutA.aEmrText.OutputDx, oTEmfExtTextoutA.aEmrText.OutputDx + oTEmfExtTextoutA.aEmrText.Chars);
|
||||
|
||||
WriteText(wsText, TPointD(oTEmfExtTextoutA.aEmrText.Reference.x, oTEmfExtTextoutA.aEmrText.Reference.y), oTEmfExtTextoutA.Bounds, TPointD(oTEmfExtTextoutA.exScale, oTEmfExtTextoutA.eyScale), arDx);
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_EXTTEXTOUTW(const TEmfExtTextoutW &oTEmfExtTextoutW)
|
||||
{
|
||||
std::wstring wsText = NSStringExt::CConverter::GetUnicodeFromUTF16((unsigned short*)oTEmfExtTextoutW.wEmrText.OutputString, oTEmfExtTextoutW.wEmrText.Chars);
|
||||
|
||||
WriteText(wsText, TPointD(oTEmfExtTextoutW.wEmrText.Reference.x, oTEmfExtTextoutW.wEmrText.Reference.y), oTEmfExtTextoutW.Bounds, TPointD(oTEmfExtTextoutW.exScale, oTEmfExtTextoutW.eyScale));
|
||||
std::vector<double> arDx(0);
|
||||
|
||||
if (NULL != oTEmfExtTextoutW.wEmrText.OutputDx)
|
||||
arDx = std::vector<double>(oTEmfExtTextoutW.wEmrText.OutputDx, oTEmfExtTextoutW.wEmrText.OutputDx + oTEmfExtTextoutW.wEmrText.Chars);
|
||||
|
||||
WriteText(wsText, TPointD(oTEmfExtTextoutW.wEmrText.Reference.x, oTEmfExtTextoutW.wEmrText.Reference.y), oTEmfExtTextoutW.Bounds, TPointD(oTEmfExtTextoutW.exScale, oTEmfExtTextoutW.eyScale), arDx);
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMR_LINETO(const TEmfPointL &oPoint)
|
||||
@ -1187,27 +1197,27 @@ namespace MetaFile
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMFPLUS_OFFSETCLIP(double dX, double dY)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMFPLUS_RESETCLIP()
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMFPLUS_SETCLIPPATH(short unShFlags, const CEmfPlusPath *pPath)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMFPLUS_SETCLIPRECT(short shCM, const TEmfPlusRectF &oRect)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMFPLUS_SETCLIPREGION(short shObjectIndex, short shCM, const CEmfPlusRegion *pRegion)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::HANDLE_EMFPLUS_CLEAR(const TEmfPlusARGB &oARGB)
|
||||
@ -1698,32 +1708,17 @@ namespace MetaFile
|
||||
|
||||
void CEmfInterpretatorSvg::ResetClip()
|
||||
{
|
||||
m_wsLastClipId.clear();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::IntersectClip(const TRectD &oClip)
|
||||
{
|
||||
m_wsLastClipId = L"INTERSECTCLIP_" + ConvertToWString(++m_unNumberDefs, 0);
|
||||
|
||||
TXForm *pTransform = m_pParser->GetTransform();
|
||||
|
||||
m_wsDefs += L"<clipPath id=\"" + m_wsLastClipId + L"\">" +
|
||||
L"<rect x=\"" + ConvertToWString(oClip.dLeft * pTransform->M11, 0) + L"\" y=\"" + ConvertToWString(oClip.dTop * pTransform->M22, 0) + L"\" width=\"" + ConvertToWString((oClip.dRight - oClip.dLeft) * pTransform->M11, 0) + L"\" height=\"" + ConvertToWString((oClip.dBottom - oClip.dTop) * pTransform->M22, 0) + L"\"/>" +
|
||||
L"</clipPath>";
|
||||
CInterpretatorSvgBase::IntersectClip(oClip);
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::ExcludeClip(const TRectD &oClip, const TRectD &oBB)
|
||||
{
|
||||
m_wsLastClipId = L"EXCLUDECLIP_" + ConvertToWString(++m_unNumberDefs, 0);
|
||||
|
||||
TXForm *pTransform = m_pParser->GetTransform();
|
||||
|
||||
m_wsDefs += L"<clipPath id=\"" + m_wsLastClipId + L"\">" +
|
||||
L"<path d=\"M" + ConvertToWString(oBB.dLeft * pTransform->M11) + L' ' + ConvertToWString(oBB.dTop * pTransform->M22) + L", L" + ConvertToWString(oBB.dRight * pTransform->M11) + L' ' + ConvertToWString(oBB.dTop * pTransform->M11) + L", " +
|
||||
ConvertToWString(oBB.dRight * pTransform->M11) + L' ' + ConvertToWString(oBB.dBottom * pTransform->M22) + L", " + ConvertToWString(oBB.dLeft * pTransform->M11) + L' ' + ConvertToWString(oBB.dBottom * pTransform->M22) + L", M" +
|
||||
ConvertToWString(oClip.dLeft * pTransform->M11) + L' ' + ConvertToWString(oClip.dTop * pTransform->M22) + L", L" + ConvertToWString(oClip.dRight * pTransform->M11) + L' ' + ConvertToWString(oClip.dTop * pTransform->M22) + L", " +
|
||||
ConvertToWString(oClip.dRight * pTransform->M11) + L' ' + ConvertToWString(oClip.dBottom * pTransform->M22) + L", " + ConvertToWString(oClip.dLeft * pTransform->M11) + L' ' + ConvertToWString(oClip.dLeft * pTransform->M22) + L"\" clip-rule=\"evenodd\"/>" +
|
||||
L"</clipPath>";
|
||||
CInterpretatorSvgBase::ExcludeClip(oClip, oBB);
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::PathClip(IPath *pPath, int nClipMode, TXForm *pTransform)
|
||||
@ -1746,26 +1741,6 @@ namespace MetaFile
|
||||
m_wsDefs += L"<clipPath id=\"" + m_wsLastClipId + L"\"><path d=\"" + wsPath + L"\" clip-rule=\"evenodd\"/></clipPath>";
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::AddClip(NodeAttributes &arAttributes)
|
||||
{
|
||||
if (NULL == m_pParser)
|
||||
return;
|
||||
|
||||
if (m_wsLastClipId.empty())
|
||||
UpdateClip();
|
||||
|
||||
if (!m_wsLastClipId.empty())
|
||||
arAttributes.push_back({L"clip-path", L"url(#" + m_wsLastClipId + L')'});
|
||||
}
|
||||
|
||||
void CEmfInterpretatorSvg::UpdateClip()
|
||||
{
|
||||
IClip* pClip = m_pParser->GetClip();
|
||||
|
||||
if (NULL != pClip)
|
||||
pClip->ClipOnRenderer((CInterpretatorSvgBase*)this);
|
||||
}
|
||||
|
||||
TRectD CEmfInterpretatorSvg::TranslateRect(const TEmfRectL &oRect) const
|
||||
{
|
||||
TRectD oNewRect(oRect.lLeft, oRect.lTop, oRect.lRight, oRect.lBottom);
|
||||
|
||||
@ -201,7 +201,7 @@ namespace MetaFile
|
||||
void End() override {};
|
||||
|
||||
void DrawString(std::wstring& wsText, unsigned int unCharsCount, double dX, double dY, double* pDx,
|
||||
int iGraphicsMode = 1, double dXScale = 1, double dYScale = 1) override {};
|
||||
int iGraphicsMode = 1, double dXScale = 1, double dYScale = 1) override {};
|
||||
|
||||
void DrawDriverString(const std::wstring& wsString, const std::vector<TPointD>& arPoints) override {};
|
||||
|
||||
@ -221,9 +221,6 @@ namespace MetaFile
|
||||
void StartClipPath(unsigned int unMode, int nFillMode = -1) override {};
|
||||
void EndClipPath(unsigned int unMode) override {};
|
||||
|
||||
void AddClip(NodeAttributes &arAttributes);
|
||||
void UpdateClip();
|
||||
|
||||
void UpdateDC() override {};
|
||||
void SetTransform(double& dM11, double& dM12, double& dM21, double& dM22, double& dX, double& dY) override {};
|
||||
void GetTransform(double* pdM11, double* pdM12, double* pdM21, double* pdM22, double* pdX, double* pdY) override {};
|
||||
|
||||
@ -192,7 +192,7 @@ namespace MetaFile
|
||||
m_oXmlWriter.WriteNodeEnd(wsNodeName, false, false);
|
||||
}
|
||||
|
||||
void CInterpretatorSvgBase::WriteText(const std::wstring& wsText, const TPointD& oCoord, const TRect& oBounds, const TPointD& oScale)
|
||||
void CInterpretatorSvgBase::WriteText(const std::wstring &wsText, const TPointD &oCoord, const TRect &oBounds, const TPointD &oScale, const std::vector<double>& arDx)
|
||||
{
|
||||
if (NULL == m_pParser || NULL == m_pParser->GetFont())
|
||||
return;
|
||||
@ -342,9 +342,25 @@ namespace MetaFile
|
||||
|
||||
size_t unPosLineBreak = wsText.find(L"\n");
|
||||
|
||||
std::wstring wsXCoord;
|
||||
|
||||
if (arDx.empty() || arDx.size() < wsText.length())
|
||||
wsXCoord = ConvertToWString(dXCoord);
|
||||
else
|
||||
{
|
||||
std::vector<double> arXCoords(wsText.length());
|
||||
|
||||
arXCoords[0] = dXCoord;
|
||||
|
||||
for (unsigned int unIndex = 1; unIndex < wsText.length(); ++unIndex)
|
||||
arXCoords[unIndex] = arDx[unIndex - 1] + arXCoords[unIndex - 1];
|
||||
|
||||
wsXCoord = ConvertToWString(arXCoords);
|
||||
}
|
||||
|
||||
if (std::wstring::npos == unPosLineBreak)
|
||||
{
|
||||
arNodeAttributes.push_back({L"x", ConvertToWString(dXCoord)});
|
||||
arNodeAttributes.push_back({L"x", wsXCoord});
|
||||
arNodeAttributes.push_back({L"y", ConvertToWString(dYCoord)});
|
||||
|
||||
WriteNode(L"text", arNodeAttributes, StringNormalization(wsText));
|
||||
@ -360,7 +376,7 @@ namespace MetaFile
|
||||
{
|
||||
std::wstring wsTemp = StringNormalization(wsText.substr(unStart, unPosLineBreak - unStart));
|
||||
|
||||
WriteNode(L"tspan", {{L"x", ConvertToWString(dXCoord)},
|
||||
WriteNode(L"tspan", {{L"x", wsXCoord},
|
||||
{L"y", ConvertToWString(dYNewCoord)}}, StringNormalization(wsText.substr(unStart, unPosLineBreak - unStart)));
|
||||
|
||||
dYNewCoord += dFontHeight * 1.6;
|
||||
@ -376,6 +392,36 @@ namespace MetaFile
|
||||
m_oXmlWriter.WriteNodeEnd(L"g");
|
||||
}
|
||||
|
||||
void CInterpretatorSvgBase::ResetClip()
|
||||
{
|
||||
m_wsLastClipId.clear();
|
||||
}
|
||||
|
||||
void CInterpretatorSvgBase::IntersectClip(const TRectD &oClip)
|
||||
{
|
||||
m_wsLastClipId = L"INTERSECTCLIP_" + ConvertToWString(++m_unNumberDefs, 0);
|
||||
|
||||
TXForm *pTransform = m_pParser->GetTransform();
|
||||
|
||||
m_wsDefs += L"<clipPath id=\"" + m_wsLastClipId + L"\">" +
|
||||
L"<rect x=\"" + ConvertToWString(oClip.dLeft * pTransform->M11, 0) + L"\" y=\"" + ConvertToWString(oClip.dTop * pTransform->M22, 0) + L"\" width=\"" + ConvertToWString((oClip.dRight - oClip.dLeft) * pTransform->M11, 0) + L"\" height=\"" + ConvertToWString((oClip.dBottom - oClip.dTop) * pTransform->M22, 0) + L"\"/>" +
|
||||
L"</clipPath>";
|
||||
}
|
||||
|
||||
void CInterpretatorSvgBase::ExcludeClip(const TRectD &oClip, const TRectD &oBB)
|
||||
{
|
||||
m_wsLastClipId = L"EXCLUDECLIP_" + ConvertToWString(++m_unNumberDefs, 0);
|
||||
|
||||
TXForm *pTransform = m_pParser->GetTransform();
|
||||
|
||||
m_wsDefs += L"<clipPath id=\"" + m_wsLastClipId + L"\">" +
|
||||
L"<path d=\"M" + ConvertToWString(oBB.dLeft * pTransform->M11) + L' ' + ConvertToWString(oBB.dTop * pTransform->M22) + L", L" + ConvertToWString(oBB.dRight * pTransform->M11) + L' ' + ConvertToWString(oBB.dTop * pTransform->M11) + L", " +
|
||||
ConvertToWString(oBB.dRight * pTransform->M11) + L' ' + ConvertToWString(oBB.dBottom * pTransform->M22) + L", " + ConvertToWString(oBB.dLeft * pTransform->M11) + L' ' + ConvertToWString(oBB.dBottom * pTransform->M22) + L", M" +
|
||||
ConvertToWString(oClip.dLeft * pTransform->M11) + L' ' + ConvertToWString(oClip.dTop * pTransform->M22) + L", L" + ConvertToWString(oClip.dRight * pTransform->M11) + L' ' + ConvertToWString(oClip.dTop * pTransform->M22) + L", " +
|
||||
ConvertToWString(oClip.dRight * pTransform->M11) + L' ' + ConvertToWString(oClip.dBottom * pTransform->M22) + L", " + ConvertToWString(oClip.dLeft * pTransform->M11) + L' ' + ConvertToWString(oClip.dLeft * pTransform->M22) + L"\" clip-rule=\"evenodd\"/>" +
|
||||
L"</clipPath>";
|
||||
}
|
||||
|
||||
void CInterpretatorSvgBase::AddStroke(NodeAttributes &arAttributes) const
|
||||
{
|
||||
if (NULL == m_pParser)
|
||||
@ -618,6 +664,22 @@ namespace MetaFile
|
||||
|
||||
void CInterpretatorSvgBase::AddClip(NodeAttributes &arAttributes)
|
||||
{
|
||||
if (NULL == m_pParser)
|
||||
return;
|
||||
|
||||
if (m_wsLastClipId.empty())
|
||||
UpdateClip();
|
||||
|
||||
if (!m_wsLastClipId.empty())
|
||||
arAttributes.push_back({L"clip-path", L"url(#" + m_wsLastClipId + L')'});
|
||||
}
|
||||
|
||||
void CInterpretatorSvgBase::UpdateClip()
|
||||
{
|
||||
IClip* pClip = m_pParser->GetClip();
|
||||
|
||||
if (NULL != pClip)
|
||||
pClip->ClipOnRenderer((CInterpretatorSvgBase*)this);
|
||||
}
|
||||
|
||||
void CInterpretatorSvgBase::AddNoneFill(NodeAttributes &arAttributes) const
|
||||
@ -1446,5 +1508,4 @@ namespace MetaFile
|
||||
{
|
||||
m_oStringBuilder.WriteNodeEnd(L"pattern");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -65,12 +65,17 @@ namespace MetaFile
|
||||
void WriteNode(const std::wstring& wsNodeName, const NodeAttributes& arAttributes, const std::wstring& wsValueNode = L"");
|
||||
void WriteNodeBegin(const std::wstring& wsNodeName, const NodeAttributes& arAttributes);
|
||||
void WriteNodeEnd(const std::wstring& wsNodeName);
|
||||
void WriteText(const std::wstring& wsText, const TPointD& oCoord, const TRect& oBounds = TRect(), const TPointD& oScale = TPointD(1, 1));
|
||||
void WriteText(const std::wstring& wsText, const TPointD& oCoord, const TRect& oBounds = TRect(), const TPointD& oScale = TPointD(1, 1), const std::vector<double>& arDx = {});
|
||||
|
||||
void ResetClip() override;
|
||||
void IntersectClip(const TRectD& oClip) override;
|
||||
void ExcludeClip(const TRectD& oClip, const TRectD& oBB) override;
|
||||
|
||||
void AddStroke(NodeAttributes &arAttributes) const;
|
||||
void AddFill(NodeAttributes &arAttributes, double dWidth = 0, double dHeight = 0);
|
||||
void AddTransform(NodeAttributes &arAttributes, TXForm* pTransform = NULL) const;
|
||||
void AddClip(NodeAttributes &arAttributes);
|
||||
void UpdateClip();
|
||||
|
||||
void AddNoneFill(NodeAttributes &arAttributes) const;
|
||||
|
||||
|
||||
@ -194,7 +194,12 @@ namespace MetaFile
|
||||
|
||||
TPointD oScale((m_pParser->IsWindowFlippedX()) ? -1 : 1, (m_pParser->IsWindowFlippedY()) ? -1 : 1);
|
||||
|
||||
WriteText(wsText, TPointD(shX, shY), oRectangle, oScale);
|
||||
std::vector<double> arDx(0);
|
||||
|
||||
if (NULL != pDx)
|
||||
arDx = std::vector<double>(pDx, pDx + wsText.length());
|
||||
|
||||
WriteText(wsText, TPointD(shX, shY), oRectangle, oScale, arDx);
|
||||
}
|
||||
|
||||
void CWmfInterpretatorSvg::HANDLE_META_FILLREGION(unsigned short ushRegionIndex, unsigned short ushBrushIndex)
|
||||
@ -486,17 +491,17 @@ namespace MetaFile
|
||||
|
||||
void CWmfInterpretatorSvg::HANDLE_META_EXCLUDECLIPRECT(short shLeft, short shTop, short shRight, short shBottom)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CWmfInterpretatorSvg::HANDLE_META_INTERSECTCLIPRECT(short shLeft, short shTop, short shRight, short shBottom)
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CWmfInterpretatorSvg::HANDLE_META_RESTOREDC()
|
||||
{
|
||||
ResetClip();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CWmfInterpretatorSvg::DrawBitmap(double dX, double dY, double dW, double dH, BYTE* pBuffer, unsigned int unWidth, unsigned int unHeight)
|
||||
@ -563,31 +568,16 @@ namespace MetaFile
|
||||
|
||||
void CWmfInterpretatorSvg::ResetClip()
|
||||
{
|
||||
m_wsLastClipId.clear();
|
||||
CInterpretatorSvgBase::ResetClip();
|
||||
}
|
||||
|
||||
void CWmfInterpretatorSvg::IntersectClip(const TRectD& oClip)
|
||||
void CWmfInterpretatorSvg::IntersectClip(const TRectD &oClip)
|
||||
{
|
||||
m_wsLastClipId = L"INTERSECTCLIP_" + ConvertToWString(++m_unNumberDefs, 0);
|
||||
|
||||
m_wsDefs += L"<clipPath id=\"" + m_wsLastClipId + L"\">" +
|
||||
L"<rect x=\"" + ConvertToWString(oClip.dLeft, 0) + L"\" y=\"" + ConvertToWString(oClip.dTop, 0) + L"\" width=\"" + ConvertToWString(oClip.dRight - oClip.dLeft, 0) + L"\" height=\"" + ConvertToWString(oClip.dBottom - oClip.dTop, 0) + L"\"/>" +
|
||||
L"</clipPath>";
|
||||
CInterpretatorSvgBase::IntersectClip(oClip);
|
||||
}
|
||||
|
||||
void CWmfInterpretatorSvg::ExcludeClip(const TRectD &oClip, const TRectD &oBB)
|
||||
{
|
||||
m_wsLastClipId = L"EXCLUDECLIP_" + ConvertToWString(++m_unNumberDefs, 0);
|
||||
|
||||
m_wsDefs += L"<clipPath id=\"" + m_wsLastClipId + L"\">" +
|
||||
L"<path d=\"M" + ConvertToWString(oBB.dLeft) + L' ' + ConvertToWString(oBB.dTop) + L", L" + ConvertToWString(oBB.dRight) + L' ' + ConvertToWString(oBB.dTop) + L", " +
|
||||
ConvertToWString(oBB.dRight) + L' ' + ConvertToWString(oBB.dBottom) + L", " + ConvertToWString(oBB.dLeft) + L' ' + ConvertToWString(oBB.dBottom) + L", M" +
|
||||
ConvertToWString(oClip.dLeft) + L' ' + ConvertToWString(oClip.dTop) + L", L" + ConvertToWString(oClip.dRight) + L' ' + ConvertToWString(oClip.dTop) + L", " +
|
||||
ConvertToWString(oClip.dRight) + L' ' + ConvertToWString(oClip.dBottom) + L", " + ConvertToWString(oClip.dLeft) + L' ' + ConvertToWString(oClip.dLeft) + L"\" clip-rule=\"evenodd\"/>" +
|
||||
L"</clipPath>";
|
||||
}
|
||||
|
||||
void CWmfInterpretatorSvg::PathClip(IPath *pPath, int nClipMode, TXForm *pTransform)
|
||||
{
|
||||
CInterpretatorSvgBase::ExcludeClip(oClip, oBB);
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ namespace MetaFile
|
||||
void ResetClip() override;
|
||||
void IntersectClip(const TRectD& oClip) override;
|
||||
void ExcludeClip(const TRectD& oClip, const TRectD& oBB) override;
|
||||
void PathClip(IPath* pPath, int nClipMode, TXForm* pTransform = NULL) override;
|
||||
void PathClip(IPath* pPath, int nClipMode, TXForm* pTransform = NULL) override {};
|
||||
void StartClipPath(unsigned int unMode, int nFillMode = -1) override {};
|
||||
void EndClipPath(unsigned int unMode) override {};
|
||||
|
||||
|
||||
@ -1255,7 +1255,7 @@ namespace MetaFile
|
||||
void CWmfParserBase::HANDLE_META_TEXTOUT(short shStringLength, unsigned char *pString, short shY, short shX)
|
||||
{
|
||||
if (NULL != m_pInterpretator)
|
||||
m_pInterpretator->HANDLE_META_TEXTOUT(shStringLength, pString, shY, shX);
|
||||
m_pInterpretator->HANDLE_META_TEXTOUT(shStringLength, pString, shX, shY);
|
||||
|
||||
DrawText(pString, shStringLength, shX, shY, NULL);
|
||||
}
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
Aleksey Sanin <aleksey@aleksey.com>
|
||||
|
||||
Windows port: Igor Zlatkovic <igor@stud.fh-frankfurt.de>
|
||||
Debian port: John Belmonte <jvb@prairienet.org>
|
||||
xmlsec-nss: Tej Arora <tej@netscape.com>, AOL Inc.
|
||||
xmlsec-mscrypto: Wouter Ketting <wsh@xs4all.nl>, Cordys R&D BV
|
||||
GOST support: Dmitry Belyavsky <beldmit@cryptocom.ru>, Cryptocom LTD (http://www.cryptocom.ru)
|
||||
|
||||
@ -1 +0,0 @@
|
||||
See Copyright file for information about the copyright
|
||||
@ -1,105 +0,0 @@
|
||||
xmlsec, xmlsec-openssl, xmlsec-gnutls, xmlsec-gcrypt libraries
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is fur-
|
||||
nished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
|
||||
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
ALEKSEY SANIN BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
|
||||
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Aleksey Sanin shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
ings in this Software without prior written authorization from him.
|
||||
|
||||
|
||||
xmlsec-nss library
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
|
||||
Copyright (c) 2003 America Online, Inc. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is fur-
|
||||
nished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Portions of the Software were created using source code and/or APIs
|
||||
governed by the Mozilla Public License (MPL). The MPL is available
|
||||
at http://www.mozilla.org/MPL/MPL-1.1.html. The MPL permits such
|
||||
portions to be distributed with code not governed by MPL, as long
|
||||
as the requirements of MPL are fulfilled for such portions.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
|
||||
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
ALEKSEY SANIN BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
|
||||
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Aleksey Sanin shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
ings in this Software without prior written authorization from him.
|
||||
|
||||
|
||||
xmlsec-mscrypto library
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
|
||||
Copyright (C) 2003 Cordys R&D BV, All rights reserved.
|
||||
Copyright (C) 2007 Roumen Petrov.
|
||||
Copyright (c) 2005-2006 Cryptocom LTD (http://www.cryptocom.ru).
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is fur-
|
||||
nished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
|
||||
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
ALEKSEY SANIN BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
|
||||
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Aleksey Sanin shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
ings in this Software without prior written authorization from him.
|
||||
|
||||
|
||||
|
||||
References
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
* AOL
|
||||
http://www.aleksey.com/pipermail/xmlsec/2003/005488.html
|
||||
http://www.aleksey.com/pipermail/xmlsec/attachments/20030729/0e25648e/attachment.htm
|
||||
|
||||
* Cordys R&D BV
|
||||
http://www.aleksey.com/pipermail/xmlsec/2003/005581.html
|
||||
|
||||
* Cryptocom LTD
|
||||
http://www.aleksey.com/pipermail/xmlsec/2006/007410.html
|
||||
|
||||
@ -1,176 +0,0 @@
|
||||
Rules for commits on the xmlsec module
|
||||
=========================================
|
||||
|
||||
0) DO NOT COMMIT DIRECTLY !
|
||||
If you have a patch send a mail to xmlsec@aleksey.com mailing
|
||||
list (you must be subscribed to the list, go to
|
||||
http://www.aleksey.com/mailman/listinfo/xmlsec to subscribe).
|
||||
|
||||
If there is a problem in xmlsec module that prevents you
|
||||
from building other major components then feel free to patch
|
||||
first and then send a mail. This is an EXCEPTIONAL case and
|
||||
you should be VERY carefull when you are doing this.
|
||||
|
||||
Igor Zlatkovic get an exception for the send before commit rule.
|
||||
|
||||
1) Coding style.
|
||||
- Formatting. Just for clarification, the formating is:
|
||||
|
||||
tab size=8;indentation=4;insert spaces=yes
|
||||
|
||||
- Use explicit "!= NULL", "!= 0", etc. This makes code
|
||||
easier to read and remove warnings on some platform.
|
||||
Example:
|
||||
BAD:
|
||||
if(a)
|
||||
GOOD:
|
||||
if(a != NULL)
|
||||
or
|
||||
if(a != 0)
|
||||
|
||||
- Put figure brackets '{}' even if you have only one operator
|
||||
in "if", "for", etc. This also makes code easier to read and
|
||||
saves a lot of time when you need to quickly change something.
|
||||
Example:
|
||||
BAD:
|
||||
if(a != NULL)
|
||||
xmlFree(a);
|
||||
GOOD:
|
||||
if(a != NULL) {
|
||||
xmlFree(a);
|
||||
}
|
||||
|
||||
- Use round brackets '()' in conditions to show the precedence order.
|
||||
I don't remember what goes first '<<' or '*', do you?
|
||||
Example:
|
||||
BAD:
|
||||
if(privkey == NULL || pubkey == NULL)
|
||||
GOOD:
|
||||
if((privkey == NULL) || (pubkey == NULL))
|
||||
|
||||
- Use round brackets '()' for "return".
|
||||
Example:
|
||||
BAD:
|
||||
return 0;
|
||||
GOOD:
|
||||
return(0);
|
||||
|
||||
- Check for warnings! Use "--enable-pedantic" option
|
||||
for "configure.in" script to enable as much warnings as possible.
|
||||
Your patch should produce no new warnings and if you'll
|
||||
see something that you can fix, then do it.
|
||||
|
||||
- Check for memory leaks. There is a built in support for
|
||||
valgrind (http://devel-home.kde.org/~sewardj/). In order to use it,
|
||||
use "enable_static_linking" option for "configure.in" script to
|
||||
force static linking of xmlsec command line utility and run
|
||||
"make memcheck" from the top xmlsec source folder. The results are printed
|
||||
at the end. More detailed logs could be found in /tmp/test*.log files.
|
||||
|
||||
2) Coding practice
|
||||
- You should trust nobody! Anyone can fool you: user or another application
|
||||
might provide you incorrect data; call to xmlsec or system function might
|
||||
fail with an error code; worse, the same call might fail but the return
|
||||
code is "success" and so on. The patch fixes a lot of places where the
|
||||
original code failed to check input data or function return values.
|
||||
One of my favorite examples is the code that *silently* assumed that
|
||||
base64 decoded value of a RSA public exponent obtained from XML fits
|
||||
in a DWORD. And after that the code did memcpy to copy from xmlSecBuffer
|
||||
to a DWORD variable *without* checking how much data are actualy copied!
|
||||
The trivial DoS attack (at least DoS!!!) is to put very long base64 string
|
||||
in XML file and enjoy the server crash.
|
||||
One of the strongest sides of xmlsec library is that there are very few
|
||||
known ways to crash it (and all of them are related to running the
|
||||
application in an environment with a very limited memory to force a malloc
|
||||
failure). To be a little paranoid is good in this context :)
|
||||
|
||||
- malloc/free vs. xmlMalloc/xmlFree
|
||||
xmlsec library use libxml2 memory management functions. This provides an
|
||||
easy way to replace default memory management functions with custom ones.
|
||||
And this might be very usefull in some cases.
|
||||
Note that crypto library might use a different memory management
|
||||
functions! Be very carefully to do not mix them (i.e. get memory
|
||||
allocated by crypto library function and free it with xmFree).
|
||||
|
||||
- Errors reporting (XMLSEC_ERRORS_R_XMLSEC_FAILED vs. XMLSEC_ERRORS_R_CRYPTO_FAILED)
|
||||
The correct usage rule is:
|
||||
if the failed function starts with "xmlSec" then use
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED
|
||||
else if it is xmlMalloc/xmlFree/xmlStrdup/etc then use
|
||||
XMLSEC_ERRORS_R_MALLOC_FAILED
|
||||
else if the function starts with "xml" or "xslt" (i.e. it comes
|
||||
from libxml or libxslt) then use
|
||||
XMLSEC_ERRORS_R_XML_FAILED
|
||||
else if it is related to IO (fopen, fread, fwrite, etc.) then use
|
||||
XMLSEC_ERRORS_R_IO_FAILED
|
||||
else if the function could be used only from xmlsec-crypto (i.e.
|
||||
it is crypto engine related) then use
|
||||
XMLSEC_ERRORS_R_CRYPTO_FAILED
|
||||
else if there is another reason (invalid data, invalid size, etc.)
|
||||
corresponding error reason should be used
|
||||
else
|
||||
it is something new and should be discussed
|
||||
fi
|
||||
Correct error reason is very important. For example, some applications
|
||||
ignore all the XMLSEC_ERRORS_R_XMLSEC_FAILED errors to get to the bottom of
|
||||
the errors stack and report the actual problem.
|
||||
|
||||
- Errors reporting: "size=%d;error=%d" instead of "size %d, error: %d":
|
||||
It would be great if xmlsec-crypto libraries can follow the error message
|
||||
standard adopted in the other files of xmlsec library:
|
||||
"<name1>=<value1>;<name2>=<value2>;..."
|
||||
This greatly helps when one needs to write a logs parser. For example, to
|
||||
find the reason of memory allocation failures.
|
||||
|
||||
3) Preparing and submitting a patch.
|
||||
If you want to submit a patch please create a pull request on GitHub and then
|
||||
send your pull request along with a short description of the problem or feature
|
||||
you are fixing/implementing to the xmlsec@aleksey.com mailing list
|
||||
(you must be subscribed to the list, go to http://www.aleksey.com/mailman/listinfo/xmlsec to subscribe).
|
||||
If you are fixing a bug, it might be a good idea to create a GitHub ticket first
|
||||
(http://www.aleksey.com/xmlsec/bugs.html) for the record.
|
||||
|
||||
4) Building a release
|
||||
- Cleanup, make sure no other changes are pending
|
||||
- make distclean
|
||||
- git status
|
||||
- Update Changelog
|
||||
- Write about release changes in the release
|
||||
- docs/index.html and docs/news.html
|
||||
- Update release number in
|
||||
- configure.in (2 places at the top)
|
||||
- docs/download.html
|
||||
- Create build
|
||||
- ./autogen.sh
|
||||
- make
|
||||
- Build docs (watch for errors!)
|
||||
- make docs
|
||||
- Commit the "prepare for X.Y.Z" release
|
||||
- git commit -m"prepare for X.Y.Z release" -a
|
||||
- Run tests, make sure everything is OK
|
||||
- make check
|
||||
- Build release
|
||||
- sudo ./scripts/build_release.sh
|
||||
- Extract tar file, make sure it works
|
||||
- cd /tmp
|
||||
- tar xvfz /usr/src/redhat/SOURCE/xmlsec1-X.Y.z.tar.gz
|
||||
- cd xmlsec1-X.Y.z
|
||||
- ./configure
|
||||
- make
|
||||
- make check
|
||||
- Copy tar file to FTP/Web Download
|
||||
- Copy docs/ folder to Web folder
|
||||
- Write an announcement email to xmlsec@aleksey.com
|
||||
- Update freshmeat.net
|
||||
- Relax
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
Compilation
|
||||
|
||||
1. How to compile XMLSec?
|
||||
As most UNIX libraries XMLSec follows the "standard":
|
||||
|
||||
gunzip -c xmlsec-xxx.tar.gz | tar xvf -
|
||||
cd xmlsec-xxxx
|
||||
./configure --help
|
||||
|
||||
to see the options, then the compilation/installation proper
|
||||
|
||||
./configure [possible options]
|
||||
make
|
||||
make install
|
||||
|
||||
Probably you may have to rerun ldconfig or similar utility to
|
||||
update your list of installed shared libs. At this point you can check
|
||||
that the library is compiled successfully by running
|
||||
|
||||
make check
|
||||
|
||||
2.What other libraries are needed to compile/install XMLSec?
|
||||
XMLSec requires following libraries:
|
||||
|
||||
LibXML2 (http://xmlsoft.org): a very powerfull XML parsing and
|
||||
manipulating library
|
||||
LibXSLT (http://xmlsoft.org/XSLT/): a nice XSLT processor based
|
||||
on LibXML2
|
||||
OpenSSL (http://www.openssl.org): well known cryptographic library
|
||||
|
||||
If you are running a Linux system then there is a good chance that
|
||||
you already have all libraries installed. Also XMLSec requires the
|
||||
normal C ANSI API (please report any violation to this rule you may find).
|
||||
|
||||
|
||||
Aleksey Sanin <aleksey@aleksey.com>
|
||||
|
||||
$Id$
|
||||
@ -1,183 +0,0 @@
|
||||
NULL =
|
||||
|
||||
SAFE_VERSION = @XMLSEC_VERSION_SAFE@
|
||||
SUBDIRS = include src apps man docs
|
||||
TEST_APP = apps/xmlsec1$(EXEEXT)
|
||||
DEFAULT_CRYPTO = @XMLSEC_DEFAULT_CRYPTO@
|
||||
|
||||
bin_SCRIPTS = xmlsec1-config
|
||||
pkgconfig_DATA = xmlsec1.pc @XMLSEC_CRYPTO_PC_FILES_LIST@
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
confexecdir = $(libdir)
|
||||
confexec_DATA = xmlsec1Conf.sh
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = xmlsec1.m4
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
DISTCLEANFILES = \
|
||||
xmlsec1Conf.sh \
|
||||
xmlsec1.pc \
|
||||
xmlsec1-openssl.pc \
|
||||
xmlsec1-nss.pc \
|
||||
xmlsec1-gnutls.pc \
|
||||
xmlsec1-gcrypt.pc \
|
||||
xmlsec1-config \
|
||||
xmlsec1.spec \
|
||||
stamp-h2 \
|
||||
stamp-h3 \
|
||||
stamp-h4 \
|
||||
stamp-h5 \
|
||||
$NULL
|
||||
|
||||
EXTRA_DIST = \
|
||||
m4 \
|
||||
examples \
|
||||
scripts \
|
||||
tests \
|
||||
win32 \
|
||||
NEWS \
|
||||
ChangeLog \
|
||||
Copyright \
|
||||
HACKING \
|
||||
xmlsec-openssl.pc.in \
|
||||
xmlsec-nss.pc.in\
|
||||
xmlsec-gnutls.pc.in \
|
||||
xmlsec-gcrypt.pc.in \
|
||||
xmlsec-config.in \
|
||||
xmlsecConf.sh.in \
|
||||
xmlsec.spec.in \
|
||||
xmlsec1Conf.sh \
|
||||
xmlsec1.pc @XMLSEC_CRYPTO_PC_FILES_LIST@ \
|
||||
xmlsec1-config \
|
||||
xmlsec1.spec \
|
||||
xmlsec1.m4 \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_CLEAN = \
|
||||
examples \
|
||||
$(NULL)
|
||||
|
||||
ABS_SRCDIR=@abs_srcdir@
|
||||
ABS_BUILDDIR=@abs_builddir@
|
||||
if XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING
|
||||
PRECHECK_COMMANDS = \
|
||||
cd $(ABS_SRCDIR) \
|
||||
$(NULL)
|
||||
else
|
||||
PRECHECK_COMMANDS= \
|
||||
for i in $(XMLSEC_CRYPTO_LIST) ; do \
|
||||
export LD_LIBRARY_PATH="$(ABS_BUILDDIR)/src/$$i/.libs:$$LD_LIBRARY_PATH" ; \
|
||||
done && \
|
||||
cd $(ABS_SRCDIR) \
|
||||
$(NULL)
|
||||
endif
|
||||
CHECK_CRYPTO_LIST = \
|
||||
$(XMLSEC_CRYPTO_LIST) \
|
||||
$(NULL)
|
||||
|
||||
docs: docs-man
|
||||
@(cd docs && $(MAKE) docs)
|
||||
|
||||
docs-clean:
|
||||
@(cd docs && $(MAKE) clean)
|
||||
|
||||
docs-man:
|
||||
@(cd man && $(MAKE) docs)
|
||||
|
||||
check: check-all check-info
|
||||
|
||||
check-all: $(TEST_APP)
|
||||
for crypto in $(CHECK_CRYPTO_LIST) ; do \
|
||||
make check-crypto-$$crypto ; \
|
||||
done
|
||||
|
||||
check-crypto-%: $(TEST_APP)
|
||||
@($(PRECHECK_COMMANDS) && \
|
||||
echo "=================== Checking xmlsec-$* =================================" && \
|
||||
$(SHELL) ./tests/testrun.sh \
|
||||
$(ABS_SRCDIR)/tests/testKeys.sh \
|
||||
$* \
|
||||
$(ABS_SRCDIR)/tests \
|
||||
$(ABS_BUILDDIR)/$(TEST_APP) der \
|
||||
&& \
|
||||
$(SHELL) ./tests/testrun.sh \
|
||||
$(ABS_SRCDIR)/tests/testDSig.sh \
|
||||
$* \
|
||||
$(ABS_SRCDIR)/tests \
|
||||
$(ABS_BUILDDIR)/$(TEST_APP) \
|
||||
der \
|
||||
&& \
|
||||
$(SHELL) ./tests/testrun.sh \
|
||||
$(ABS_SRCDIR)/tests/testEnc.sh \
|
||||
$* \
|
||||
$(ABS_SRCDIR)/tests \
|
||||
$(ABS_BUILDDIR)/$(TEST_APP) \
|
||||
der \
|
||||
; \
|
||||
)
|
||||
|
||||
check-info:
|
||||
@echo "---------------------------- ATTENTION -----------------------------------"
|
||||
@echo "--- Some of the tests use resources located on external HTTP servers. ---"
|
||||
@echo "--- If you have no Internet connection or the external resource is not ---"
|
||||
@echo "--- responding then the test will fail. ---"
|
||||
@echo "---------------------------- ATTENTION -----------------------------------"
|
||||
|
||||
check-keys: $(TEST_APP)
|
||||
@($(PRECHECK_COMMANDS) && \
|
||||
$(SHELL) ./tests/testrun.sh \
|
||||
$(ABS_SRCDIR)/tests/testKeys.sh \
|
||||
$(DEFAULT_CRYPTO) \
|
||||
$(ABS_SRCDIR)/tests \
|
||||
$(ABS_BUILDDIR)/$(TEST_APP) \
|
||||
der \
|
||||
)
|
||||
|
||||
check-dsig: $(TEST_APP)
|
||||
@($(PRECHECK_COMMANDS) && \
|
||||
$(SHELL) ./tests/testrun.sh \
|
||||
$(ABS_SRCDIR)/tests/testDSig.sh \
|
||||
$(DEFAULT_CRYPTO) \
|
||||
$(ABS_SRCDIR)/tests \
|
||||
$(ABS_BUILDDIR)/$(TEST_APP) \
|
||||
der \
|
||||
)
|
||||
|
||||
check-enc: $(TEST_APP)
|
||||
@($(PRECHECK_COMMANDS) && \
|
||||
$(SHELL) ./tests/testrun.sh \
|
||||
$(ABS_SRCDIR)/tests/testEnc.sh \
|
||||
$(DEFAULT_CRYPTO) \
|
||||
$(ABS_SRCDIR)/tests \
|
||||
$(ABS_BUILDDIR)/$(TEST_APP) \
|
||||
der \
|
||||
)
|
||||
|
||||
memcheck-res:
|
||||
@grep -i 'ERROR SUMMARY' /tmp/*.log | sed 's/.*==.*== *//' | sort -u
|
||||
@grep -i 'in use at exit' /tmp/*.log | sed 's/.*==.*== *//' | sort -u
|
||||
@grep -i 'definitely lost:' /tmp/*.log | sed 's/.*==.*== *//' | sort -u
|
||||
@grep -i 'indirectly lost:' /tmp/*.log | sed 's/.*==.*== *//' | sort -u
|
||||
@grep -i 'possibly lost:' /tmp/*.log | sed 's/.*==.*== *//' | sort -u
|
||||
@grep -i 'still reachable:' /tmp/*.log | sed 's/.*==.*== *//' | sort -u
|
||||
|
||||
memcheck: $(TEST_APP)
|
||||
@(export DEBUG_MEMORY=1 && $(MAKE) check && $(MAKE) memcheck-res)
|
||||
|
||||
perfcheck: $(TEST_APP)
|
||||
@(export PERF_TEST=10 && $(MAKE) check)
|
||||
|
||||
dist-hook:
|
||||
|
||||
cleantar:
|
||||
@($(RM) -f xmlsec*.tar.gz COPYING.LIB)
|
||||
|
||||
tar-release: clean cleantar
|
||||
@(unset CDPATH && $(MAKE) dist)
|
||||
|
||||
rpm: cleantar tar-release
|
||||
@(unset CDPATH && rpmbuild -ta $(distdir).tar.gz)
|
||||
|
||||
rpm-release: clean cleantar rpm
|
||||
|
||||
@ -1 +0,0 @@
|
||||
Check ChangeLog file :)
|
||||
@ -1,23 +0,0 @@
|
||||
XMLSec Library
|
||||
----------------------------------------------
|
||||
|
||||
XMLSec library provides C based implementation for major XML Security
|
||||
standards:
|
||||
|
||||
* XML Signature Syntax and Processing
|
||||
http://www.w3.org/TR/xmldsig-core
|
||||
|
||||
* XML Encryption Syntax and Processing
|
||||
http://www.w3.org/TR/xmlenc-core/
|
||||
|
||||
XMLSec is based on well known LibXML (http://xmlsoft.org), LibXSLT
|
||||
(http://xmlsoft.org/XSLT) and OpenSSL (http://www.openssl.org) libraries.
|
||||
|
||||
XMLSec library documentation is available here:
|
||||
|
||||
http://www.aleksey.com/xmlsec/
|
||||
|
||||
This code is released under the MIT Licence see the Copyright file.
|
||||
|
||||
Aleksey Sanin <aleksey@aleksey.com>
|
||||
|
||||
@ -1,156 +0,0 @@
|
||||
*************************************************
|
||||
General
|
||||
*************************************************
|
||||
|
||||
* Unify password callback (one of parameters: filename)
|
||||
* Get key usage from certs
|
||||
* Extend keys manager to return more info when key is found or not found
|
||||
(what cheks were performed, etc.)
|
||||
|
||||
|
||||
*************************************************
|
||||
Tests status
|
||||
*************************************************
|
||||
|
||||
-------------------------------------------------
|
||||
* xmlsec-openssl (April 26, 2010 using OpenSSL 0.9.8g)
|
||||
-------------------------------------------------
|
||||
|
||||
** Skipped tests due to missing transforms: GOST
|
||||
|
||||
aleksey-xmldsig-01/enveloped-gost
|
||||
|
||||
|
||||
-------------------------------------------------
|
||||
* xmlsec-nss (April 26, 2010 using NSS 3.12.6)
|
||||
-------------------------------------------------
|
||||
|
||||
** Skipped tests due to missing transforms: RIPEMD160, SHA224, RSA/OAEP, GOST
|
||||
|
||||
aleksey-xmldsig-01/enveloping-ripemd160-hmac-ripemd160
|
||||
aleksey-xmldsig-01/enveloping-ripemd160-hmac-ripemd160-64
|
||||
aleksey-xmldsig-01/enveloping-sha224-hmac-sha224
|
||||
aleksey-xmldsig-01/enveloping-sha224-hmac-sha224-64
|
||||
aleksey-xmldsig-01/enveloping-ripemd160-rsa-ripemd160
|
||||
aleksey-xmldsig-01/enveloping-sha224-rsa-sha224
|
||||
aleksey-xmldsig-01/enveloped-gost
|
||||
merlin-xmlenc-five/encsig-ripemd160-hmac-ripemd160-kw-tripledes
|
||||
merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p
|
||||
01-phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1
|
||||
|
||||
** Failed tests due to no support for CRLs in XML document
|
||||
|
||||
merlin-xmldsig-twenty-three/signature-x509-crt-crl
|
||||
|
||||
|
||||
-------------------------------------------------
|
||||
* xmlsec-mscrypto (May 09, 2010 using Windows XP SP3)
|
||||
-------------------------------------------------
|
||||
|
||||
** Skipped tests due to missing transforms: RIPEMD160, SHA224
|
||||
|
||||
aleksey-xmldsig-01/enveloping-ripemd160-hmac-ripemd160
|
||||
aleksey-xmldsig-01/enveloping-ripemd160-hmac-ripemd160-64
|
||||
aleksey-xmldsig-01/enveloping-sha224-hmac-sha224
|
||||
aleksey-xmldsig-01/enveloping-sha224-hmac-sha224-64
|
||||
aleksey-xmldsig-01/enveloping-ripemd160-rsa-ripemd160
|
||||
aleksey-xmldsig-01/enveloping-sha224-rsa-sha224
|
||||
merlin-xmlenc-five/encsig-ripemd160-hmac-ripemd160-kw-tripledes
|
||||
|
||||
** Failed tests due to no GOST crypto providers on test machine
|
||||
|
||||
aleksey-xmldsig-01/enveloped-gost
|
||||
|
||||
-------------------------------------------------
|
||||
* xmlsec-gnutls (May 24, 2010 using GnuTLS)
|
||||
-------------------------------------------------
|
||||
|
||||
** Skipped tests due to missing transforms: RSA PKCS/OAEP, GOST
|
||||
|
||||
aleksey-xmldsig-01/enveloping-sha224-hmac-sha224
|
||||
aleksey-xmldsig-01/enveloping-sha224-hmac-sha224-64
|
||||
aleksey-xmldsig-01/enveloping-sha224-rsa-sha224
|
||||
merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5
|
||||
merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p
|
||||
aleksey-xmldsig-01/enveloped-gost
|
||||
phaos-xmldsig-three/signature-rsa-manifest-x509-data-crl
|
||||
|
||||
01-phaos-xmlenc-3/enc-element-3des-kt-rsa1_5
|
||||
01-phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5
|
||||
01-phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-text-aes192-kt-rsa1_5
|
||||
01-phaos-xmlenc-3/enc-content-aes256-kt-rsa1_5
|
||||
01-phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1
|
||||
|
||||
-------------------------------------------------
|
||||
* xmlsec-gcrypt (May 09, 2010 using GCrypt)
|
||||
-------------------------------------------------
|
||||
|
||||
** Skipped tests due to missing transforms: DSA, RSA PKCS/OAEP, X509, GOST
|
||||
|
||||
aleksey-xmldsig-01/enveloping-dsa-x509chain
|
||||
aleksey-xmldsig-01/enveloping-rsa-x509chain
|
||||
aleksey-xmldsig-01/enveloping-sha224-hmac-sha224
|
||||
aleksey-xmldsig-01/enveloping-sha224-hmac-sha224-64
|
||||
aleksey-xmldsig-01/enveloping-md5-rsa-md5
|
||||
aleksey-xmldsig-01/enveloping-ripemd160-rsa-ripemd160
|
||||
aleksey-xmldsig-01/enveloping-sha1-rsa-sha1
|
||||
aleksey-xmldsig-01/enveloping-sha224-rsa-sha224
|
||||
aleksey-xmldsig-01/enveloping-sha256-rsa-sha256
|
||||
aleksey-xmldsig-01/enveloping-sha384-rsa-sha384
|
||||
aleksey-xmldsig-01/enveloping-sha512-rsa-sha512
|
||||
aleksey-xmldsig-01/enveloping-expired-cert
|
||||
aleksey-xmldsig-01/x509data-test
|
||||
aleksey-xmldsig-01/x509data-sn-test
|
||||
|
||||
merlin-xmldsig-twenty-three/signature-keyname
|
||||
merlin-xmldsig-twenty-three/signature-x509-crt
|
||||
merlin-xmldsig-twenty-three/signature-x509-sn
|
||||
merlin-xmldsig-twenty-three/signature-x509-is
|
||||
merlin-xmldsig-twenty-three/signature-x509-ski
|
||||
merlin-xmldsig-twenty-three/signature-retrievalmethod-rawx509crt
|
||||
merlin-xmldsig-twenty-three/signature
|
||||
merlin-xmlenc-five/encsig-hmac-sha256-rsa-1_5
|
||||
merlin-xmlenc-five/encsig-hmac-sha256-rsa-oaep-mgf1p
|
||||
phaos-xmldsig-three/signature-big
|
||||
phaos-xmldsig-three/signature-dsa-detached
|
||||
phaos-xmldsig-three/signature-dsa-enveloped
|
||||
phaos-xmldsig-three/signature-dsa-enveloping
|
||||
phaos-xmldsig-three/signature-dsa-manifest
|
||||
phaos-xmldsig-three/signature-rsa-detached-b64-transform
|
||||
phaos-xmldsig-three/signature-rsa-detached
|
||||
phaos-xmldsig-three/signature-rsa-detached-xpath-transform
|
||||
phaos-xmldsig-three/signature-rsa-detached-xslt-transform-retrieval-method
|
||||
phaos-xmldsig-three/signature-rsa-detached-xslt-transform
|
||||
phaos-xmldsig-three/signature-rsa-enveloped
|
||||
phaos-xmldsig-three/signature-rsa-enveloping
|
||||
phaos-xmldsig-three/signature-rsa-manifest-x509-data-cert-chain
|
||||
phaos-xmldsig-three/signature-rsa-manifest-x509-data-cert
|
||||
phaos-xmldsig-three/signature-rsa-manifest-x509-data-issuer-serial
|
||||
phaos-xmldsig-three/signature-rsa-manifest-x509-data-ski
|
||||
phaos-xmldsig-three/signature-rsa-manifest-x509-data-subject-name
|
||||
phaos-xmldsig-three/signature-rsa-manifest
|
||||
phaos-xmldsig-three/signature-rsa-xpath-transform-enveloped
|
||||
aleksey-xmldsig-01/enveloped-gost
|
||||
merlin-xmldsig-twenty-three/signature-x509-crt-crl
|
||||
aleksey-xmldsig-01/enveloping-expired-cert
|
||||
phaos-xmldsig-three/signature-rsa-detached-xslt-transform-bad-retrieval-method
|
||||
phaos-xmldsig-three/signature-rsa-enveloped-bad-digest-val
|
||||
phaos-xmldsig-three/signature-rsa-enveloped-bad-sig
|
||||
phaos-xmldsig-three/signature-rsa-manifest-x509-data-crl
|
||||
|
||||
merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5
|
||||
merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p
|
||||
01-phaos-xmlenc-3/enc-element-3des-kt-rsa1_5
|
||||
01-phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5
|
||||
01-phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1
|
||||
01-phaos-xmlenc-3/enc-text-aes192-kt-rsa1_5
|
||||
01-phaos-xmlenc-3/enc-content-aes256-kt-rsa1_5
|
||||
01-phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1
|
||||
1408
DesktopEditor/xmlsec/xmlsec/aclocal.m4
vendored
@ -1,82 +0,0 @@
|
||||
NULL =
|
||||
|
||||
bin_PROGRAMS = xmlsec1
|
||||
|
||||
XMLSEC_LIBS = $(top_builddir)/src/libxmlsec1.la
|
||||
|
||||
|
||||
# check if we use dynamic loading for xmlsec-crypto or not
|
||||
if XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING
|
||||
|
||||
CRYPTO_DEPS = \
|
||||
$(top_builddir)/src/@XMLSEC_DEFAULT_CRYPTO@/lib$(XMLSEC_CRYPTO_LIB).la \
|
||||
$(NULL)
|
||||
|
||||
CRYPTO_INCLUDES = \
|
||||
$(XMLSEC_CRYPTO_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
CRYPTO_LD_FLAGS = \
|
||||
$(NULL)
|
||||
|
||||
CRYPTO_LD_ADD = \
|
||||
$(XMLSEC_CRYPTO_LIBS) \
|
||||
$(CRYPTO_DEPS) \
|
||||
$(NULL)
|
||||
|
||||
else
|
||||
|
||||
CRYPTO_DEPS = \
|
||||
$(NULL)
|
||||
|
||||
CRYPTO_INCLUDES = \
|
||||
-DXMLSEC_CRYPTO_DYNAMIC_LOADING=1
|
||||
$(NULL)
|
||||
|
||||
CRYPTO_LD_FLAGS = \
|
||||
$(NULL)
|
||||
|
||||
CRYPTO_LD_ADD = \
|
||||
$(CRYPTO_DEPS) \
|
||||
$(NULL)
|
||||
|
||||
endif
|
||||
|
||||
AM_CFLAGS = \
|
||||
-DPACKAGE=\"@PACKAGE@\" \
|
||||
-I../include \
|
||||
-I$(top_srcdir)/include \
|
||||
$(XMLSEC_DEFINES) \
|
||||
$(XMLSEC_APP_DEFINES) \
|
||||
$(CRYPTO_INCLUDES) \
|
||||
$(LIBXSLT_CFLAGS) \
|
||||
$(LIBXML_CFLAGS) \
|
||||
$(XMLSEC_DL_INCLUDES) \
|
||||
$(NULL)
|
||||
|
||||
# xmlsec command line utility
|
||||
xmlsec1_SOURCES = \
|
||||
xmlsec.c \
|
||||
crypto.c crypto.h \
|
||||
cmdline.c cmdline.h \
|
||||
$(NULL)
|
||||
|
||||
|
||||
xmlsec1_LDFLAGS = \
|
||||
@XMLSEC_STATIC_BINARIES@ \
|
||||
$(CRYPTO_LD_FLAGS) \
|
||||
$(NULL)
|
||||
|
||||
xmlsec1_LDADD = \
|
||||
$(LIBXSLT_LIBS) \
|
||||
$(LIBXML_LIBS) \
|
||||
$(CRYPTO_LD_ADD) \
|
||||
$(XMLSEC_LIBS) \
|
||||
$(XMLSEC_DL_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
xmlsec1_DEPENDENCIES = \
|
||||
$(CRYPTO_DEPS) \
|
||||
$(XMLSEC_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
@ -1,819 +0,0 @@
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = xmlsec1$(EXEEXT)
|
||||
subdir = apps
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am__objects_1 =
|
||||
am_xmlsec1_OBJECTS = xmlsec.$(OBJEXT) crypto.$(OBJEXT) \
|
||||
cmdline.$(OBJEXT) $(am__objects_1)
|
||||
xmlsec1_OBJECTS = $(am_xmlsec1_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/src/@XMLSEC_DEFAULT_CRYPTO@/lib$(XMLSEC_CRYPTO_LIB).la \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(am__DEPENDENCIES_1)
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@ $(am__DEPENDENCIES_1)
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(am__DEPENDENCIES_2) \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(am__DEPENDENCIES_1)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
xmlsec1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(xmlsec1_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(xmlsec1_SOURCES)
|
||||
DIST_SOURCES = $(xmlsec1_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CP = @CP@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
|
||||
GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
|
||||
GCRYPT_LIBS = @GCRYPT_LIBS@
|
||||
GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
|
||||
GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
|
||||
GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
|
||||
GNUTLS_LIBS = @GNUTLS_LIBS@
|
||||
GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
|
||||
GREP = @GREP@
|
||||
GTKDOC_MKDB = @GTKDOC_MKDB@
|
||||
GTKDOC_MKHTML = @GTKDOC_MKHTML@
|
||||
GTKDOC_MKTMPL = @GTKDOC_MKTMPL@
|
||||
GTKDOC_SCAN = @GTKDOC_SCAN@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBXML_CFLAGS = @LIBXML_CFLAGS@
|
||||
LIBXML_CONFIG = @LIBXML_CONFIG@
|
||||
LIBXML_LIBS = @LIBXML_LIBS@
|
||||
LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
|
||||
LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
|
||||
LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
|
||||
LIBXSLT_LIBS = @LIBXSLT_LIBS@
|
||||
LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
|
||||
LIBXSLT_PC_FILE_COND = @LIBXSLT_PC_FILE_COND@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN2HTML = @MAN2HTML@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
|
||||
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
|
||||
MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
|
||||
MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
|
||||
MV = @MV@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
|
||||
NSPR_PACKAGE = @NSPR_PACKAGE@
|
||||
NSS_CFLAGS = @NSS_CFLAGS@
|
||||
NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
|
||||
NSS_LIBS = @NSS_LIBS@
|
||||
NSS_MIN_VERSION = @NSS_MIN_VERSION@
|
||||
NSS_PACKAGE = @NSS_PACKAGE@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
|
||||
OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
|
||||
OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||
OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RM = @RM@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TAR = @TAR@
|
||||
VERSION = @VERSION@
|
||||
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
|
||||
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
|
||||
XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
|
||||
XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
|
||||
XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
|
||||
XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
|
||||
XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
|
||||
XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
|
||||
XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
|
||||
XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
|
||||
XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
|
||||
XMLSEC_DEFAULT_CRYPTO = @XMLSEC_DEFAULT_CRYPTO@
|
||||
XMLSEC_DEFINES = @XMLSEC_DEFINES@
|
||||
XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
|
||||
XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
|
||||
XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
|
||||
XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
|
||||
XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
|
||||
XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
|
||||
XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
|
||||
XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
|
||||
XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
|
||||
XMLSEC_LIBS = $(top_builddir)/src/libxmlsec1.la
|
||||
XMLSEC_NO_AES = @XMLSEC_NO_AES@
|
||||
XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
|
||||
XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
|
||||
XMLSEC_NO_DES = @XMLSEC_NO_DES@
|
||||
XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
|
||||
XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
|
||||
XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
|
||||
XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
|
||||
XMLSEC_NO_GOST2012 = @XMLSEC_NO_GOST2012@
|
||||
XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
|
||||
XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
|
||||
XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
|
||||
XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
|
||||
XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
|
||||
XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
|
||||
XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
|
||||
XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
|
||||
XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
|
||||
XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
|
||||
XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
|
||||
XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
|
||||
XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
|
||||
XMLSEC_NO_X509 = @XMLSEC_NO_X509@
|
||||
XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
|
||||
XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
|
||||
XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
|
||||
XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
|
||||
XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
|
||||
XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
|
||||
XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
|
||||
XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
|
||||
XMLSEC_VERSION = @XMLSEC_VERSION@
|
||||
XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
|
||||
XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
|
||||
XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
|
||||
XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
|
||||
XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
NULL =
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@CRYPTO_DEPS = \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@ $(NULL)
|
||||
|
||||
|
||||
# check if we use dynamic loading for xmlsec-crypto or not
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@CRYPTO_DEPS = \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(top_builddir)/src/@XMLSEC_DEFAULT_CRYPTO@/lib$(XMLSEC_CRYPTO_LIB).la \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(NULL)
|
||||
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@CRYPTO_INCLUDES = \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@ -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1
|
||||
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@CRYPTO_INCLUDES = \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(XMLSEC_CRYPTO_CFLAGS) \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(NULL)
|
||||
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@CRYPTO_LD_FLAGS = \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@ $(NULL)
|
||||
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@CRYPTO_LD_FLAGS = \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(NULL)
|
||||
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@CRYPTO_LD_ADD = \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@ $(CRYPTO_DEPS) \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@ $(NULL)
|
||||
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@CRYPTO_LD_ADD = \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(XMLSEC_CRYPTO_LIBS) \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(CRYPTO_DEPS) \
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_TRUE@ $(NULL)
|
||||
|
||||
AM_CFLAGS = \
|
||||
-DPACKAGE=\"@PACKAGE@\" \
|
||||
-I../include \
|
||||
-I$(top_srcdir)/include \
|
||||
$(XMLSEC_DEFINES) \
|
||||
$(XMLSEC_APP_DEFINES) \
|
||||
$(CRYPTO_INCLUDES) \
|
||||
$(LIBXSLT_CFLAGS) \
|
||||
$(LIBXML_CFLAGS) \
|
||||
$(XMLSEC_DL_INCLUDES) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
# xmlsec command line utility
|
||||
xmlsec1_SOURCES = \
|
||||
xmlsec.c \
|
||||
crypto.c crypto.h \
|
||||
cmdline.c cmdline.h \
|
||||
$(NULL)
|
||||
|
||||
xmlsec1_LDFLAGS = \
|
||||
@XMLSEC_STATIC_BINARIES@ \
|
||||
$(CRYPTO_LD_FLAGS) \
|
||||
$(NULL)
|
||||
|
||||
xmlsec1_LDADD = \
|
||||
$(LIBXSLT_LIBS) \
|
||||
$(LIBXML_LIBS) \
|
||||
$(CRYPTO_LD_ADD) \
|
||||
$(XMLSEC_LIBS) \
|
||||
$(XMLSEC_DL_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
xmlsec1_DEPENDENCIES = \
|
||||
$(CRYPTO_DEPS) \
|
||||
$(XMLSEC_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu apps/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu apps/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
xmlsec1$(EXEEXT): $(xmlsec1_OBJECTS) $(xmlsec1_DEPENDENCIES) $(EXTRA_xmlsec1_DEPENDENCIES)
|
||||
@rm -f xmlsec1$(EXEEXT)
|
||||
$(AM_V_CCLD)$(xmlsec1_LINK) $(xmlsec1_OBJECTS) $(xmlsec1_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdline.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlsec.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
|
||||
clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
|
||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
@XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING_FALSE@ $(NULL)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@ -1,353 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* XMLSec library
|
||||
*
|
||||
*
|
||||
* See Copyright for the status of this software.
|
||||
*
|
||||
* Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
|
||||
*/
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "cmdline.h"
|
||||
|
||||
static int xmlSecAppCmdLineMatchParam (const char* argvParam,
|
||||
const char* paramName,
|
||||
int canHaveNameString);
|
||||
static xmlSecAppCmdLineParamPtr xmlSecAppCmdLineParamsListFind (xmlSecAppCmdLineParamPtr* params,
|
||||
xmlSecAppCmdLineParamTopic topics,
|
||||
const char* name);
|
||||
static int xmlSecAppCmdLineParamRead (xmlSecAppCmdLineParamPtr param,
|
||||
const char** argv,
|
||||
int argc,
|
||||
int pos);
|
||||
static int xmlSecAppCmdLineTimeParamRead (const char* str,
|
||||
time_t* t);
|
||||
|
||||
int
|
||||
xmlSecAppCmdLineParamIsSet(xmlSecAppCmdLineParamPtr param) {
|
||||
return(((param != NULL) && (param->value != NULL)) ? 1 : 0);
|
||||
}
|
||||
|
||||
const char*
|
||||
xmlSecAppCmdLineParamGetString(xmlSecAppCmdLineParamPtr param) {
|
||||
if(param->type != xmlSecAppCmdLineParamTypeString) {
|
||||
fprintf(stderr, "Error: parameter \"%s\" is not string.\n", param->fullName);
|
||||
return(NULL);
|
||||
}
|
||||
return((param->value != NULL) ? param->value->strValue : NULL);
|
||||
}
|
||||
|
||||
const char*
|
||||
xmlSecAppCmdLineParamGetStringList(xmlSecAppCmdLineParamPtr param) {
|
||||
if(param->type != xmlSecAppCmdLineParamTypeStringList) {
|
||||
fprintf(stderr, "Error: parameter \"%s\" is not string list.\n", param->fullName);
|
||||
return(NULL);
|
||||
}
|
||||
return((param->value != NULL) ? param->value->strListValue : NULL);
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCmdLineParamGetInt(xmlSecAppCmdLineParamPtr param, int def) {
|
||||
if(param->type != xmlSecAppCmdLineParamTypeNumber) {
|
||||
fprintf(stderr, "Error: parameter \"%s\" is not integer.\n", param->fullName);
|
||||
return(def);
|
||||
}
|
||||
return((param->value != NULL) ? param->value->intValue : def);
|
||||
}
|
||||
|
||||
time_t
|
||||
xmlSecAppCmdLineParamGetTime(xmlSecAppCmdLineParamPtr param, time_t def) {
|
||||
if(param->type != xmlSecAppCmdLineParamTypeTime) {
|
||||
fprintf(stderr, "Error: parameter \"%s\" is not time.\n", param->fullName);
|
||||
return(def);
|
||||
}
|
||||
return((param->value != NULL) ? param->value->timeValue : def);
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCmdLineParamsListParse(xmlSecAppCmdLineParamPtr* params,
|
||||
xmlSecAppCmdLineParamTopic topics,
|
||||
const char** argv, int argc, int pos) {
|
||||
xmlSecAppCmdLineParamPtr param;
|
||||
int ii;
|
||||
int ret;
|
||||
|
||||
assert(params != NULL);
|
||||
assert(argv != NULL);
|
||||
|
||||
while((pos < argc) && (argv[pos][0] == '-') && (strcmp(argv[pos], XMLSEC_STDOUT_FILENAME) != 0)) {
|
||||
param = xmlSecAppCmdLineParamsListFind(params, topics, argv[pos]);
|
||||
if(param == NULL) {
|
||||
fprintf(stderr, "Error: parameter \"%s\" is not supported or the requested\nfeature might have been disabled during compilation.\n", argv[pos]);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
ret = xmlSecAppCmdLineParamRead(param, argv, argc, pos);
|
||||
if(ret < pos) {
|
||||
fprintf(stderr, "Error: failed to parse parameter \"%s\".\n", argv[pos]);
|
||||
return(-1);
|
||||
}
|
||||
pos = ret + 1;
|
||||
}
|
||||
|
||||
/* check that all parameters at the end are filenames */
|
||||
for(ii = pos; (ii < argc); ++ii) {
|
||||
if((argv[ii][0] == '-') && (strcmp(argv[pos], XMLSEC_STDOUT_FILENAME) != 0)) {
|
||||
fprintf(stderr, "Error: filename is expected instead of parameter \"%s\".\n", argv[ii]);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
/* done */
|
||||
return(pos);
|
||||
}
|
||||
|
||||
void
|
||||
xmlSecAppCmdLineParamsListClean(xmlSecAppCmdLineParamPtr* params) {
|
||||
xmlSecAppCmdLineValuePtr tmp;
|
||||
size_t i;
|
||||
|
||||
assert(params != NULL);
|
||||
|
||||
for(i = 0; params[i] != NULL; ++i) {
|
||||
while(params[i]->value != NULL) {
|
||||
tmp = params[i]->value;
|
||||
params[i]->value = params[i]->value->next;
|
||||
xmlSecAppCmdLineValueDestroy(tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xmlSecAppCmdLineParamsListPrint(xmlSecAppCmdLineParamPtr* params,
|
||||
xmlSecAppCmdLineParamTopic topics,
|
||||
FILE* output) {
|
||||
size_t i;
|
||||
|
||||
assert(params != NULL);
|
||||
assert(output != NULL);
|
||||
|
||||
for(i = 0; params[i] != NULL; ++i) {
|
||||
if(((params[i]->topics & topics) != 0) && (params[i]->help != NULL)) {
|
||||
fprintf(output, " %s\n", params[i]->help);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
xmlSecAppCmdLineValuePtr
|
||||
xmlSecAppCmdLineValueCreate(xmlSecAppCmdLineParamPtr param, int pos) {
|
||||
xmlSecAppCmdLineValuePtr value;
|
||||
|
||||
assert(param != NULL);
|
||||
value = (xmlSecAppCmdLineValuePtr) malloc(sizeof(xmlSecAppCmdLineValue));
|
||||
if(value == NULL) {
|
||||
fprintf(stderr, "Error: malloc failed (%d bytes).\n", (int)sizeof(xmlSecAppCmdLineValue));
|
||||
return(NULL);
|
||||
}
|
||||
memset(value, 0, sizeof(xmlSecAppCmdLineValue));
|
||||
|
||||
value->param = param;
|
||||
value->pos = pos;
|
||||
return(value);
|
||||
}
|
||||
|
||||
void
|
||||
xmlSecAppCmdLineValueDestroy(xmlSecAppCmdLineValuePtr value) {
|
||||
assert(value != NULL);
|
||||
|
||||
if(value->strListValue != NULL) {
|
||||
free((void*)value->strListValue);
|
||||
}
|
||||
free(value);
|
||||
}
|
||||
|
||||
static int
|
||||
xmlSecAppCmdLineMatchParam(const char* argvParam, const char* paramName,
|
||||
int canHaveNameString) {
|
||||
assert(argvParam != NULL);
|
||||
assert(paramName != NULL);
|
||||
|
||||
if(canHaveNameString != 0) {
|
||||
int len = strlen(paramName);
|
||||
|
||||
if((strncmp(argvParam, paramName, len) == 0) &&
|
||||
((argvParam[len] == '\0') || (argvParam[len] == ':'))) {
|
||||
|
||||
return(1);
|
||||
}
|
||||
} else if(strcmp(argvParam, paramName) == 0) {
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static xmlSecAppCmdLineParamPtr
|
||||
xmlSecAppCmdLineParamsListFind(xmlSecAppCmdLineParamPtr* params, xmlSecAppCmdLineParamTopic topics,
|
||||
const char* name) {
|
||||
size_t i;
|
||||
int canHaveNameString;
|
||||
|
||||
assert(params != NULL);
|
||||
assert(name != NULL);
|
||||
|
||||
for(i = 0; params[i] != NULL; ++i) {
|
||||
if((params[i]->topics & topics) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
canHaveNameString = ((params[i]->flags & xmlSecAppCmdLineParamFlagParamNameValue) != 0) ? 1 : 0;
|
||||
if((params[i]->fullName != NULL) &&
|
||||
(xmlSecAppCmdLineMatchParam(name, params[i]->fullName, canHaveNameString) == 1)) {
|
||||
|
||||
return(params[i]);
|
||||
}
|
||||
|
||||
if((params[i]->shortName != NULL) &&
|
||||
(xmlSecAppCmdLineMatchParam(name, params[i]->shortName, canHaveNameString) == 1)) {
|
||||
|
||||
return(params[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
xmlSecAppCmdLineParamRead(xmlSecAppCmdLineParamPtr param, const char** argv, int argc, int pos) {
|
||||
xmlSecAppCmdLineValuePtr value;
|
||||
xmlSecAppCmdLineValuePtr prev = NULL;
|
||||
char* buf;
|
||||
|
||||
assert(param != NULL);
|
||||
assert(argv != NULL);
|
||||
assert(pos < argc);
|
||||
|
||||
/* first find the previous value in the list */
|
||||
if((param->flags & xmlSecAppCmdLineParamFlagMultipleValues) != 0) {
|
||||
prev = param->value;
|
||||
while((prev != NULL) && (prev->next != NULL)) {
|
||||
prev = prev->next;
|
||||
}
|
||||
} else if(param->value != NULL) {
|
||||
fprintf(stderr, "Error: only one parameter \"%s\" is allowed.\n", argv[pos]);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* create new value and add to the list */
|
||||
value = xmlSecAppCmdLineValueCreate(param, pos);
|
||||
if(value == NULL) {
|
||||
fprintf(stderr, "Error: failed to create value for parameter \"%s\".\n", argv[pos]);
|
||||
return(-1);
|
||||
}
|
||||
if(prev != NULL) {
|
||||
assert(prev->next == NULL);
|
||||
prev->next = value;
|
||||
} else {
|
||||
param->value = value;
|
||||
}
|
||||
|
||||
/* if we can have a string value after the name, parse it */
|
||||
if((param->flags & xmlSecAppCmdLineParamFlagParamNameValue) != 0) {
|
||||
value->paramNameValue = strchr(argv[pos], ':');
|
||||
if(value->paramNameValue != NULL) {
|
||||
++value->paramNameValue;
|
||||
}
|
||||
}
|
||||
|
||||
switch(param->type) {
|
||||
case xmlSecAppCmdLineParamTypeFlag:
|
||||
/* do nothing */
|
||||
break;
|
||||
case xmlSecAppCmdLineParamTypeString:
|
||||
if(pos + 1 >= argc) {
|
||||
fprintf(stderr, "Error: string argument expected for parameter \"%s\".\n", argv[pos]);
|
||||
return(-1);
|
||||
}
|
||||
value->strValue = argv[++pos];
|
||||
break;
|
||||
case xmlSecAppCmdLineParamTypeStringList:
|
||||
if(pos + 1 >= argc) {
|
||||
fprintf(stderr, "Error: string list argument expected for parameter \"%s\".\n", argv[pos]);
|
||||
return(-1);
|
||||
}
|
||||
value->strValue = argv[++pos];
|
||||
buf = (char*)malloc(strlen(value->strValue) + 2);
|
||||
if(buf == NULL) {
|
||||
fprintf(stderr, "Error: failed to allocate memory (%d bytes).\n", (int)strlen(value->strValue) + 2);
|
||||
return(-1);
|
||||
}
|
||||
memset(buf, 0, strlen(value->strValue) + 2);
|
||||
memcpy(buf, value->strValue, strlen(value->strValue));
|
||||
value->strListValue = buf;
|
||||
while((*buf) != '\0') {
|
||||
if((*buf) == ',') {
|
||||
(*buf) = '\0';
|
||||
}
|
||||
++buf;
|
||||
}
|
||||
break;
|
||||
case xmlSecAppCmdLineParamTypeNumber:
|
||||
if(pos + 1 >= argc) {
|
||||
fprintf(stderr, "Error: integer argument expected for parameter \"%s\".\n", argv[pos]);
|
||||
return(-1);
|
||||
}
|
||||
value->strValue = argv[++pos];
|
||||
if(sscanf(value->strValue, "%d", &(value->intValue)) != 1) {
|
||||
fprintf(stderr, "Error: integer argument \"%s\" is invalid.\n", value->strValue);
|
||||
return(-1);
|
||||
}
|
||||
break;
|
||||
case xmlSecAppCmdLineParamTypeTime:
|
||||
if(pos + 1 >= argc) {
|
||||
fprintf(stderr, "Error: time argument expected for parameter \"%s\".\n", argv[pos]);
|
||||
return(-1);
|
||||
}
|
||||
value->strValue = argv[++pos];
|
||||
if(xmlSecAppCmdLineTimeParamRead(value->strValue, &(value->timeValue)) < 0) {
|
||||
fprintf(stderr, "Error: time argument \"%s\" is invalid, expected format is \"YYYY-MM-DD HH:MM:SS\").\n", value->strValue);
|
||||
return(-1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return(pos);
|
||||
}
|
||||
|
||||
static int
|
||||
xmlSecAppCmdLineTimeParamRead(const char* str, time_t* t) {
|
||||
struct tm tm;
|
||||
int n;
|
||||
|
||||
if((str == NULL) || (t == NULL)) {
|
||||
return(-1);
|
||||
}
|
||||
memset(&tm, 0, sizeof(tm));
|
||||
tm.tm_isdst = -1;
|
||||
|
||||
n = sscanf(str, "%4d-%2d-%2d%*c%2d:%2d:%2d",
|
||||
&tm.tm_year, &tm.tm_mon, &tm.tm_mday,
|
||||
&tm.tm_hour, &tm.tm_min, &tm.tm_sec);
|
||||
if((n != 6) || (tm.tm_year < 1900)
|
||||
|| (tm.tm_mon < 1) || (tm.tm_mon > 12)
|
||||
|| (tm.tm_mday < 1) || (tm.tm_mday > 31)
|
||||
|| (tm.tm_hour < 0) || (tm.tm_hour > 23)
|
||||
|| (tm.tm_min < 0) || (tm.tm_min > 59)
|
||||
|| (tm.tm_sec < 0) || (tm.tm_sec > 61)) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
tm.tm_year -= 1900; /* tm relative format year */
|
||||
tm.tm_mon -= 1; /* tm relative format month */
|
||||
|
||||
(*t) = mktime(&tm);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@ -1,91 +0,0 @@
|
||||
/**
|
||||
* XMLSec library
|
||||
*
|
||||
* Command line parsing routines
|
||||
*
|
||||
* See Copyright for the status of this software.
|
||||
*
|
||||
* Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
|
||||
*/
|
||||
#ifndef __XMLSEC_APPS_CMDLINE_H__
|
||||
#define __XMLSEC_APPS_CMDLINE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <time.h>
|
||||
|
||||
typedef struct _xmlSecAppCmdLineParam xmlSecAppCmdLineParam,
|
||||
*xmlSecAppCmdLineParamPtr;
|
||||
typedef struct _xmlSecAppCmdLineValue xmlSecAppCmdLineValue,
|
||||
*xmlSecAppCmdLineValuePtr;
|
||||
typedef unsigned int xmlSecAppCmdLineParamTopic;
|
||||
|
||||
#define xmlSecAppCmdLineParamFlagNone 0x0000
|
||||
#define xmlSecAppCmdLineParamFlagParamNameValue 0x0001
|
||||
#define xmlSecAppCmdLineParamFlagMultipleValues 0x0002
|
||||
|
||||
#define XMLSEC_STDOUT_FILENAME "-"
|
||||
|
||||
typedef enum {
|
||||
xmlSecAppCmdLineParamTypeFlag,
|
||||
xmlSecAppCmdLineParamTypeString,
|
||||
xmlSecAppCmdLineParamTypeStringList,
|
||||
xmlSecAppCmdLineParamTypeNumber,
|
||||
xmlSecAppCmdLineParamTypeTime
|
||||
} xmlSecAppCmdLineParamType;
|
||||
|
||||
struct _xmlSecAppCmdLineParam {
|
||||
xmlSecAppCmdLineParamTopic topics;
|
||||
const char* fullName;
|
||||
const char* shortName;
|
||||
const char* help;
|
||||
xmlSecAppCmdLineParamType type;
|
||||
int flags;
|
||||
xmlSecAppCmdLineValuePtr value;
|
||||
};
|
||||
|
||||
int xmlSecAppCmdLineParamIsSet (xmlSecAppCmdLineParamPtr param);
|
||||
const char* xmlSecAppCmdLineParamGetString (xmlSecAppCmdLineParamPtr param);
|
||||
const char* xmlSecAppCmdLineParamGetStringList (xmlSecAppCmdLineParamPtr param);
|
||||
int xmlSecAppCmdLineParamGetInt (xmlSecAppCmdLineParamPtr param,
|
||||
int def);
|
||||
time_t xmlSecAppCmdLineParamGetTime (xmlSecAppCmdLineParamPtr param,
|
||||
time_t def);
|
||||
|
||||
int xmlSecAppCmdLineParamsListParse (xmlSecAppCmdLineParamPtr* params,
|
||||
xmlSecAppCmdLineParamTopic topcis,
|
||||
const char** argv,
|
||||
int argc,
|
||||
int pos);
|
||||
void xmlSecAppCmdLineParamsListClean (xmlSecAppCmdLineParamPtr* params);
|
||||
void xmlSecAppCmdLineParamsListPrint (xmlSecAppCmdLineParamPtr* params,
|
||||
xmlSecAppCmdLineParamTopic topic,
|
||||
FILE* output);
|
||||
|
||||
struct _xmlSecAppCmdLineValue {
|
||||
xmlSecAppCmdLineParamPtr param;
|
||||
int pos;
|
||||
const char* paramNameValue;
|
||||
const char* strValue;
|
||||
const char* strListValue;
|
||||
int intValue;
|
||||
time_t timeValue;
|
||||
xmlSecAppCmdLineValuePtr next;
|
||||
};
|
||||
|
||||
|
||||
xmlSecAppCmdLineValuePtr xmlSecAppCmdLineValueCreate (xmlSecAppCmdLineParamPtr param,
|
||||
int pos);
|
||||
void xmlSecAppCmdLineValueDestroy (xmlSecAppCmdLineValuePtr value);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __XMLSEC_APPS_CMDLINE_H__ */
|
||||
|
||||
|
||||
|
||||
@ -1,396 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* XMLSec library
|
||||
*
|
||||
*
|
||||
* See Copyright for the status of this software.
|
||||
*
|
||||
* Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
|
||||
*/
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <xmlsec/xmlsec.h>
|
||||
#include <xmlsec/keys.h>
|
||||
#include <xmlsec/transforms.h>
|
||||
#include <xmlsec/errors.h>
|
||||
|
||||
#include "crypto.h"
|
||||
|
||||
int
|
||||
xmlSecAppCryptoInit(const char* config) {
|
||||
if(xmlSecCryptoAppInit(config) < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppInit",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
return(-1);
|
||||
}
|
||||
if(xmlSecCryptoInit() < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoInit",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCryptoShutdown(void) {
|
||||
if(xmlSecCryptoShutdown() < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoShutdown",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if(xmlSecCryptoAppShutdown() < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppShutdown",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
return(-1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCryptoSimpleKeysMngrInit(xmlSecKeysMngrPtr mngr) {
|
||||
xmlSecAssert2(mngr != NULL, -1);
|
||||
|
||||
return(xmlSecCryptoAppDefaultKeysMngrInit(mngr));
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCryptoSimpleKeysMngrLoad(xmlSecKeysMngrPtr mngr, const char *filename) {
|
||||
xmlSecAssert2(mngr != NULL, -1);
|
||||
xmlSecAssert2(filename != NULL, -1);
|
||||
|
||||
return(xmlSecCryptoAppDefaultKeysMngrLoad(mngr, filename));
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCryptoSimpleKeysMngrSave(xmlSecKeysMngrPtr mngr, const char *filename, xmlSecKeyDataType type) {
|
||||
xmlSecAssert2(mngr != NULL, -1);
|
||||
xmlSecAssert2(filename != NULL, -1);
|
||||
|
||||
return(xmlSecCryptoAppDefaultKeysMngrSave(mngr, filename, type));
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCryptoSimpleKeysMngrCertLoad(xmlSecKeysMngrPtr mngr, const char *filename,
|
||||
xmlSecKeyDataFormat format, xmlSecKeyDataType type) {
|
||||
xmlSecAssert2(mngr != NULL, -1);
|
||||
xmlSecAssert2(filename != NULL, -1);
|
||||
|
||||
#ifndef XMLSEC_NO_X509
|
||||
return(xmlSecCryptoAppKeysMngrCertLoad(mngr, filename, format, type));
|
||||
#else /* XMLSEC_NO_X509 */
|
||||
return(-1);
|
||||
#endif /* XMLSEC_NO_X509 */
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad(xmlSecKeysMngrPtr mngr,
|
||||
const char* files, const char* pwd,
|
||||
const char* name,
|
||||
xmlSecKeyDataFormat format) {
|
||||
xmlSecKeyPtr key;
|
||||
int ret;
|
||||
|
||||
xmlSecAssert2(mngr != NULL, -1);
|
||||
xmlSecAssert2(files != NULL, -1);
|
||||
|
||||
/* first is the key file */
|
||||
key = xmlSecCryptoAppKeyLoad(files, format, pwd,
|
||||
xmlSecCryptoAppGetDefaultPwdCallback(), (void*)files);
|
||||
if(key == NULL) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppKeyLoad",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"uri=%s",
|
||||
xmlSecErrorsSafeString(files));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if(name != NULL) {
|
||||
ret = xmlSecKeySetName(key, BAD_CAST name);
|
||||
if(ret < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecKeySetName",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"name=%s",
|
||||
xmlSecErrorsSafeString(name));
|
||||
xmlSecKeyDestroy(key);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef XMLSEC_NO_X509
|
||||
for(files += strlen(files) + 1; (files[0] != '\0'); files += strlen(files) + 1) {
|
||||
ret = xmlSecCryptoAppKeyCertLoad(key, files, format);
|
||||
if(ret < 0){
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppKeyCertLoad",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"uri=%s",
|
||||
xmlSecErrorsSafeString(files));
|
||||
xmlSecKeyDestroy(key);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
#else /* XMLSEC_NO_X509 */
|
||||
files += strlen(files) + 1;
|
||||
if(files[0] != '\0') {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"x509",
|
||||
XMLSEC_ERRORS_R_DISABLED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
return(-1);
|
||||
}
|
||||
#endif /* XMLSEC_NO_X509 */
|
||||
|
||||
ret = xmlSecCryptoAppDefaultKeysMngrAdoptKey(mngr, key);
|
||||
if(ret < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppDefaultKeysMngrAdoptKey",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
xmlSecKeyDestroy(key);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
xmlSecAppCryptoSimpleKeysMngrPkcs12KeyLoad(xmlSecKeysMngrPtr mngr, const char *filename, const char* pwd, const char *name) {
|
||||
xmlSecKeyPtr key;
|
||||
int ret;
|
||||
|
||||
xmlSecAssert2(mngr != NULL, -1);
|
||||
xmlSecAssert2(filename != NULL, -1);
|
||||
|
||||
#ifndef XMLSEC_NO_X509
|
||||
key = xmlSecCryptoAppKeyLoad(filename, xmlSecKeyDataFormatPkcs12, pwd,
|
||||
xmlSecCryptoAppGetDefaultPwdCallback(), (void*)filename);
|
||||
if(key == NULL) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppKeyLoad",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"filename=%s",
|
||||
xmlSecErrorsSafeString(filename));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if(name != NULL) {
|
||||
ret = xmlSecKeySetName(key, BAD_CAST name);
|
||||
if(ret < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecKeySetName",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"name=%s",
|
||||
xmlSecErrorsSafeString(name));
|
||||
xmlSecKeyDestroy(key);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
ret = xmlSecCryptoAppDefaultKeysMngrAdoptKey(mngr, key);
|
||||
if(ret < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppDefaultKeysMngrAdoptKey",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
xmlSecKeyDestroy(key);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return(0);
|
||||
#else /* XMLSEC_NO_X509 */
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"x509",
|
||||
XMLSEC_ERRORS_R_DISABLED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
return(-1);
|
||||
#endif /* XMLSEC_NO_X509 */
|
||||
}
|
||||
|
||||
int
|
||||
xmlSecAppCryptoSimpleKeysMngrBinaryKeyLoad(xmlSecKeysMngrPtr mngr, const char* keyKlass, const char *filename, const char *name) {
|
||||
xmlSecKeyPtr key;
|
||||
xmlSecKeyDataId dataId;
|
||||
int ret;
|
||||
|
||||
xmlSecAssert2(mngr != NULL, -1);
|
||||
xmlSecAssert2(keyKlass != NULL, -1);
|
||||
xmlSecAssert2(filename != NULL, -1);
|
||||
|
||||
/* find requested data */
|
||||
dataId = xmlSecKeyDataIdListFindByName(xmlSecKeyDataIdsGet(), BAD_CAST keyKlass,
|
||||
xmlSecKeyDataUsageAny);
|
||||
if(dataId == xmlSecKeyDataIdUnknown) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecKeyDataIdListFindByName",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"name=%s",
|
||||
xmlSecErrorsSafeString(keyKlass));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
key = xmlSecKeyReadBinaryFile(dataId, filename);
|
||||
if(key == NULL) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecKeyReadBinaryFile",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
ret = xmlSecKeySetName(key, BAD_CAST name);
|
||||
if(ret < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecKeySetName",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"name=%s",
|
||||
xmlSecErrorsSafeString(name));
|
||||
xmlSecKeyDestroy(key);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* finally add it to keys manager */
|
||||
ret = xmlSecCryptoAppDefaultKeysMngrAdoptKey(mngr, key);
|
||||
if(ret < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppDefaultKeysMngrAdoptKey",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
xmlSecKeyDestroy(key);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
xmlSecAppCryptoSimpleKeysMngrKeyGenerate(xmlSecKeysMngrPtr mngr, const char* keyKlassAndSize, const char* name) {
|
||||
xmlSecKeyPtr key;
|
||||
int ret;
|
||||
|
||||
xmlSecAssert2(mngr != NULL, -1);
|
||||
xmlSecAssert2(keyKlassAndSize != NULL, -1);
|
||||
|
||||
key = xmlSecAppCryptoKeyGenerate(keyKlassAndSize, name, xmlSecKeyDataTypePermanent);
|
||||
if(key == NULL) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecAppCryptoSimpleKeysMngrKeyGenerate",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"name=%s",
|
||||
xmlSecErrorsSafeString(name));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
ret = xmlSecCryptoAppDefaultKeysMngrAdoptKey(mngr, key);
|
||||
if(ret < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecCryptoAppDefaultKeysMngrAdoptKey",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
XMLSEC_ERRORS_NO_MESSAGE);
|
||||
xmlSecKeyDestroy(key);
|
||||
return(-1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
xmlSecKeyPtr
|
||||
xmlSecAppCryptoKeyGenerate(const char* keyKlassAndSize, const char* name, xmlSecKeyDataType type) {
|
||||
xmlSecKeyPtr key;
|
||||
char* buf;
|
||||
char* p;
|
||||
int size;
|
||||
int ret;
|
||||
|
||||
xmlSecAssert2(keyKlassAndSize != NULL, NULL);
|
||||
|
||||
buf = (char*) xmlStrdup(BAD_CAST keyKlassAndSize);
|
||||
if(buf == NULL) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
NULL,
|
||||
XMLSEC_ERRORS_R_STRDUP_FAILED,
|
||||
"name=%s",
|
||||
xmlSecErrorsSafeString(name));
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/* separate key klass and size */
|
||||
p = strchr(buf, '-');
|
||||
if(p == NULL) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
NULL,
|
||||
XMLSEC_ERRORS_R_INVALID_DATA,
|
||||
"key size is not specified %s",
|
||||
xmlSecErrorsSafeString(buf));
|
||||
xmlFree(buf);
|
||||
return(NULL);
|
||||
}
|
||||
*(p++) = '\0';
|
||||
size = atoi(p);
|
||||
|
||||
key = xmlSecKeyGenerateByName(BAD_CAST buf, size, type);
|
||||
if(key == NULL) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecKeyGenerate",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"klass=%s;size=%d",
|
||||
xmlSecErrorsSafeString(buf),
|
||||
size);
|
||||
xmlFree(buf);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
ret = xmlSecKeySetName(key, BAD_CAST name);
|
||||
if(ret < 0) {
|
||||
xmlSecError(XMLSEC_ERRORS_HERE,
|
||||
NULL,
|
||||
"xmlSecKeySetName",
|
||||
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
||||
"name=\"%s\"",
|
||||
xmlSecErrorsSafeString(name));
|
||||
xmlSecKeyDestroy(key);
|
||||
xmlFree(buf);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
xmlFree(buf);
|
||||
return(key);
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/**
|
||||
* XMLSec library
|
||||
*
|
||||
*
|
||||
* See Copyright for the status of this software.
|
||||
*
|
||||
* Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
|
||||
*/
|
||||
#ifndef __XMLSEC_APPS_CRYPTO_H__
|
||||
#define __XMLSEC_APPS_CRYPTO_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libxml/tree.h>
|
||||
#include <xmlsec/xmlsec.h>
|
||||
#include <xmlsec/keys.h>
|
||||
#include <xmlsec/keyinfo.h>
|
||||
#include <xmlsec/keysmngr.h>
|
||||
#include <xmlsec/crypto.h>
|
||||
|
||||
int xmlSecAppCryptoInit (const char* config);
|
||||
int xmlSecAppCryptoShutdown (void);
|
||||
|
||||
xmlSecKeyPtr xmlSecAppCryptoKeyGenerate (const char* keyKlassAndSize,
|
||||
const char* name,
|
||||
xmlSecKeyDataType type);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Simple keys manager
|
||||
*
|
||||
****************************************************************************/
|
||||
int xmlSecAppCryptoSimpleKeysMngrInit (xmlSecKeysMngrPtr mngr);
|
||||
int xmlSecAppCryptoSimpleKeysMngrLoad (xmlSecKeysMngrPtr mngr,
|
||||
const char *filename);
|
||||
int xmlSecAppCryptoSimpleKeysMngrSave (xmlSecKeysMngrPtr mngr,
|
||||
const char *filename,
|
||||
xmlSecKeyDataType type);
|
||||
int xmlSecAppCryptoSimpleKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
|
||||
const char *filename,
|
||||
xmlSecKeyDataFormat format,
|
||||
xmlSecKeyDataType type);
|
||||
int xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad (xmlSecKeysMngrPtr mngr,
|
||||
const char *files,
|
||||
const char* pwd,
|
||||
const char* name,
|
||||
xmlSecKeyDataFormat format);
|
||||
int xmlSecAppCryptoSimpleKeysMngrPkcs12KeyLoad (xmlSecKeysMngrPtr mngr,
|
||||
const char *filename,
|
||||
const char* pwd,
|
||||
const char *name);
|
||||
int xmlSecAppCryptoSimpleKeysMngrBinaryKeyLoad (xmlSecKeysMngrPtr mngr,
|
||||
const char* keyKlass,
|
||||
const char* filename,
|
||||
const char *name);
|
||||
int xmlSecAppCryptoSimpleKeysMngrKeyGenerate (xmlSecKeysMngrPtr mngr,
|
||||
const char* keyKlassAndSize,
|
||||
const char* name);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __XMLSEC_APPS_CRYPTO_H__ */
|
||||
|
||||
|
||||
|
||||
@ -1,347 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
1420
DesktopEditor/xmlsec/xmlsec/config.guess
vendored
@ -1,131 +0,0 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <ansidecl.h> header file. */
|
||||
#undef HAVE_ANSIDECL_H
|
||||
|
||||
/* Define to 1 if you have the <ctype.h> header file. */
|
||||
#undef HAVE_CTYPE_H
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the `fprintf' function. */
|
||||
#undef HAVE_FPRINTF
|
||||
|
||||
/* Define to 1 if you have the <gnutls/gnutls.h> header file. */
|
||||
#undef HAVE_GNUTLS_GNUTLS_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the `printf' function. */
|
||||
#undef HAVE_PRINTF
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `sprintf' function. */
|
||||
#undef HAVE_SPRINTF
|
||||
|
||||
/* Define to 1 if you have the `sscanf' function. */
|
||||
#undef HAVE_SSCANF
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#undef HAVE_STRRCHR
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the `timegm' function. */
|
||||
#undef HAVE_TIMEGM
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `vfprintf' function. */
|
||||
#undef HAVE_VFPRINTF
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `vsprintf' function. */
|
||||
#undef HAVE_VSPRINTF
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SIZE_T
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
1799
DesktopEditor/xmlsec/xmlsec/config.sub
vendored
18960
DesktopEditor/xmlsec/xmlsec/configure
vendored
@ -1,791 +0,0 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
@ -1,108 +0,0 @@
|
||||
NULL =
|
||||
|
||||
SUBDIRS=api
|
||||
|
||||
TARGET_DIR=@XMLSEC_DOCDIR@
|
||||
|
||||
EXTRA_DIST=\
|
||||
$(builddir)/images \
|
||||
$(builddir)/*.html \
|
||||
$(builddir)/*.ico \
|
||||
$(builddir)/xmlsec.xsl \
|
||||
$(NULL)
|
||||
|
||||
XMLSEC1_MAN=$(top_builddir)/man/xmlsec1.1
|
||||
XMLSEC_HTML=$(builddir)/xmlsec-man.html
|
||||
|
||||
all: docs
|
||||
|
||||
# docs is legacy
|
||||
docs: docs-copy man-docs docs-format
|
||||
|
||||
docs-copy:
|
||||
@( \
|
||||
echo "Copying docs..."; \
|
||||
if [ z"$(srcdir)" != z"$(builddir)" ]; \
|
||||
then \
|
||||
$(CP) -ru $(srcdir)/*.html $(srcdir)/*.ico $(srcdir)/images $(builddir)/ ; \
|
||||
chmod u+w $(builddir)/*.html ; \
|
||||
chmod u+w $(builddir)/*.ico ; \
|
||||
chmod -R u+w $(builddir)/images ; \
|
||||
fi \
|
||||
)
|
||||
|
||||
# if we build docs then we also have xsltproc
|
||||
if BUILD_MAN_DOCS
|
||||
man-docs: $(XMLSEC_HTML) docs-copy
|
||||
|
||||
$(XMLSEC_HTML): docs-copy $(XMLSEC1_MAN)
|
||||
$(MAN2HTML) $(XMLSEC1_MAN) | \
|
||||
grep -v '^Content-type: text/html' | \
|
||||
tr "[:cntrl:]" " " > \
|
||||
$(XMLSEC_HTML)
|
||||
else
|
||||
# do nothing, we aready copied this file
|
||||
man-docs:
|
||||
|
||||
endif
|
||||
|
||||
if HAS_XSLTPROC
|
||||
docs-format:
|
||||
@(echo "Formatting html documents"; \
|
||||
for i in `find $(builddir) -name "*.html" -print`; \
|
||||
do \
|
||||
top_folder=`echo $$i | sed 's#/[^/]*$$#/#' | sed 's#\./##' | \
|
||||
sed 's#[^/]*/#../#g'`; \
|
||||
echo "Processing $$i (topfolder='$$top_folder')"; \
|
||||
$(XSLTPROC) --html --stringparam topfolder "$$top_folder" \
|
||||
--output $$i.tmp $(srcdir)/xmlsec.xsl $$i; \
|
||||
if [ $$? != 0 ]; \
|
||||
then \
|
||||
echo "ERROR: processing file $$i"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
mv $$i.tmp $$i; \
|
||||
done)
|
||||
@(echo "Cleaning html documents"; \
|
||||
for i in `find $(builddir) -name "*.html" -print`; \
|
||||
do \
|
||||
echo Cleaning $$i ; \
|
||||
sed 's/\xA0/ /g' $$i > $$i.tmp ; \
|
||||
mv $$i.tmp $$i ; \
|
||||
done)
|
||||
else
|
||||
# do nothing
|
||||
docs-format:
|
||||
|
||||
endif
|
||||
|
||||
clean-local:
|
||||
-rm -f *.stamp
|
||||
( if [ z"$(srcdir)" != z"$(builddir)" ] ; then \
|
||||
chmod -R u+w $(builddir)/images && rm -rf $(builddir)/images ; \
|
||||
chmod -R u+w $(builddir)/src && rm -rf $(builddir)/src ; \
|
||||
(for i in `find $(builddir) -name "*.html" -print` ; do \
|
||||
echo "Removing files '$$i' ... " ; \
|
||||
chmod -R u+w $$i && rm -f $$i ; \
|
||||
done ) ; \
|
||||
(for i in `find $(builddir) -name "*.ico" -print` ; do \
|
||||
echo "Removing files '$$i' ... " ; \
|
||||
chmod -R u+w $$i && rm -f $$i ; \
|
||||
done ) ; \
|
||||
fi ; )
|
||||
|
||||
distclean-local: clean-local
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/images
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/api
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/api/images
|
||||
-@INSTALL@ -m 0644 $(builddir)/*.html $(DESTDIR)$(TARGET_DIR)
|
||||
-@INSTALL@ -m 0644 $(builddir)/*.ico $(DESTDIR)$(TARGET_DIR)
|
||||
-@INSTALL@ -m 0644 $(builddir)/images/*.gif $(builddir)/images/*.png $(DESTDIR)$(TARGET_DIR)/images
|
||||
-@INSTALL@ -m 0644 $(builddir)/api/*.html $(builddir)/api/*.png $(builddir)/api/*.sgml $(DESTDIR)$(TARGET_DIR)/api
|
||||
-@INSTALL@ -m 0644 $(builddir)/api/images/*.png $(DESTDIR)$(TARGET_DIR)/api/images
|
||||
|
||||
uninstall-local:
|
||||
@rm -rf $(DESTDIR)$(TARGET_DIR)
|
||||
@ -1,820 +0,0 @@
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = docs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
distdir
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CP = @CP@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
|
||||
GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
|
||||
GCRYPT_LIBS = @GCRYPT_LIBS@
|
||||
GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
|
||||
GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
|
||||
GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
|
||||
GNUTLS_LIBS = @GNUTLS_LIBS@
|
||||
GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
|
||||
GREP = @GREP@
|
||||
GTKDOC_MKDB = @GTKDOC_MKDB@
|
||||
GTKDOC_MKHTML = @GTKDOC_MKHTML@
|
||||
GTKDOC_MKTMPL = @GTKDOC_MKTMPL@
|
||||
GTKDOC_SCAN = @GTKDOC_SCAN@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBXML_CFLAGS = @LIBXML_CFLAGS@
|
||||
LIBXML_CONFIG = @LIBXML_CONFIG@
|
||||
LIBXML_LIBS = @LIBXML_LIBS@
|
||||
LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
|
||||
LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
|
||||
LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
|
||||
LIBXSLT_LIBS = @LIBXSLT_LIBS@
|
||||
LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
|
||||
LIBXSLT_PC_FILE_COND = @LIBXSLT_PC_FILE_COND@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN2HTML = @MAN2HTML@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
|
||||
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
|
||||
MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
|
||||
MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
|
||||
MV = @MV@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
|
||||
NSPR_PACKAGE = @NSPR_PACKAGE@
|
||||
NSS_CFLAGS = @NSS_CFLAGS@
|
||||
NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
|
||||
NSS_LIBS = @NSS_LIBS@
|
||||
NSS_MIN_VERSION = @NSS_MIN_VERSION@
|
||||
NSS_PACKAGE = @NSS_PACKAGE@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
|
||||
OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
|
||||
OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||
OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RM = @RM@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TAR = @TAR@
|
||||
VERSION = @VERSION@
|
||||
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
|
||||
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
|
||||
XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
|
||||
XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
|
||||
XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
|
||||
XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
|
||||
XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
|
||||
XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
|
||||
XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
|
||||
XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
|
||||
XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
|
||||
XMLSEC_DEFAULT_CRYPTO = @XMLSEC_DEFAULT_CRYPTO@
|
||||
XMLSEC_DEFINES = @XMLSEC_DEFINES@
|
||||
XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
|
||||
XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
|
||||
XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
|
||||
XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
|
||||
XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
|
||||
XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
|
||||
XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
|
||||
XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
|
||||
XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
|
||||
XMLSEC_LIBS = @XMLSEC_LIBS@
|
||||
XMLSEC_NO_AES = @XMLSEC_NO_AES@
|
||||
XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
|
||||
XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
|
||||
XMLSEC_NO_DES = @XMLSEC_NO_DES@
|
||||
XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
|
||||
XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
|
||||
XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
|
||||
XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
|
||||
XMLSEC_NO_GOST2012 = @XMLSEC_NO_GOST2012@
|
||||
XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
|
||||
XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
|
||||
XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
|
||||
XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
|
||||
XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
|
||||
XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
|
||||
XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
|
||||
XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
|
||||
XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
|
||||
XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
|
||||
XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
|
||||
XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
|
||||
XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
|
||||
XMLSEC_NO_X509 = @XMLSEC_NO_X509@
|
||||
XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
|
||||
XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
|
||||
XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
|
||||
XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
|
||||
XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
|
||||
XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
|
||||
XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
|
||||
XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
|
||||
XMLSEC_VERSION = @XMLSEC_VERSION@
|
||||
XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
|
||||
XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
|
||||
XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
|
||||
XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
|
||||
XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
NULL =
|
||||
SUBDIRS = api
|
||||
TARGET_DIR = @XMLSEC_DOCDIR@
|
||||
EXTRA_DIST = \
|
||||
$(builddir)/images \
|
||||
$(builddir)/*.html \
|
||||
$(builddir)/*.ico \
|
||||
$(builddir)/xmlsec.xsl \
|
||||
$(NULL)
|
||||
|
||||
XMLSEC1_MAN = $(top_builddir)/man/xmlsec1.1
|
||||
XMLSEC_HTML = $(builddir)/xmlsec-man.html
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu docs/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-local \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-local
|
||||
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||
check-am clean clean-generic clean-libtool clean-local \
|
||||
cscopelist-am ctags ctags-am distclean distclean-generic \
|
||||
distclean-libtool distclean-local distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-data-local install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags tags-am uninstall uninstall-am uninstall-local
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
all: docs
|
||||
|
||||
# docs is legacy
|
||||
docs: docs-copy man-docs docs-format
|
||||
|
||||
docs-copy:
|
||||
@( \
|
||||
echo "Copying docs..."; \
|
||||
if [ z"$(srcdir)" != z"$(builddir)" ]; \
|
||||
then \
|
||||
$(CP) -ru $(srcdir)/*.html $(srcdir)/*.ico $(srcdir)/images $(builddir)/ ; \
|
||||
chmod u+w $(builddir)/*.html ; \
|
||||
chmod u+w $(builddir)/*.ico ; \
|
||||
chmod -R u+w $(builddir)/images ; \
|
||||
fi \
|
||||
)
|
||||
|
||||
# if we build docs then we also have xsltproc
|
||||
@BUILD_MAN_DOCS_TRUE@man-docs: $(XMLSEC_HTML) docs-copy
|
||||
|
||||
@BUILD_MAN_DOCS_TRUE@$(XMLSEC_HTML): docs-copy $(XMLSEC1_MAN)
|
||||
@BUILD_MAN_DOCS_TRUE@ $(MAN2HTML) $(XMLSEC1_MAN) | \
|
||||
@BUILD_MAN_DOCS_TRUE@ grep -v '^Content-type: text/html' | \
|
||||
@BUILD_MAN_DOCS_TRUE@ tr "[:cntrl:]" " " > \
|
||||
@BUILD_MAN_DOCS_TRUE@ $(XMLSEC_HTML)
|
||||
# do nothing, we aready copied this file
|
||||
@BUILD_MAN_DOCS_FALSE@man-docs:
|
||||
|
||||
@HAS_XSLTPROC_TRUE@docs-format:
|
||||
@HAS_XSLTPROC_TRUE@ @(echo "Formatting html documents"; \
|
||||
@HAS_XSLTPROC_TRUE@ for i in `find $(builddir) -name "*.html" -print`; \
|
||||
@HAS_XSLTPROC_TRUE@ do \
|
||||
@HAS_XSLTPROC_TRUE@ top_folder=`echo $$i | sed 's#/[^/]*$$#/#' | sed 's#\./##' | \
|
||||
@HAS_XSLTPROC_TRUE@ sed 's#[^/]*/#../#g'`; \
|
||||
@HAS_XSLTPROC_TRUE@ echo "Processing $$i (topfolder='$$top_folder')"; \
|
||||
@HAS_XSLTPROC_TRUE@ $(XSLTPROC) --html --stringparam topfolder "$$top_folder" \
|
||||
@HAS_XSLTPROC_TRUE@ --output $$i.tmp $(srcdir)/xmlsec.xsl $$i; \
|
||||
@HAS_XSLTPROC_TRUE@ if [ $$? != 0 ]; \
|
||||
@HAS_XSLTPROC_TRUE@ then \
|
||||
@HAS_XSLTPROC_TRUE@ echo "ERROR: processing file $$i"; \
|
||||
@HAS_XSLTPROC_TRUE@ exit 1; \
|
||||
@HAS_XSLTPROC_TRUE@ fi; \
|
||||
@HAS_XSLTPROC_TRUE@ mv $$i.tmp $$i; \
|
||||
@HAS_XSLTPROC_TRUE@ done)
|
||||
@HAS_XSLTPROC_TRUE@ @(echo "Cleaning html documents"; \
|
||||
@HAS_XSLTPROC_TRUE@ for i in `find $(builddir) -name "*.html" -print`; \
|
||||
@HAS_XSLTPROC_TRUE@ do \
|
||||
@HAS_XSLTPROC_TRUE@ echo Cleaning $$i ; \
|
||||
@HAS_XSLTPROC_TRUE@ sed 's/\xA0/ /g' $$i > $$i.tmp ; \
|
||||
@HAS_XSLTPROC_TRUE@ mv $$i.tmp $$i ; \
|
||||
@HAS_XSLTPROC_TRUE@ done)
|
||||
# do nothing
|
||||
@HAS_XSLTPROC_FALSE@docs-format:
|
||||
|
||||
clean-local:
|
||||
-rm -f *.stamp
|
||||
( if [ z"$(srcdir)" != z"$(builddir)" ] ; then \
|
||||
chmod -R u+w $(builddir)/images && rm -rf $(builddir)/images ; \
|
||||
chmod -R u+w $(builddir)/src && rm -rf $(builddir)/src ; \
|
||||
(for i in `find $(builddir) -name "*.html" -print` ; do \
|
||||
echo "Removing files '$$i' ... " ; \
|
||||
chmod -R u+w $$i && rm -f $$i ; \
|
||||
done ) ; \
|
||||
(for i in `find $(builddir) -name "*.ico" -print` ; do \
|
||||
echo "Removing files '$$i' ... " ; \
|
||||
chmod -R u+w $$i && rm -f $$i ; \
|
||||
done ) ; \
|
||||
fi ; )
|
||||
|
||||
distclean-local: clean-local
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/images
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/api
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/api/images
|
||||
-@INSTALL@ -m 0644 $(builddir)/*.html $(DESTDIR)$(TARGET_DIR)
|
||||
-@INSTALL@ -m 0644 $(builddir)/*.ico $(DESTDIR)$(TARGET_DIR)
|
||||
-@INSTALL@ -m 0644 $(builddir)/images/*.gif $(builddir)/images/*.png $(DESTDIR)$(TARGET_DIR)/images
|
||||
-@INSTALL@ -m 0644 $(builddir)/api/*.html $(builddir)/api/*.png $(builddir)/api/*.sgml $(DESTDIR)$(TARGET_DIR)/api
|
||||
-@INSTALL@ -m 0644 $(builddir)/api/images/*.png $(DESTDIR)$(TARGET_DIR)/api/images
|
||||
|
||||
uninstall-local:
|
||||
@rm -rf $(DESTDIR)$(TARGET_DIR)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@ -1,326 +0,0 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
NULL=
|
||||
MODULE=xmlsec
|
||||
SOURCE_DIR=$(top_srcdir)/src
|
||||
SOURCE_DIR2=$(top_builddir)/src
|
||||
INCLUDE_DIR=$(top_srcdir)/include
|
||||
INCLUDE_DIR2=$(top_builddir)/include
|
||||
|
||||
|
||||
SCAN_DIR=$(builddir)
|
||||
SGML_DIR=$(builddir)/sgml.tmp
|
||||
XML_DIR=$(builddir)/xml.tmp
|
||||
EXAMPLES_DIR=$(SGML_DIR)/examples
|
||||
SOURCE_CODE_DIR=$(builddir)/code
|
||||
|
||||
|
||||
# We need to copy some files to make gkdoc happy that
|
||||
# everything is in one folder
|
||||
TMPL_DIR=$(builddir)/tmpl
|
||||
TMPL_SRC_DIR=$(srcdir)/tmpl
|
||||
|
||||
MAIN_SGML_FILE=$(SGML_DIR)/xmlsec-main.sgml
|
||||
MAIN_SGML_SRC_FILE=$(srcdir)/src/xmlsec.sgml
|
||||
|
||||
SGML_CHAPTERS_DIR=$(SGML_DIR)/chapters
|
||||
SGML_CHAPTERS_SRC_DIR=$(srcdir)/src/chapters
|
||||
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TMPL_DIR) \
|
||||
$(srcdir)/src \
|
||||
$(srcdir)/images \
|
||||
$(NULL)
|
||||
|
||||
SOURCE_FILES_TO_COPY = \
|
||||
$(srcdir)/src \
|
||||
$(srcdir)/images \
|
||||
$(srcdir)/*.html \
|
||||
$(srcdir)/*.png \
|
||||
$(NULL)
|
||||
|
||||
#
|
||||
# We need to pre-process original source files
|
||||
# because gtkdoc does not understand some C features
|
||||
#
|
||||
SOURCE_CODE_FILES=\
|
||||
$(shell find $(SOURCE_DIR) -name '*.c' -print ) \
|
||||
$(shell find $(SOURCE_DIR2) -name '*.c' -print ) \
|
||||
$(shell find $(INCLUDE_DIR) -name '*.h' -a ! -name "symbols.h" -print ) \
|
||||
$(shell find $(INCLUDE_DIR2) -name '*.h' -a ! -name "symbols.h" -print )
|
||||
|
||||
EXAMPLES_SOURCE_DIR=$(top_srcdir)/examples
|
||||
EXAMPLES_SOURCE_FILES=\
|
||||
$(shell find $(EXAMPLES_SOURCE_DIR) -name '*.c' -print) \
|
||||
$(shell find $(EXAMPLES_SOURCE_DIR) -name '*.xml' -print)
|
||||
|
||||
#
|
||||
# This script removes gtkdoc crap from final html
|
||||
#
|
||||
REMOVE_GTKDOCLINK=$(top_srcdir)/scripts/remove-gtkdoclink.pl
|
||||
|
||||
# docs is legacy
|
||||
all: docs
|
||||
|
||||
|
||||
# if build API docs, then we also have xsltproc
|
||||
if BUILD_API_DOCS
|
||||
docs: html-cleanup
|
||||
|
||||
else
|
||||
docs:
|
||||
@( \
|
||||
echo "Copying api-docs..."; \
|
||||
if [ z"$(srcdir)" != z"$(builddir)" ]; \
|
||||
then \
|
||||
$(CP) -ru $(SOURCE_FILES_TO_COPY) $(builddir)/ ; \
|
||||
fi \
|
||||
)
|
||||
endif
|
||||
|
||||
html-cleanup: html
|
||||
( echo "Cleaning up result files"; \
|
||||
$(PERL) $(REMOVE_GTKDOCLINK) `find . -name "*.html" -print` \
|
||||
)
|
||||
|
||||
# need to cleanup "bad" chars
|
||||
html: sgml $(MAIN_SGML_FILE) $(SGML_CHAPTERS_DIR) xmlsec-index
|
||||
$(GTKDOC_MKHTML) xmlsec $(MAIN_SGML_FILE)
|
||||
|
||||
$(SGML_CHAPTERS_DIR): $(SGML_CHAPTERS_SRC_DIR) $(SGML_CHAPTERS_DIR)/.sentinel
|
||||
$(CP) -ru $(SGML_CHAPTERS_SRC_DIR)/* $(SGML_CHAPTERS_DIR)
|
||||
|
||||
$(MAIN_SGML_FILE): $(MAIN_SGML_SRC_FILE)
|
||||
$(CP) -u $(MAIN_SGML_SRC_FILE) $(MAIN_SGML_FILE)
|
||||
#
|
||||
# Prepeare sgml files from sources for each library. We are also
|
||||
# doing some "magic" here by automatically adding links to XML DSig and
|
||||
# XML Enc specification, we also remove "Ptr" from the end of the link
|
||||
# targets to make more references.
|
||||
#
|
||||
# We also fix a bunch of stupid errors from gtkdoc
|
||||
#
|
||||
sgml: sgml-base
|
||||
(for i in `find $(SGML_DIR) -name "*.sgml" -print` ; do \
|
||||
echo "Fixing up '$$i'" ; \
|
||||
cat $$i | \
|
||||
sed 's!\(<dsig:\)\([^/]*\)\(\/>\)!\<dsig:\2\/\>!g' | \
|
||||
sed 's!\(<enc:\)\([^/]*\)\(\/>\)!\<enc:\2\/\>!g' | \
|
||||
sed 's!\(<dsig:\)\(\w*\)\(>\)!\<dsig:\2\/\>!g' | \
|
||||
sed 's!\(<enc:\)\(\w*\)\(>\)!\<enc:\2\/\>!g' | \
|
||||
sed 's!\(<dsig:\)\([^/]*\)\(\/>\)!<ulink URL=\"http://www.w3.org/TR/xmldsig-core/#sec-\2\">\1\2\3</ulink>!g' | \
|
||||
sed 's!\(<enc:\)\([^/]*\)\(\/>\)!<ulink URL=\"http://www.w3.org/TR/xmlenc-core/#sec-\2\">\1\2\3</ulink>!g' | \
|
||||
sed 's!<para \/>!<para></para>!g' | \
|
||||
sed 's!linkend=\"\(.*\)Ptr\"!linkend=\"\1\"!g' | \
|
||||
sed 's!<colspec [^/]*\/>!!g' | \
|
||||
sed 's!<programlisting language="C"!<programlisting!g' | \
|
||||
$(PERL) -pe 's!title>\n!title>!g' | \
|
||||
$(PERL) -pe 's!title>\n!title>!g' | \
|
||||
$(PERL) -pe 's!<\/title><\/refsect1>\n!<\/title><para><\/para><\/refsect1>!g' | \
|
||||
$(PERL) -pe 's!para>\n!para>!g' > \
|
||||
$$i.tmp; \
|
||||
mv -f $$i.tmp $$i; \
|
||||
done);
|
||||
|
||||
sgml-base: templates $(SGML_DIR)/.sentinel
|
||||
$(GTKDOC_MKDB) --module=xmlsec \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-base.sgml \
|
||||
--output-dir=$(SGML_DIR)/ \
|
||||
--tmpl-dir=$(TMPL_DIR)/base \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/base \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/base
|
||||
$(GTKDOC_MKDB) --module=xmlsec-openssl \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-openssl.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/openssl \
|
||||
--output-dir=$(SGML_DIR)/openssl \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/openssl \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/openssl
|
||||
$(GTKDOC_MKDB) --module=xmlsec-gnutls \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-gnutls.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/gnutls \
|
||||
--output-dir=$(SGML_DIR)/gnutls \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/gnutls \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/gnutls
|
||||
$(GTKDOC_MKDB) --module=xmlsec-gcrypt \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-gcrypt.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/gcrypt \
|
||||
--output-dir=$(SGML_DIR)/gcrypt \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/gcrypt \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/gcrypt
|
||||
$(GTKDOC_MKDB) --module=xmlsec-nss \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-nss.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/nss \
|
||||
--output-dir=$(SGML_DIR)/nss \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/nss \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/nss
|
||||
$(GTKDOC_MKDB) --module=xmlsec-mscrypto \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-mscrypto.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/mscrypto \
|
||||
--output-dir=$(SGML_DIR)/mscrypto \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/mscrypto \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/mscrypto
|
||||
|
||||
templates: scan templates-copy
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec \
|
||||
--output-dir=$(TMPL_DIR)/base
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-openssl \
|
||||
--output-dir=$(TMPL_DIR)/openssl
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-gnutls \
|
||||
--output-dir=$(TMPL_DIR)/gnutls
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-gcrypt \
|
||||
--output-dir=$(TMPL_DIR)/gcrypt
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-nss \
|
||||
--output-dir=$(TMPL_DIR)/nss
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-mscrypto \
|
||||
--output-dir=$(TMPL_DIR)/mscrypto
|
||||
|
||||
# make sure to run chmod since we will update templates
|
||||
templates-copy: $(TMPL_SRC_DIR) $(TMPL_DIR)/.sentinel
|
||||
@echo "Copying original template files into '$(TMPL_DIR)' ..."
|
||||
( if [ z"$(TMPL_DIR)" != z"$(TMPL_SRC_DIR)" ] ; then \
|
||||
$(CP) -ru $(TMPL_SRC_DIR)/* $(TMPL_DIR)/ ; \
|
||||
fi ; )
|
||||
chmod -R u+w $(TMPL_DIR)
|
||||
|
||||
scan: SOURCE_CODEs example_sources
|
||||
$(GTKDOC_SCAN) --module=xmlsec \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/base \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/base
|
||||
$(GTKDOC_SCAN) --module=xmlsec-openssl \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/openssl \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/openssl
|
||||
$(GTKDOC_SCAN) --module=xmlsec-gnutls \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/gnutls \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/gnutls
|
||||
$(GTKDOC_SCAN) --module=xmlsec-gcrypt \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/gcrypt \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/gcrypt
|
||||
$(GTKDOC_SCAN) --module=xmlsec-nss \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/nss \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/nss
|
||||
$(GTKDOC_SCAN) --module=xmlsec-mscrypto \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/mscrypto \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/mscrypto
|
||||
|
||||
#
|
||||
# Prepare source files by coping them to "code" folder and
|
||||
# removing XMLSEC_EXPORT_* stuff that makes gtkdoc crazy
|
||||
#
|
||||
SOURCE_CODEs: $(SOURCE_CODE_FILES) $(SOURCE_CODE_DIR)/.sentinel SOURCE_CODEs_cleanup
|
||||
@echo "Preprocessing source files into '$(SOURCE_CODE_DIR)' ..."
|
||||
@mkdir -p $(SOURCE_CODE_DIR)/src/base $(SOURCE_CODE_DIR)/include/xmlsec/base
|
||||
@( \
|
||||
for i in $(SOURCE_CODE_FILES) ; do \
|
||||
folder_name=`echo "$$i" | \
|
||||
sed 's#$(top_srcdir)/##' | \
|
||||
sed 's#$(top_builddir)/##' | \
|
||||
sed 's#/[^/]*$$##'`; \
|
||||
file_name=`echo "$$i" | \
|
||||
sed 's#.*/##'`; \
|
||||
mkdir -p "$(SOURCE_CODE_DIR)/$$folder_name"; \
|
||||
cat "$$i" | \
|
||||
sed 's/#if.*//' | \
|
||||
sed 's/#el.*//' | \
|
||||
sed 's/#end.*//' | \
|
||||
sed 's/XMLSEC_CRYPTO_EXPORT//' | \
|
||||
sed 's/XMLSEC_EXPORT_VAR//' | \
|
||||
sed 's/XMLSEC_EXPORT//' | \
|
||||
sed 's/XMLSEC_ERRORS_PRINTF_ATTRIBUTE//' > \
|
||||
$(SOURCE_CODE_DIR)/$$folder_name/$$file_name; \
|
||||
done);
|
||||
-@mv -f $(SOURCE_CODE_DIR)/src/*.c $(SOURCE_CODE_DIR)/src/base
|
||||
-@mv -f $(SOURCE_CODE_DIR)/include/xmlsec/*.h $(SOURCE_CODE_DIR)/include/xmlsec/base
|
||||
-@rm -f $(SOURCE_CODE_DIR)/include/xmlsec/*/symbols.h
|
||||
|
||||
SOURCE_CODEs_cleanup: $(SOURCE_CODE_DIR)/.sentinel
|
||||
@rm -rf $(SOURCE_CODE_DIR)/*
|
||||
|
||||
#
|
||||
# Create index for all functions. For macros and defines need to add -CAPS suffix
|
||||
#
|
||||
xmlsec-index: scan $(SGML_DIR)/.sentinel
|
||||
@grep -h '<NAME>.*</NAME>' $(SCAN_DIR)/xmlsec-*decl.txt | \
|
||||
grep -v '<NAME>extern</NAME>' | \
|
||||
sort -u | \
|
||||
sed 's#_#-#g' | \
|
||||
sed 's#<NAME>\([^-]*\)-\([^<]*\)</NAME>#<listitem><para><link linkend=\"\1-\2-CAPS\">\1-\2</link></para></listitem>#g' | \
|
||||
sed 's#<NAME>\([^<]*\)</NAME>#<listitem><para><link linkend=\"\1\">\1</link></para></listitem>#g' > \
|
||||
$(SGML_DIR)/xmlsec-index.sgml
|
||||
|
||||
#
|
||||
# The following code converts C example file to sgml RefEntry files.
|
||||
# We get file title from a string "XML Security Library example: ..."
|
||||
# which is usually placed at the top of the file. Also all "unsafe" xml
|
||||
# characters (<, >, &) are escaped.
|
||||
#
|
||||
example_sources: $(EXAMPLES_DIR)/.sentinel
|
||||
@echo "Preprocessing example source files into '$(EXAMPLES_DIR)' ..."
|
||||
@rm -rf $(EXAMPLES_DIR)/*
|
||||
@(for i in $(EXAMPLES_SOURCE_FILES) ; do \
|
||||
file_name=`echo $$i | sed 's#.*/##' | sed 's#\..*$$##'`; \
|
||||
file_ext=`echo $$i | sed 's#.*/##' | sed 's#.*\.##'`; \
|
||||
echo Converting $$file_name.$$file_ext to $$file_name.sgml ...; \
|
||||
file_title=`cat $$i | grep 'XML Security Library example: ' | sed 's#^.*: *##'`; \
|
||||
echo "<sect2 id=\"xmlsec-example-$$file_name\" >" > \
|
||||
$(EXAMPLES_DIR)/$$file_name.sgml; \
|
||||
echo "<title>$$file_name.$$file_ext</title><para><informalexample><programlisting>" >> \
|
||||
$(EXAMPLES_DIR)/$$file_name.sgml; \
|
||||
cat $$i | \
|
||||
sed "s#&#\&#g" | \
|
||||
sed "s#<#\<#g" | \
|
||||
sed "s#>#\>#g" >> \
|
||||
$(EXAMPLES_DIR)/$$file_name.sgml; \
|
||||
echo "</programlisting></informalexample></para></sect2>" >> \
|
||||
$(EXAMPLES_DIR)/$$file_name.sgml; \
|
||||
done);
|
||||
|
||||
# A single pattern rule will create all appropriate folders as required
|
||||
# otherwise make (annoyingly) deletes it
|
||||
.PRECIOUS: %/.sentinel
|
||||
%/.sentinel:
|
||||
@echo "Creating folder '${@D}' ..."
|
||||
mkdir -p ${@D}
|
||||
touch $@
|
||||
|
||||
dist-hook:
|
||||
@cp -p $(srcdir)/*.html $(srcdir)/*.png $(distdir)/
|
||||
(for i in `find $(distdir) -name ".sentinel" -print` ; do \
|
||||
echo "Removing some files '$$i' before dist ... " ; \
|
||||
rm $$i ; \
|
||||
done )
|
||||
(for i in `find $(distdir) -name "*.sgml.bak" -print` ; do \
|
||||
echo "Removing some files '$$i' before dist ... " ; \
|
||||
rm "$$i" ; \
|
||||
done ; )
|
||||
|
||||
clean-local:
|
||||
-rm -rf $(SOURCE_CODE_DIR) $(EXAMPLES_DIR) $(SCAN_DIR)/*.txt $(SGML_DIR) $(XML_DIR)
|
||||
-rm -f *.stamp *.types *.css index.sgml
|
||||
( if [ z"$(TMPL_SRC_DIR)" != z"$(TMPL_DIR)" ] && [ -d "$(TMPL_DIR)" ] ; then \
|
||||
chmod -R u+w $(TMPL_DIR) && rm -rf $(TMPL_DIR) ; \
|
||||
fi ; )
|
||||
( if [ z"$(builddir)" != z"$(srcdir)" ] ; then \
|
||||
chmod -R u+w $(builddir)/src && rm -rf $(builddir)/src ; \
|
||||
chmod -R u+w $(builddir)/images && rm -rf $(builddir)/images ; \
|
||||
chmod -R u+w $(builddir)/*.png && rm -rf $(builddir)/*.png ; \
|
||||
fi ; )
|
||||
|
||||
distclean-local: clean-local
|
||||
|
||||
maintainer-clean-local: clean-local
|
||||
-rm -f *.html
|
||||
|
||||
@ -1,861 +0,0 @@
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = docs/api
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CP = @CP@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
|
||||
GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
|
||||
GCRYPT_LIBS = @GCRYPT_LIBS@
|
||||
GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
|
||||
GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
|
||||
GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
|
||||
GNUTLS_LIBS = @GNUTLS_LIBS@
|
||||
GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
|
||||
GREP = @GREP@
|
||||
GTKDOC_MKDB = @GTKDOC_MKDB@
|
||||
GTKDOC_MKHTML = @GTKDOC_MKHTML@
|
||||
GTKDOC_MKTMPL = @GTKDOC_MKTMPL@
|
||||
GTKDOC_SCAN = @GTKDOC_SCAN@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBXML_CFLAGS = @LIBXML_CFLAGS@
|
||||
LIBXML_CONFIG = @LIBXML_CONFIG@
|
||||
LIBXML_LIBS = @LIBXML_LIBS@
|
||||
LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
|
||||
LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
|
||||
LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
|
||||
LIBXSLT_LIBS = @LIBXSLT_LIBS@
|
||||
LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
|
||||
LIBXSLT_PC_FILE_COND = @LIBXSLT_PC_FILE_COND@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN2HTML = @MAN2HTML@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
|
||||
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
|
||||
MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
|
||||
MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
|
||||
MV = @MV@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
|
||||
NSPR_PACKAGE = @NSPR_PACKAGE@
|
||||
NSS_CFLAGS = @NSS_CFLAGS@
|
||||
NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
|
||||
NSS_LIBS = @NSS_LIBS@
|
||||
NSS_MIN_VERSION = @NSS_MIN_VERSION@
|
||||
NSS_PACKAGE = @NSS_PACKAGE@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
|
||||
OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
|
||||
OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||
OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RM = @RM@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TAR = @TAR@
|
||||
VERSION = @VERSION@
|
||||
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
|
||||
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
|
||||
XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
|
||||
XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
|
||||
XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
|
||||
XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
|
||||
XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
|
||||
XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
|
||||
XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
|
||||
XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
|
||||
XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
|
||||
XMLSEC_DEFAULT_CRYPTO = @XMLSEC_DEFAULT_CRYPTO@
|
||||
XMLSEC_DEFINES = @XMLSEC_DEFINES@
|
||||
XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
|
||||
XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
|
||||
XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
|
||||
XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
|
||||
XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
|
||||
XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
|
||||
XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
|
||||
XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
|
||||
XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
|
||||
XMLSEC_LIBS = @XMLSEC_LIBS@
|
||||
XMLSEC_NO_AES = @XMLSEC_NO_AES@
|
||||
XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
|
||||
XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
|
||||
XMLSEC_NO_DES = @XMLSEC_NO_DES@
|
||||
XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
|
||||
XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
|
||||
XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
|
||||
XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
|
||||
XMLSEC_NO_GOST2012 = @XMLSEC_NO_GOST2012@
|
||||
XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
|
||||
XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
|
||||
XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
|
||||
XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
|
||||
XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
|
||||
XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
|
||||
XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
|
||||
XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
|
||||
XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
|
||||
XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
|
||||
XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
|
||||
XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
|
||||
XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
|
||||
XMLSEC_NO_X509 = @XMLSEC_NO_X509@
|
||||
XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
|
||||
XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
|
||||
XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
|
||||
XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
|
||||
XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
|
||||
XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
|
||||
XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
|
||||
XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
|
||||
XMLSEC_VERSION = @XMLSEC_VERSION@
|
||||
XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
|
||||
XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
|
||||
XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
|
||||
XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
|
||||
XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
NULL =
|
||||
MODULE = xmlsec
|
||||
SOURCE_DIR = $(top_srcdir)/src
|
||||
SOURCE_DIR2 = $(top_builddir)/src
|
||||
INCLUDE_DIR = $(top_srcdir)/include
|
||||
INCLUDE_DIR2 = $(top_builddir)/include
|
||||
SCAN_DIR = $(builddir)
|
||||
SGML_DIR = $(builddir)/sgml.tmp
|
||||
XML_DIR = $(builddir)/xml.tmp
|
||||
EXAMPLES_DIR = $(SGML_DIR)/examples
|
||||
SOURCE_CODE_DIR = $(builddir)/code
|
||||
|
||||
# We need to copy some files to make gkdoc happy that
|
||||
# everything is in one folder
|
||||
TMPL_DIR = $(builddir)/tmpl
|
||||
TMPL_SRC_DIR = $(srcdir)/tmpl
|
||||
MAIN_SGML_FILE = $(SGML_DIR)/xmlsec-main.sgml
|
||||
MAIN_SGML_SRC_FILE = $(srcdir)/src/xmlsec.sgml
|
||||
SGML_CHAPTERS_DIR = $(SGML_DIR)/chapters
|
||||
SGML_CHAPTERS_SRC_DIR = $(srcdir)/src/chapters
|
||||
EXTRA_DIST = \
|
||||
$(TMPL_DIR) \
|
||||
$(srcdir)/src \
|
||||
$(srcdir)/images \
|
||||
$(NULL)
|
||||
|
||||
SOURCE_FILES_TO_COPY = \
|
||||
$(srcdir)/src \
|
||||
$(srcdir)/images \
|
||||
$(srcdir)/*.html \
|
||||
$(srcdir)/*.png \
|
||||
$(NULL)
|
||||
|
||||
|
||||
#
|
||||
# We need to pre-process original source files
|
||||
# because gtkdoc does not understand some C features
|
||||
#
|
||||
SOURCE_CODE_FILES = \
|
||||
$(shell find $(SOURCE_DIR) -name '*.c' -print ) \
|
||||
$(shell find $(SOURCE_DIR2) -name '*.c' -print ) \
|
||||
$(shell find $(INCLUDE_DIR) -name '*.h' -a ! -name "symbols.h" -print ) \
|
||||
$(shell find $(INCLUDE_DIR2) -name '*.h' -a ! -name "symbols.h" -print )
|
||||
|
||||
EXAMPLES_SOURCE_DIR = $(top_srcdir)/examples
|
||||
EXAMPLES_SOURCE_FILES = \
|
||||
$(shell find $(EXAMPLES_SOURCE_DIR) -name '*.c' -print) \
|
||||
$(shell find $(EXAMPLES_SOURCE_DIR) -name '*.xml' -print)
|
||||
|
||||
|
||||
#
|
||||
# This script removes gtkdoc crap from final html
|
||||
#
|
||||
REMOVE_GTKDOCLINK = $(top_srcdir)/scripts/remove-gtkdoclink.pl
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/api/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu docs/api/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-local
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic \
|
||||
maintainer-clean-local
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
clean-local cscopelist-am ctags-am dist-hook distclean \
|
||||
distclean-generic distclean-libtool distclean-local distdir \
|
||||
dvi dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-local mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# docs is legacy
|
||||
all: docs
|
||||
|
||||
# if build API docs, then we also have xsltproc
|
||||
@BUILD_API_DOCS_TRUE@docs: html-cleanup
|
||||
|
||||
@BUILD_API_DOCS_FALSE@docs:
|
||||
@BUILD_API_DOCS_FALSE@ @( \
|
||||
@BUILD_API_DOCS_FALSE@ echo "Copying api-docs..."; \
|
||||
@BUILD_API_DOCS_FALSE@ if [ z"$(srcdir)" != z"$(builddir)" ]; \
|
||||
@BUILD_API_DOCS_FALSE@ then \
|
||||
@BUILD_API_DOCS_FALSE@ $(CP) -ru $(SOURCE_FILES_TO_COPY) $(builddir)/ ; \
|
||||
@BUILD_API_DOCS_FALSE@ fi \
|
||||
@BUILD_API_DOCS_FALSE@ )
|
||||
|
||||
html-cleanup: html
|
||||
( echo "Cleaning up result files"; \
|
||||
$(PERL) $(REMOVE_GTKDOCLINK) `find . -name "*.html" -print` \
|
||||
)
|
||||
|
||||
# need to cleanup "bad" chars
|
||||
html: sgml $(MAIN_SGML_FILE) $(SGML_CHAPTERS_DIR) xmlsec-index
|
||||
$(GTKDOC_MKHTML) xmlsec $(MAIN_SGML_FILE)
|
||||
|
||||
$(SGML_CHAPTERS_DIR): $(SGML_CHAPTERS_SRC_DIR) $(SGML_CHAPTERS_DIR)/.sentinel
|
||||
$(CP) -ru $(SGML_CHAPTERS_SRC_DIR)/* $(SGML_CHAPTERS_DIR)
|
||||
|
||||
$(MAIN_SGML_FILE): $(MAIN_SGML_SRC_FILE)
|
||||
$(CP) -u $(MAIN_SGML_SRC_FILE) $(MAIN_SGML_FILE)
|
||||
#
|
||||
# Prepeare sgml files from sources for each library. We are also
|
||||
# doing some "magic" here by automatically adding links to XML DSig and
|
||||
# XML Enc specification, we also remove "Ptr" from the end of the link
|
||||
# targets to make more references.
|
||||
#
|
||||
# We also fix a bunch of stupid errors from gtkdoc
|
||||
#
|
||||
sgml: sgml-base
|
||||
(for i in `find $(SGML_DIR) -name "*.sgml" -print` ; do \
|
||||
echo "Fixing up '$$i'" ; \
|
||||
cat $$i | \
|
||||
sed 's!\(<dsig:\)\([^/]*\)\(\/>\)!\<dsig:\2\/\>!g' | \
|
||||
sed 's!\(<enc:\)\([^/]*\)\(\/>\)!\<enc:\2\/\>!g' | \
|
||||
sed 's!\(<dsig:\)\(\w*\)\(>\)!\<dsig:\2\/\>!g' | \
|
||||
sed 's!\(<enc:\)\(\w*\)\(>\)!\<enc:\2\/\>!g' | \
|
||||
sed 's!\(<dsig:\)\([^/]*\)\(\/>\)!<ulink URL=\"http://www.w3.org/TR/xmldsig-core/#sec-\2\">\1\2\3</ulink>!g' | \
|
||||
sed 's!\(<enc:\)\([^/]*\)\(\/>\)!<ulink URL=\"http://www.w3.org/TR/xmlenc-core/#sec-\2\">\1\2\3</ulink>!g' | \
|
||||
sed 's!<para \/>!<para></para>!g' | \
|
||||
sed 's!linkend=\"\(.*\)Ptr\"!linkend=\"\1\"!g' | \
|
||||
sed 's!<colspec [^/]*\/>!!g' | \
|
||||
sed 's!<programlisting language="C"!<programlisting!g' | \
|
||||
$(PERL) -pe 's!title>\n!title>!g' | \
|
||||
$(PERL) -pe 's!title>\n!title>!g' | \
|
||||
$(PERL) -pe 's!<\/title><\/refsect1>\n!<\/title><para><\/para><\/refsect1>!g' | \
|
||||
$(PERL) -pe 's!para>\n!para>!g' > \
|
||||
$$i.tmp; \
|
||||
mv -f $$i.tmp $$i; \
|
||||
done);
|
||||
|
||||
sgml-base: templates $(SGML_DIR)/.sentinel
|
||||
$(GTKDOC_MKDB) --module=xmlsec \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-base.sgml \
|
||||
--output-dir=$(SGML_DIR)/ \
|
||||
--tmpl-dir=$(TMPL_DIR)/base \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/base \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/base
|
||||
$(GTKDOC_MKDB) --module=xmlsec-openssl \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-openssl.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/openssl \
|
||||
--output-dir=$(SGML_DIR)/openssl \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/openssl \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/openssl
|
||||
$(GTKDOC_MKDB) --module=xmlsec-gnutls \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-gnutls.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/gnutls \
|
||||
--output-dir=$(SGML_DIR)/gnutls \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/gnutls \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/gnutls
|
||||
$(GTKDOC_MKDB) --module=xmlsec-gcrypt \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-gcrypt.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/gcrypt \
|
||||
--output-dir=$(SGML_DIR)/gcrypt \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/gcrypt \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/gcrypt
|
||||
$(GTKDOC_MKDB) --module=xmlsec-nss \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-nss.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/nss \
|
||||
--output-dir=$(SGML_DIR)/nss \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/nss \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/nss
|
||||
$(GTKDOC_MKDB) --module=xmlsec-mscrypto \
|
||||
--main-sgml-file=$(SGML_DIR)/xmlsec-mscrypto.sgml \
|
||||
--tmpl-dir=$(TMPL_DIR)/mscrypto \
|
||||
--output-dir=$(SGML_DIR)/mscrypto \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/mscrypto \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/mscrypto
|
||||
|
||||
templates: scan templates-copy
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec \
|
||||
--output-dir=$(TMPL_DIR)/base
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-openssl \
|
||||
--output-dir=$(TMPL_DIR)/openssl
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-gnutls \
|
||||
--output-dir=$(TMPL_DIR)/gnutls
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-gcrypt \
|
||||
--output-dir=$(TMPL_DIR)/gcrypt
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-nss \
|
||||
--output-dir=$(TMPL_DIR)/nss
|
||||
$(GTKDOC_MKTMPL) --module=xmlsec-mscrypto \
|
||||
--output-dir=$(TMPL_DIR)/mscrypto
|
||||
|
||||
# make sure to run chmod since we will update templates
|
||||
templates-copy: $(TMPL_SRC_DIR) $(TMPL_DIR)/.sentinel
|
||||
@echo "Copying original template files into '$(TMPL_DIR)' ..."
|
||||
( if [ z"$(TMPL_DIR)" != z"$(TMPL_SRC_DIR)" ] ; then \
|
||||
$(CP) -ru $(TMPL_SRC_DIR)/* $(TMPL_DIR)/ ; \
|
||||
fi ; )
|
||||
chmod -R u+w $(TMPL_DIR)
|
||||
|
||||
scan: SOURCE_CODEs example_sources
|
||||
$(GTKDOC_SCAN) --module=xmlsec \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/base \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/base
|
||||
$(GTKDOC_SCAN) --module=xmlsec-openssl \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/openssl \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/openssl
|
||||
$(GTKDOC_SCAN) --module=xmlsec-gnutls \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/gnutls \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/gnutls
|
||||
$(GTKDOC_SCAN) --module=xmlsec-gcrypt \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/gcrypt \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/gcrypt
|
||||
$(GTKDOC_SCAN) --module=xmlsec-nss \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/nss \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/nss
|
||||
$(GTKDOC_SCAN) --module=xmlsec-mscrypto \
|
||||
--rebuild-sections \
|
||||
--output-dir=$(SCAN_DIR) \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/src/mscrypto \
|
||||
--source-dir=$(SOURCE_CODE_DIR)/include/xmlsec/mscrypto
|
||||
|
||||
#
|
||||
# Prepare source files by coping them to "code" folder and
|
||||
# removing XMLSEC_EXPORT_* stuff that makes gtkdoc crazy
|
||||
#
|
||||
SOURCE_CODEs: $(SOURCE_CODE_FILES) $(SOURCE_CODE_DIR)/.sentinel SOURCE_CODEs_cleanup
|
||||
@echo "Preprocessing source files into '$(SOURCE_CODE_DIR)' ..."
|
||||
@mkdir -p $(SOURCE_CODE_DIR)/src/base $(SOURCE_CODE_DIR)/include/xmlsec/base
|
||||
@( \
|
||||
for i in $(SOURCE_CODE_FILES) ; do \
|
||||
folder_name=`echo "$$i" | \
|
||||
sed 's#$(top_srcdir)/##' | \
|
||||
sed 's#$(top_builddir)/##' | \
|
||||
sed 's#/[^/]*$$##'`; \
|
||||
file_name=`echo "$$i" | \
|
||||
sed 's#.*/##'`; \
|
||||
mkdir -p "$(SOURCE_CODE_DIR)/$$folder_name"; \
|
||||
cat "$$i" | \
|
||||
sed 's/#if.*//' | \
|
||||
sed 's/#el.*//' | \
|
||||
sed 's/#end.*//' | \
|
||||
sed 's/XMLSEC_CRYPTO_EXPORT//' | \
|
||||
sed 's/XMLSEC_EXPORT_VAR//' | \
|
||||
sed 's/XMLSEC_EXPORT//' | \
|
||||
sed 's/XMLSEC_ERRORS_PRINTF_ATTRIBUTE//' > \
|
||||
$(SOURCE_CODE_DIR)/$$folder_name/$$file_name; \
|
||||
done);
|
||||
-@mv -f $(SOURCE_CODE_DIR)/src/*.c $(SOURCE_CODE_DIR)/src/base
|
||||
-@mv -f $(SOURCE_CODE_DIR)/include/xmlsec/*.h $(SOURCE_CODE_DIR)/include/xmlsec/base
|
||||
-@rm -f $(SOURCE_CODE_DIR)/include/xmlsec/*/symbols.h
|
||||
|
||||
SOURCE_CODEs_cleanup: $(SOURCE_CODE_DIR)/.sentinel
|
||||
@rm -rf $(SOURCE_CODE_DIR)/*
|
||||
|
||||
#
|
||||
# Create index for all functions. For macros and defines need to add -CAPS suffix
|
||||
#
|
||||
xmlsec-index: scan $(SGML_DIR)/.sentinel
|
||||
@grep -h '<NAME>.*</NAME>' $(SCAN_DIR)/xmlsec-*decl.txt | \
|
||||
grep -v '<NAME>extern</NAME>' | \
|
||||
sort -u | \
|
||||
sed 's#_#-#g' | \
|
||||
sed 's#<NAME>\([^-]*\)-\([^<]*\)</NAME>#<listitem><para><link linkend=\"\1-\2-CAPS\">\1-\2</link></para></listitem>#g' | \
|
||||
sed 's#<NAME>\([^<]*\)</NAME>#<listitem><para><link linkend=\"\1\">\1</link></para></listitem>#g' > \
|
||||
$(SGML_DIR)/xmlsec-index.sgml
|
||||
|
||||
#
|
||||
# The following code converts C example file to sgml RefEntry files.
|
||||
# We get file title from a string "XML Security Library example: ..."
|
||||
# which is usually placed at the top of the file. Also all "unsafe" xml
|
||||
# characters (<, >, &) are escaped.
|
||||
#
|
||||
example_sources: $(EXAMPLES_DIR)/.sentinel
|
||||
@echo "Preprocessing example source files into '$(EXAMPLES_DIR)' ..."
|
||||
@rm -rf $(EXAMPLES_DIR)/*
|
||||
@(for i in $(EXAMPLES_SOURCE_FILES) ; do \
|
||||
file_name=`echo $$i | sed 's#.*/##' | sed 's#\..*$$##'`; \
|
||||
file_ext=`echo $$i | sed 's#.*/##' | sed 's#.*\.##'`; \
|
||||
echo Converting $$file_name.$$file_ext to $$file_name.sgml ...; \
|
||||
file_title=`cat $$i | grep 'XML Security Library example: ' | sed 's#^.*: *##'`; \
|
||||
echo "<sect2 id=\"xmlsec-example-$$file_name\" >" > \
|
||||
$(EXAMPLES_DIR)/$$file_name.sgml; \
|
||||
echo "<title>$$file_name.$$file_ext</title><para><informalexample><programlisting>" >> \
|
||||
$(EXAMPLES_DIR)/$$file_name.sgml; \
|
||||
cat $$i | \
|
||||
sed "s#&#\&#g" | \
|
||||
sed "s#<#\<#g" | \
|
||||
sed "s#>#\>#g" >> \
|
||||
$(EXAMPLES_DIR)/$$file_name.sgml; \
|
||||
echo "</programlisting></informalexample></para></sect2>" >> \
|
||||
$(EXAMPLES_DIR)/$$file_name.sgml; \
|
||||
done);
|
||||
|
||||
# A single pattern rule will create all appropriate folders as required
|
||||
# otherwise make (annoyingly) deletes it
|
||||
.PRECIOUS: %/.sentinel
|
||||
%/.sentinel:
|
||||
@echo "Creating folder '${@D}' ..."
|
||||
mkdir -p ${@D}
|
||||
touch $@
|
||||
|
||||
dist-hook:
|
||||
@cp -p $(srcdir)/*.html $(srcdir)/*.png $(distdir)/
|
||||
(for i in `find $(distdir) -name ".sentinel" -print` ; do \
|
||||
echo "Removing some files '$$i' before dist ... " ; \
|
||||
rm $$i ; \
|
||||
done )
|
||||
(for i in `find $(distdir) -name "*.sgml.bak" -print` ; do \
|
||||
echo "Removing some files '$$i' before dist ... " ; \
|
||||
rm "$$i" ; \
|
||||
done ; )
|
||||
|
||||
clean-local:
|
||||
-rm -rf $(SOURCE_CODE_DIR) $(EXAMPLES_DIR) $(SCAN_DIR)/*.txt $(SGML_DIR) $(XML_DIR)
|
||||
-rm -f *.stamp *.types *.css index.sgml
|
||||
( if [ z"$(TMPL_SRC_DIR)" != z"$(TMPL_DIR)" ] && [ -d "$(TMPL_DIR)" ] ; then \
|
||||
chmod -R u+w $(TMPL_DIR) && rm -rf $(TMPL_DIR) ; \
|
||||
fi ; )
|
||||
( if [ z"$(builddir)" != z"$(srcdir)" ] ; then \
|
||||
chmod -R u+w $(builddir)/src && rm -rf $(builddir)/src ; \
|
||||
chmod -R u+w $(builddir)/images && rm -rf $(builddir)/images ; \
|
||||
chmod -R u+w $(builddir)/*.png && rm -rf $(builddir)/*.png ; \
|
||||
fi ; )
|
||||
|
||||
distclean-local: clean-local
|
||||
|
||||
maintainer-clean-local: clean-local
|
||||
-rm -f *.html
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
Before Width: | Height: | Size: 169 B |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
@ -1,330 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>XML Security Library Reference Manual</title>
|
||||
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
|
||||
<link rel="NEXT" title="XML Security Library Tutorial" href="xmlsec-notes.html">
|
||||
<style type="text/css">.synopsis, .classsynopsis {
|
||||
background: #eeeeee;
|
||||
border: solid 1px #aaaaaa;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.programlisting {
|
||||
background: #eeeeff;
|
||||
border: solid 1px #aaaaff;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.variablelist {
|
||||
padding: 4px;
|
||||
margin-left: 3em;
|
||||
}
|
||||
.navigation {
|
||||
background: #ffeeee;
|
||||
border: solid 1px #ffaaaa;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.navigation a {
|
||||
color: #770000;
|
||||
}
|
||||
.navigation a:visited {
|
||||
color: #550000;
|
||||
}
|
||||
.navigation .title {
|
||||
font-size: 200%;
|
||||
}</style>
|
||||
<style type="text/css">
|
||||
table.CALSTABLE > tbody > tr:nth-child(1) > td:nth-child(1) {
|
||||
width: 20em;
|
||||
}
|
||||
.synopsis, .classsynopsis {
|
||||
background: #eeeeee;
|
||||
border: solid 1px #aaaaaa;
|
||||
}
|
||||
.programlisting {
|
||||
background: #eeeeee;
|
||||
border: solid 1px #000000;
|
||||
}
|
||||
.navigation {
|
||||
background: #eeeeee;
|
||||
border: solid 1px #000000;
|
||||
}
|
||||
.navigation a {
|
||||
color: initial;
|
||||
}
|
||||
.navigation a:visited {
|
||||
color: initial;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body><table width="100%" valign="top"><tr valign="top">
|
||||
<td valign="top" align="left" width="210">
|
||||
<img src="../images/logo.gif" alt="XML Security Library" border="0"><p></p>
|
||||
<ul>
|
||||
<li><a href="../index.html">Home</a></li>
|
||||
<li><a href="../download.html">Download</a></li>
|
||||
<li><a href="../news.html">News</a></li>
|
||||
<li><a href="../documentation.html">Documentation</a></li>
|
||||
<ul>
|
||||
<li><a href="../faq.html">FAQ</a></li>
|
||||
<li><a href="../api/xmlsec-notes.html">Tutorial</a></li>
|
||||
<li><a href="../api/xmlsec-reference.html">API reference</a></li>
|
||||
<li><a href="../api/xmlsec-examples.html">Examples</a></li>
|
||||
</ul>
|
||||
<li><a href="../xmldsig.html">XML Digital Signature</a></li>
|
||||
<ul><li><a href="http://www.aleksey.com/xmlsec/xmldsig-verifier.html">Online Verifier</a></li></ul>
|
||||
<li><a href="../xmlenc.html">XML Encryption</a></li>
|
||||
<li><a href="../c14n.html">XML Canonicalization</a></li>
|
||||
<li><a href="../bugs.html">Reporting Bugs</a></li>
|
||||
<li><a href="http://www.aleksey.com/pipermail/xmlsec">Mailing list</a></li>
|
||||
<li><a href="../related.html">Related</a></li>
|
||||
<li><a href="../authors.html">Authors</a></li>
|
||||
</ul>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="15"></td>
|
||||
<td><a href="http://xmlsoft.org/"><img src="../images/libxml2-logo.png" alt="LibXML2" border="0"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15"></td>
|
||||
<td><a href="http://xmlsoft.org/XSLT"><img src="../images/libxslt-logo.png" alt="LibXSLT" border="0"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15"></td>
|
||||
<td><a href="http://www.openssl.org/"><img src="../images/openssl-logo.png" alt="OpenSSL" border="0"></a></td>
|
||||
</tr>
|
||||
<!--Links - start--><!--Links - end-->
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top"><table width="100%" valign="top"><tr><td valign="top" align="left" id="xmlsecContent">
|
||||
<div class="BOOK">
|
||||
<div class="TITLEPAGE">
|
||||
<table class="navigation" width="100%" cellpadding="2" cellspacing="0"><tr><th align="center" valign="MIDDLE"><p class="TITLE">XML Security Library Reference Manual<a name="AEN2"></a></p></th></tr></table>
|
||||
<h3 class="AUTHOR">
|
||||
<a name="AEN5"></a>Aleksey Sanin</h3>
|
||||
<div class="AFFILIATION"><div class="ADDRESS"><p class="ADDRESS"> <code class="EMAIL"><<a href="mailto:aleksey@aleksey.com">aleksey@aleksey.com</a>></code><br>
|
||||
</p></div></div>
|
||||
<p class="COPYRIGHT">Copyright <20> 2002-2003 Aleksey Sanin</p>
|
||||
<div><div class="ABSTRACT">
|
||||
<p></p>
|
||||
<a name="AEN18"></a><p>This manual documents the interfaces of the xmlsec
|
||||
library and has some short notes to help get you up to speed
|
||||
with using the library.</p>
|
||||
<p></p>
|
||||
</div></div>
|
||||
<div class="LEGALNOTICE">
|
||||
<p></p>
|
||||
<a name="AEN14"></a><p>Permission is granted to make and distribute verbatim
|
||||
copies of this manual provided the copyright notice and this
|
||||
permission notice are preserved on all copies.</p>
|
||||
<p>Permission is granted to copy and distribute modified
|
||||
versions of this manual under the conditions for verbatim
|
||||
copying, provided also that the entire resulting derived work is
|
||||
distributed under the terms of a permission notice identical to
|
||||
this one.</p>
|
||||
<p>Permission is granted to copy and distribute translations
|
||||
of this manual into another language, under the above conditions
|
||||
for modified versions.</p>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TOC"><dl>
|
||||
<dt><b>Table of Contents</b></dt>
|
||||
<dt>I. <a href="xmlsec-notes.html">XML Security Library Tutorial</a>
|
||||
</dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-notes-overview.html">Overview.</a></dt>
|
||||
<dt><a href="xmlsec-notes-structure.html">XML Security Library Structure.</a></dt>
|
||||
<dt><a href="xmlsec-notes-compiling.html">Building the application with XML Security Library.</a></dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-notes-compiling.html#XMLSEC-NOTES-COMPILING-OVERVIEW">Overview.</a></dt>
|
||||
<dt><a href="xmlsec-notes-include-files.html">Include files.</a></dt>
|
||||
<dt><a href="xmlsec-notes-compiling-unix.html">Compiling and linking on Unix.</a></dt>
|
||||
<dt><a href="xmlsec-notes-compiling-windows.html">Compiling and linking on Windows.</a></dt>
|
||||
<dt><a href="xmlsec-notes-compiling-others.html">Compiling and linking on other systems.</a></dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-notes-init-shutdown.html">Initialization and shutdown.</a></dt>
|
||||
<dt><a href="xmlsec-notes-sign-encrypt.html">Signing and encrypting documents.</a></dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-notes-sign-encrypt.html#XMLSEC-NOTES-SIGN-ENCRYPT-OVERVIEW">Overview.</a></dt>
|
||||
<dt><a href="xmlsec-notes-sign.html">Signing a document.</a></dt>
|
||||
<dt><a href="xmlsec-notes-encrypt.html">Encrypting data.</a></dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-notes-templates.html">Creating dynamic templates.</a></dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-notes-templates.html#XMLSEC-NOTES-TEMPLATES-OVERVIEW">Overview.</a></dt>
|
||||
<dt><a href="xmlsec-notes-dynamic-signature-templates.html">Creating dynamic signature templates.</a></dt>
|
||||
<dt><a href="xmlsec-notes-dynamic-encryption-templates.html">Creating dynamic encryption templates.</a></dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-notes-verify-decrypt.html">Verifing and decrypting documents.</a></dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-notes-verify-decrypt.html#XMLSEC-NOTES-VERIFY-DECRYPT-OVERVIEW">Overview.</a></dt>
|
||||
<dt><a href="xmlsec-notes-verify.html">Verifying a signed document</a></dt>
|
||||
<dt><a href="xmlsec-notes-decrypt.html">Decrypting an encrypted document</a></dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-notes-keys.html">Keys.</a></dt>
|
||||
<dt><a href="xmlsec-notes-keysmngr.html">Keys manager.</a></dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-notes-keysmngr.html#XMLSEC-NOTES-KEYSMNGR-OVERVIEW">Overview.</a></dt>
|
||||
<dt><a href="xmlsec-notes-simple-keys-store.html">Simple keys store.</a></dt>
|
||||
<dt><a href="xmlsec-notes-keys-manager-sign-enc.html">Using keys manager for signatures/encryption.</a></dt>
|
||||
<dt><a href="xmlsec-notes-keys-mngr-verify-decrypt.html">Using keys manager for verification/decryption.</a></dt>
|
||||
<dt><a href="xmlsec-notes-custom-keys-store.html">Implementing a custom keys store.</a></dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-notes-x509.html">Using X509 Certificates.</a></dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-notes-x509.html#XMLSEC-NOTES-X509-OVERVIEW">Overview.</a></dt>
|
||||
<dt><a href="xmlsec-notes-sign-x509.html">Signing data with X509 certificate.</a></dt>
|
||||
<dt><a href="xmlsec-notes-verify-x509.html">Verifing document signed with X509 certificates.</a></dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-notes-transforms.html">Transforms and transforms chain.</a></dt>
|
||||
<dt><a href="xmlsec-notes-contexts.html">Using context objects.</a></dt>
|
||||
<dt><a href="xmlsec-notes-new-crypto.html">Adding support for new cryptographic library.</a></dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-notes-new-crypto.html#XMLSEC-NOTES-NEW-CRYPTO-OVERVIEW">Overview.</a></dt>
|
||||
<dt><a href="xmlsec-notes-new-crypto-skeleton.html">Creating a framework from the skeleton.</a></dt>
|
||||
<dt><a href="xmlsec-notes-new-crypto-functions.html">xmlSecCryptoApp* functions.</a></dt>
|
||||
<dt><a href="xmlsec-notes-new-crypto-klasses.html">Klasses and objects.</a></dt>
|
||||
<dt><a href="xmlsec-notes-new-crypto-transforms.html">Cryptographic transforms.</a></dt>
|
||||
<dt><a href="xmlsec-notes-new-crypto-keys.html">Keys data and keys data stores.</a></dt>
|
||||
<dt><a href="xmlsec-notes-new-crypto-simple-keys-mngr.html">Default keys manager.</a></dt>
|
||||
<dt><a href="xmlsec-notes-new-crypto-sharing-results.html">Sharing the results.</a></dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-examples.html">Examples.</a></dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-examples.html#XMLSEC-EXAMPLES-OVERVIEW">XML Security Library Examples.</a></dt>
|
||||
<dt><a href="xmlsec-examples-sign-template-file.html">Signing a template file.</a></dt>
|
||||
<dt><a href="xmlsec-examples-sign-dynamimc-template.html">Signing a dynamicaly created template.</a></dt>
|
||||
<dt><a href="xmlsec-examples-sign-x509.html">Signing with X509 certificate.</a></dt>
|
||||
<dt><a href="xmlsec-verify-with-key.html">Verifying a signature with a single key.</a></dt>
|
||||
<dt><a href="xmlsec-verify-with-keys-mngr.html">Verifying a signature with keys manager.</a></dt>
|
||||
<dt><a href="xmlsec-verify-with-x509.html">Verifying a signature with X509 certificates.</a></dt>
|
||||
<dt><a href="xmlsec-verify-with-restrictions.html">Verifying a signature with additional restrictions.</a></dt>
|
||||
<dt><a href="xmlsec-encrypt-template-file.html">Encrypting data with a template file.</a></dt>
|
||||
<dt><a href="xmlsec-encrypt-dynamic-template.html">Encrypting data with a dynamicaly created template.</a></dt>
|
||||
<dt><a href="xmlsec-encrypt-with-session-key.html">Encrypting data with a session key.</a></dt>
|
||||
<dt><a href="xmlsec-decrypt-with-signle-key.html">Decrypting data with a single key.</a></dt>
|
||||
<dt><a href="xmlsec-decrypt-with-keys-mngr.html">Decrypting data with keys manager.</a></dt>
|
||||
<dt><a href="xmlsec-custom-keys-manager.html">Writing a custom keys manager.</a></dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-signature-klasses.html">APPENDIX A. XML Security Library Signature Klasses.</a></dt>
|
||||
<dt><a href="xmlsec-encryption-klasses.html">APPENDIX B. XML Security Library Encryption Klasses.</a></dt>
|
||||
</dl></dd>
|
||||
<dt>II. <a href="xmlsec-reference.html">XML Security Library API Reference.</a>
|
||||
</dt>
|
||||
<dd><dl>
|
||||
<dt><a href="xmlsec-ref.html">XML Security Core Library API Reference.</a></dt>
|
||||
<dd><dl>
|
||||
<dt>
|
||||
<a href="xmlsec-app.html">app</a> -- Crypto-engine independent application support function.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-base64.html">base64</a> -- Base64 encoding/decoding functions.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-bn.html">bn</a> -- Big numbers support functions.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-buffer.html">buffer</a> -- Binary buffer implementation.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-dl.html">dl</a> -- Dynamic crypto-engine library loading support.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-errors.html">errors</a> -- Error/log messages support.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-io.html">io</a> -- Input/output support.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-keyinfo.html">keyinfo</a> -- <a href="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo" target="_top"><dsig:KeyInfo/></a> node parser.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-keysdata.html">keysdata</a> -- Crypto key data object definition.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-keys.html">keys</a> -- Crypto key object definition.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-keysmngr.html">keysmngr</a> -- Keys manager object support.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-list.html">list</a> -- Generic list structure implementation.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-membuf.html">membuf</a> -- Memory buffer transform implementation.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-nodeset.html">nodeset</a> -- Nodeset object implementation.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-parser.html">parser</a> -- Parser transform implementation.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-templates.html">templates</a> -- Dynamic templates creation functions.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-transforms.html">transforms</a> -- Transform object definition.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-version.html">version</a> -- Version macros.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-xmldsig.html">xmldsig</a> -- XML Digital Signature support.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-xmlenc.html">xmlenc</a> -- XML Encryption support.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-xmlsec.html">xmlsec</a> -- Utility functions.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-xmltree.html">xmltree</a> -- XML tree operations.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-x509.html">x509</a> -- <a href="http://www.w3.org/TR/xmldsig-core/#sec-X509Certificate" target="_top"><dsig:X509Certificate/></a> node parser.</dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-openssl-ref.html">XML Security Library for OpenSLL API Reference.</a></dt>
|
||||
<dd><dl>
|
||||
<dt>
|
||||
<a href="xmlsec-openssl-app.html">app</a> -- Application functions implementation for OpenSSL.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-openssl-bn.html">bn</a> -- Big numbers helper functions.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-openssl-crypto.html">crypto</a> -- Crypto transforms implementation for OpenSSL.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-openssl-evp.html">evp</a> -- EVP keys data implementation.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-openssl-x509.html">x509</a> -- X509 certificates support implementation for OpenSSL.</dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-gnutls-ref.html">XML Security Library for GnuTLS API Reference.</a></dt>
|
||||
<dd><dl>
|
||||
<dt>
|
||||
<a href="xmlsec-gnutls-app.html">app</a> -- Application functions implementation for GnuTLS.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-gnutls-crypto.html">crypto</a> -- Crypto transforms implementation for GnuTLS.</dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-gcrypt-ref.html">XML Security Library for GCrypt API Reference.</a></dt>
|
||||
<dd><dl>
|
||||
<dt>
|
||||
<a href="xmlsec-gcrypt-app.html">app</a> -- Application functions implementation for GnuTLS.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-gcrypt-crypto.html">crypto</a> -- Crypto transforms implementation for GCrypt.</dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-nss-ref.html">XML Security Library for NSS API Reference.</a></dt>
|
||||
<dd><dl>
|
||||
<dt>
|
||||
<a href="xmlsec-nss-app.html">app</a> -- Application functions implementation for NSS.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-nss-bignum.html">bignum</a> -- Big numbers helper functions.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-nss-crypto.html">crypto</a> -- Crypto transforms implementation for NSS.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-nss-keysstore.html">keysstore</a> -- Keys store implementation for NSS.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-nss-pkikeys.html">pkikeys</a> -- PKI keys data implementation.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-nss-x509.html">x509</a> -- X509 certificates support implementation for NSS.</dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-mscrypto-ref.html">XML Security Library for MSCrypto API Reference.</a></dt>
|
||||
<dd><dl>
|
||||
<dt>
|
||||
<a href="xmlsec-mscrypto-app.html">app</a> -- Application functions implementation for MS Crypto.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-mscrypto-certkeys.html">certkeys</a> -- MS Crypto certificates helper functions.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-mscrypto-crypto.html">crypto</a> -- Crypto transforms implementation for MS Crypto.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-mscrypto-keysstore.html">keysstore</a> -- Keys store implementation for MS Crypto.</dt>
|
||||
<dt>
|
||||
<a href="xmlsec-mscrypto-x509.html">x509</a> -- X509 certificates support implementation for MS Crypto.</dt>
|
||||
</dl></dd>
|
||||
<dt><a href="xmlsec-index.html">XML Security Library Reference Index</a></dt>
|
||||
</dl></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="2"><tr valign="middle">
|
||||
<td align="left"></td>
|
||||
<td align="right"><a accesskey="n" href="xmlsec-notes.html"><b>XML Security Library Tutorial >>></b></a></td>
|
||||
</tr></table>
|
||||
</td></tr></table></td>
|
||||
</tr></table></body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 187 B |
|
Before Width: | Height: | Size: 186 B |
@ -1,252 +0,0 @@
|
||||
<chapter id="xmlsec-notes-compiling">
|
||||
<title>Building the application with XML Security Library.</title>
|
||||
<sect1 id="xmlsec-notes-compiling-overview">
|
||||
<title>Overview.</title>
|
||||
<para>Compiling and linking application with XML Security
|
||||
Library requires specifying correct compilation flags, library files
|
||||
and paths to include and library files. As we discussed before,
|
||||
XML Security Library consist of the core xmlsec library and several
|
||||
xmlsec-crypto libraries. Application has a choice of selecting crypto
|
||||
library at link time or dynamicaly loading it at run time. Please note,
|
||||
that loading crypto engines dynamicaly may introduce security problems
|
||||
on some platforms.
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-include-files" >
|
||||
<title>Include files.</title>
|
||||
<para>In order to use XML Security Library an application should include
|
||||
one or more of the following files:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link linkend="XMLSEC-XMLSEC">xmlsec/xmlsec.h</link> -
|
||||
XML Security Library initialization and shutdown functions;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend="XMLSEC-XMLDSIG">xmlsec/xmldsig.h</link> -
|
||||
XML Digital Signature functions;</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend="XMLSEC-XMLENC">xmlsec/xmlenc.h</link> -
|
||||
XML Encryption functions;</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend="XMLSEC-XMLTREE">xmlsec/xmltree.h</link> -
|
||||
helper functions for XML documents manipulation;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend="XMLSEC-TEMPLATES">xmlsec/templates.h</link> -
|
||||
helper functions for dynamic XML Digital Signature and
|
||||
XML Encryption templates creation;
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend="XMLSEC-CRYPTO">xmlsec/crypto.h</link> -
|
||||
automatic XML Security Crypto Library selection.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>If necessary, the application should also include LibXML,
|
||||
LibXSLT and crypto library header files.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Example includes file section.</title>
|
||||
<programlisting><![CDATA[
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifndef XMLSEC_NO_XSLT
|
||||
#include <libxslt/xslt.h>
|
||||
#endif /* XMLSEC_NO_XSLT */
|
||||
|
||||
#include <xmlsec/xmlsec.h>
|
||||
#include <xmlsec/xmltree.h>
|
||||
#include <xmlsec/xmldsig.h>
|
||||
#include <xmlsec/xmlenc.h>
|
||||
#include <xmlsec/templates.h>
|
||||
#include <xmlsec/crypto.h>
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-compiling-unix" >
|
||||
<title>Compiling and linking on Unix.</title>
|
||||
<para>There are several ways to get necessary compilation
|
||||
and linking information on Unix and application can use
|
||||
any of these methods to do crypto engine selection either
|
||||
at linking or run time.
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>PKG_CHECK_MODULES() macro
|
||||
<example>
|
||||
<title>Using PKG_CHECK_MODULES() macro in a configure.in file
|
||||
to select crypto engine (openssl) at linking time.</title>
|
||||
<programlisting><![CDATA[
|
||||
dnl
|
||||
dnl Check for xmlsec and friends
|
||||
dnl
|
||||
PKG_CHECK_MODULES(XMLSEC, xmlsec1-openssl >= 1.0.0 xml2 libxslt,,exit)
|
||||
CFLAGS="$CFLAGS $XMLSEC_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $XMLSEC_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $XMLSEC_LIBS"
|
||||
]]></programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Using PKG_CHECK_MODULES() macro in a configure.in file
|
||||
to enable dynamical loading of xmlsec-crypto library.</title>
|
||||
<programlisting><![CDATA[
|
||||
dnl
|
||||
dnl Check for xmlsec and friends
|
||||
dnl
|
||||
PKG_CHECK_MODULES(XMLSEC, xmlsec1 >= 1.0.0 xml2 libxslt,,exit)
|
||||
CFLAGS="$CFLAGS $XMLSEC_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $XMLSEC_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $XMLSEC_LIBS"
|
||||
]]></programlisting>
|
||||
</example>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>pkg-config script
|
||||
<example>
|
||||
<title>Using pkg-config script in a Makefile
|
||||
to select crypto engine (nss) at linking time.</title>
|
||||
<programlisting><![CDATA[
|
||||
PROGRAM = test
|
||||
PROGRAM_FILES = test.c
|
||||
|
||||
CFLAGS += -g $(shell pkg-config --cflags xmlsec1-nss)
|
||||
LDFLAGS += -g
|
||||
LIBS += $(shell pkg-config --libs xmlsec1-nss)
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
%: %.c
|
||||
$(cc) $(PROGRAM_FILES) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(LIBS)
|
||||
|
||||
clean:
|
||||
@rm -rf $(PROGRAM)
|
||||
]]></programlisting>
|
||||
</example>
|
||||
|
||||
|
||||
<example>
|
||||
<title>Using pkg-config script in a Makefile
|
||||
to enable dynamical loading of xmlsec-crypto library.</title>
|
||||
<programlisting><![CDATA[
|
||||
PROGRAM = test
|
||||
PROGRAM_FILES = test.c
|
||||
|
||||
CFLAGS += -g $(shell pkg-config --cflags xmlsec1)
|
||||
LDFLAGS += -g
|
||||
LIBS += $(shell pkg-config --libs xmlsec1)
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
%: %.c
|
||||
$(cc) $(PROGRAM_FILES) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(LIBS)
|
||||
|
||||
clean:
|
||||
@rm -rf $(PROGRAM)
|
||||
]]></programlisting>
|
||||
</example>
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>xmlsec1-config script
|
||||
<example>
|
||||
<title>Using xmlsec1-config script in a Makefile
|
||||
to select crypto engine (e.g. gnutls) at linking time.</title>
|
||||
<programlisting><![CDATA[
|
||||
PROGRAM = test
|
||||
PROGRAM_FILES = test.c
|
||||
|
||||
CFLAGS += -g $(shell xmlsec1-config --crypto gnutls --cflags)
|
||||
LDFLAGS += -g
|
||||
LIBS += $(shell xmlsec1-config --crypto gnutls --libs)
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
%: %.c
|
||||
$(cc) $(PROGRAM_FILES) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(LIBS)
|
||||
|
||||
clean:
|
||||
@rm -rf $(PROGRAM)
|
||||
]]></programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Using xmlsec1-config script in a Makefile
|
||||
to enable dynamical loading of xmlsec-crypto library.</title>
|
||||
<programlisting><![CDATA[
|
||||
PROGRAM = test
|
||||
PROGRAM_FILES = test.c
|
||||
|
||||
CFLAGS += -g $(shell xmlsec1-config --cflags)
|
||||
LDFLAGS += -g
|
||||
LIBS += $(shell xmlsec1-config --libs)
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
%: %.c
|
||||
$(cc) $(PROGRAM_FILES) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(LIBS)
|
||||
|
||||
clean:
|
||||
@rm -rf $(PROGRAM)
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-compiling-windows" >
|
||||
<title>Compiling and linking on Windows.</title>
|
||||
<para>On Windows there is no such simple and elegant solution.
|
||||
Please check <filename>README</filename> file in <filename>win32</filename>
|
||||
folder of the library package for latest instructions.
|
||||
However, there are few general things, that you need to remember:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<emphasis>All libraries linked to your application must be compiled
|
||||
with the same Microsoft Runtime Libraries.</emphasis>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<emphasis>Static linking with XML Security Library requires
|
||||
additional global defines:</emphasis>
|
||||
<informalexample><programlisting>
|
||||
#define LIBXML_STATIC
|
||||
#define LIBXSLT_STATIC
|
||||
#define XMLSEC_STATIC
|
||||
</programlisting></informalexample>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
If you do not want to dynamicaly load xmlsec-crypto library
|
||||
and prefer to select crypto engine at linking then you should
|
||||
link your application with xmlsec and at least one of
|
||||
xmlsec-crypto libraries.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
In order to enable dynamic loading for xmlsec-crypto library
|
||||
you should add additional global define:
|
||||
<informalexample><programlisting>
|
||||
#define XMLSEC_CRYPTO_DYNAMIC_LOADING
|
||||
</programlisting></informalexample>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-compiling-others">
|
||||
<title>Compiling and linking on other systems.</title>
|
||||
<para>Well, nothing is impossible, it's only software (you managed to
|
||||
compile the library itself, do you?).
|
||||
I'll be happy to include in this manual your expirience with
|
||||
compiling and linking applications with XML Security Library
|
||||
on other platforms (if you would like to share it).
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
@ -1,325 +0,0 @@
|
||||
<chapter id="xmlsec-notes-templates">
|
||||
<title>Creating dynamic templates.</title>
|
||||
<sect1 id="xmlsec-notes-templates-overview">
|
||||
<title>Overview.</title>
|
||||
<para>The XML Security Library uses templates to describe
|
||||
how and what data should be signed or encrypted. The template
|
||||
is a regular XML file. You can create templates in advance
|
||||
using your favorite XML files editor, load them from a file
|
||||
and use for creating signature or encrypting data. You can
|
||||
also create templates dynamicaly. The XML Security Library
|
||||
provides helper functions to quickly create dynamic templates
|
||||
inside your application.</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-dynamic-signature-templates">
|
||||
<title>Creating dynamic signature templates.</title>
|
||||
<para>The signature template has structure similar
|
||||
to the XML Digital Signature structure as it is described in
|
||||
<ulink URL="http://www.w3.org/TR/xmldsig-core">specification</ulink>.
|
||||
The only difference is that some nodes (for example,
|
||||
<dsig:DigestValue/> or <SignatureValue/>)
|
||||
are empty. The XML Security Library sets the content of these
|
||||
nodes after doing necessary calculations.
|
||||
</para>
|
||||
<figure>
|
||||
<title>XML Digital Signature structure</title>
|
||||
<programlisting>
|
||||
<dsig:Signature ID?>
|
||||
<dsig:SignedInfo>
|
||||
<dsig:CanonicalizationMethod Algorithm />
|
||||
<dsig:SignatureMethod Algorithm />
|
||||
(<dsig:Reference URI? >
|
||||
(<dsig:Transforms>
|
||||
(<dsig:Transform Algorithm />)+
|
||||
</dsig:Transforms>)?
|
||||
<dsig:DigestMethod Algorithm >
|
||||
<dsig:DigestValue>
|
||||
</dsig:Reference>)+
|
||||
</dsig:SignedInfo>
|
||||
<dsig:SignatureValue>
|
||||
(<dsig:KeyInfo>
|
||||
<dsig:KeyName>?
|
||||
<dsig:KeyValue>?
|
||||
<dsig:RetrievalMethod>?
|
||||
<dsig:X509Data>?
|
||||
<dsig:PGPData>?
|
||||
<enc:EncryptedKey>?
|
||||
<enc:AgreementMethod>?
|
||||
<dsig:KeyName>?
|
||||
<dsig:RetrievalMethod>?
|
||||
<*>?
|
||||
</dsig:KeyInfo>)?
|
||||
(<dsig:Object ID?>)*
|
||||
</dsig:Signature>
|
||||
</programlisting>
|
||||
</figure>
|
||||
<para>
|
||||
<example>
|
||||
<title>Creating dynamic signature template.</title>
|
||||
<programlisting><![CDATA[
|
||||
/**
|
||||
* sign_file:
|
||||
* @xml_file: the XML file name.
|
||||
* @key_file: the PEM private key file name.
|
||||
*
|
||||
* Signs the #xml_file using private key from #key_file and dynamicaly
|
||||
* created enveloped signature template.
|
||||
*
|
||||
* Returns 0 on success or a negative value if an error occurs.
|
||||
*/
|
||||
int
|
||||
sign_file(const char* xml_file, const char* key_file) {
|
||||
xmlDocPtr doc = NULL;
|
||||
xmlNodePtr signNode = NULL;
|
||||
xmlNodePtr refNode = NULL;
|
||||
xmlNodePtr keyInfoNode = NULL;
|
||||
xmlSecDSigCtxPtr dsigCtx = NULL;
|
||||
int res = -1;
|
||||
|
||||
assert(xml_file);
|
||||
assert(key_file);
|
||||
|
||||
/* load doc file */
|
||||
doc = xmlParseFile(xml_file);
|
||||
if ((doc == NULL) || (xmlDocGetRootElement(doc) == NULL)){
|
||||
fprintf(stderr, "Error: unable to parse file \"%s\"\n", xml_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* create signature template for RSA-SHA1 enveloped signature */
|
||||
signNode = xmlSecTmplSignatureCreate(doc, xmlSecTransformExclC14NId,
|
||||
xmlSecTransformRsaSha1Id, NULL);
|
||||
if(signNode == NULL) {
|
||||
fprintf(stderr, "Error: failed to create signature template\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* add <dsig:Signature/> node to the doc */
|
||||
xmlAddChild(xmlDocGetRootElement(doc), signNode);
|
||||
|
||||
/* add reference */
|
||||
refNode = xmlSecTmplSignatureAddReference(signNode, xmlSecTransformSha1Id,
|
||||
NULL, NULL, NULL);
|
||||
if(refNode == NULL) {
|
||||
fprintf(stderr, "Error: failed to add reference to signature template\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* add enveloped transform */
|
||||
if(xmlSecTmplReferenceAddTransform(refNode, xmlSecTransformEnvelopedId) == NULL) {
|
||||
fprintf(stderr, "Error: failed to add enveloped transform to reference\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* add <dsig:KeyInfo/> and <dsig:KeyName/> nodes to put key name in the signed document */
|
||||
keyInfoNode = xmlSecTmplSignatureEnsureKeyInfo(signNode, NULL);
|
||||
if(keyInfoNode == NULL) {
|
||||
fprintf(stderr, "Error: failed to add key info\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if(xmlSecTmplKeyInfoAddKeyName(keyInfoNode, NULL) == NULL) {
|
||||
fprintf(stderr, "Error: failed to add key name\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* create signature context, we don't need keys manager in this example */
|
||||
dsigCtx = xmlSecDSigCtxCreate(NULL);
|
||||
if(dsigCtx == NULL) {
|
||||
fprintf(stderr,"Error: failed to create signature context\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* load private key, assuming that there is not password */
|
||||
dsigCtx->signKey = xmlSecCryptoAppKeyLoad(key_file, xmlSecKeyDataFormatPem, NULL, NULL, NULL);
|
||||
if(dsigCtx->signKey == NULL) {
|
||||
fprintf(stderr,"Error: failed to load private pem key from \"%s\"\n", key_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* set key name to the file name, this is just an example! */
|
||||
if(xmlSecKeySetName(dsigCtx->signKey, key_file) < 0) {
|
||||
fprintf(stderr,"Error: failed to set key name for key from \"%s\"\n", key_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* sign the template */
|
||||
if(xmlSecDSigCtxSign(dsigCtx, signNode) < 0) {
|
||||
fprintf(stderr,"Error: signature failed\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* print signed document to stdout */
|
||||
xmlDocDump(stdout, doc);
|
||||
|
||||
/* success */
|
||||
res = 0;
|
||||
|
||||
done:
|
||||
/* cleanup */
|
||||
if(dsigCtx != NULL) {
|
||||
xmlSecDSigCtxDestroy(dsigCtx);
|
||||
}
|
||||
|
||||
if(doc != NULL) {
|
||||
xmlFreeDoc(doc);
|
||||
}
|
||||
return(res);
|
||||
}
|
||||
]]></programlisting>
|
||||
<simpara><link linkend="xmlsec-example-sign2">Full program listing</link></simpara>
|
||||
</example>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-notes-dynamic-encryption-templates">
|
||||
<title>Creating dynamic encryption templates.</title>
|
||||
<para>The encryption template has structure similar
|
||||
to the XML Encryption structure as it is described in
|
||||
<ulink URL="http://www.w3.org/TR/xmlenc-core">specification</ulink>.
|
||||
The only difference is that some nodes (for example,
|
||||
<enc:CipherValue/>)
|
||||
are empty. The XML Security Library sets the content of these
|
||||
nodes after doing necessary calculations.
|
||||
</para>
|
||||
<figure>
|
||||
<title>XML Encryption structure</title>
|
||||
<programlisting>
|
||||
<enc:EncryptedData Id? Type? MimeType? Encoding?>
|
||||
<enc:EncryptionMethod Algorithm />?
|
||||
(<dsig:KeyInfo>
|
||||
<dsig:KeyName>?
|
||||
<dsig:KeyValue>?
|
||||
<dsig:RetrievalMethod>?
|
||||
<dsig:X509Data>?
|
||||
<dsig:PGPData>?
|
||||
<enc:EncryptedKey>?
|
||||
<enc:AgreementMethod>?
|
||||
<dsig:KeyName>?
|
||||
<dsig:RetrievalMethod>?
|
||||
<*>?
|
||||
</dsig:KeyInfo>)?
|
||||
<enc:CipherData>
|
||||
<enc:CipherValue>?
|
||||
<enc:CipherReference URI?>?
|
||||
</enc:CipherData>
|
||||
<enc:EncryptionProperties>?
|
||||
</enc:EncryptedData>
|
||||
</programlisting>
|
||||
</figure>
|
||||
<para>
|
||||
<example>
|
||||
<title>Creating dynamic encrytion template.</title>
|
||||
<programlisting><![CDATA[
|
||||
/**
|
||||
* encrypt_file:
|
||||
* @xml_file: the encryption template file name.
|
||||
* @key_file: the Triple DES key file.
|
||||
*
|
||||
* Encrypts #xml_file using a dynamicaly created template and DES key from
|
||||
* #key_file.
|
||||
*
|
||||
* Returns 0 on success or a negative value if an error occurs.
|
||||
*/
|
||||
int
|
||||
encrypt_file(const char* xml_file, const char* key_file) {
|
||||
xmlDocPtr doc = NULL;
|
||||
xmlNodePtr encDataNode = NULL;
|
||||
xmlNodePtr keyInfoNode = NULL;
|
||||
xmlSecEncCtxPtr encCtx = NULL;
|
||||
int res = -1;
|
||||
|
||||
assert(xml_file);
|
||||
assert(key_file);
|
||||
|
||||
/* load template */
|
||||
doc = xmlParseFile(xml_file);
|
||||
if ((doc == NULL) || (xmlDocGetRootElement(doc) == NULL)){
|
||||
fprintf(stderr, "Error: unable to parse file \"%s\"\n", xml_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* create encryption template to encrypt XML file and replace
|
||||
* its content with encryption result */
|
||||
encDataNode = xmlSecTmplEncDataCreate(doc, xmlSecTransformDes3CbcId,
|
||||
NULL, xmlSecTypeEncElement, NULL, NULL);
|
||||
if(encDataNode == NULL) {
|
||||
fprintf(stderr, "Error: failed to create encryption template\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* we want to put encrypted data in the <enc:CipherValue/> node */
|
||||
if(xmlSecTmplEncDataEnsureCipherValue(encDataNode) == NULL) {
|
||||
fprintf(stderr, "Error: failed to add CipherValue node\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* add <dsig:KeyInfo/> and <dsig:KeyName/> nodes to put key name in the signed document */
|
||||
keyInfoNode = xmlSecTmplEncDataEnsureKeyInfo(encDataNode, NULL);
|
||||
if(keyInfoNode == NULL) {
|
||||
fprintf(stderr, "Error: failed to add key info\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if(xmlSecTmplKeyInfoAddKeyName(keyInfoNode, NULL) == NULL) {
|
||||
fprintf(stderr, "Error: failed to add key name\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* create encryption context, we don't need keys manager in this example */
|
||||
encCtx = xmlSecEncCtxCreate(NULL);
|
||||
if(encCtx == NULL) {
|
||||
fprintf(stderr,"Error: failed to create encryption context\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* load DES key, assuming that there is not password */
|
||||
encCtx->encKey = xmlSecKeyReadBinaryFile(xmlSecKeyDataDesId, key_file);
|
||||
if(encCtx->encKey == NULL) {
|
||||
fprintf(stderr,"Error: failed to load des key from binary file \"%s\"\n", key_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* set key name to the file name, this is just an example! */
|
||||
if(xmlSecKeySetName(encCtx->encKey, key_file) < 0) {
|
||||
fprintf(stderr,"Error: failed to set key name for key from \"%s\"\n", key_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* encrypt the data */
|
||||
if(xmlSecEncCtxXmlEncrypt(encCtx, encDataNode, xmlDocGetRootElement(doc)) < 0) {
|
||||
fprintf(stderr,"Error: encryption failed\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* we template is inserted in the doc */
|
||||
encDataNode = NULL;
|
||||
|
||||
/* print encrypted data with document to stdout */
|
||||
xmlDocDump(stdout, doc);
|
||||
|
||||
/* success */
|
||||
res = 0;
|
||||
|
||||
done:
|
||||
|
||||
/* cleanup */
|
||||
if(encCtx != NULL) {
|
||||
xmlSecEncCtxDestroy(encCtx);
|
||||
}
|
||||
|
||||
if(encDataNode != NULL) {
|
||||
xmlFreeNode(encDataNode);
|
||||
}
|
||||
|
||||
if(doc != NULL) {
|
||||
xmlFreeDoc(doc);
|
||||
}
|
||||
return(res);
|
||||
}
|
||||
]]></programlisting>
|
||||
<simpara><link linkend="xmlsec-example-encrypt2">Full program listing</link></simpara>
|
||||
</example>
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
@ -1,102 +0,0 @@
|
||||
<chapter id="xmlsec-examples">
|
||||
<title>Examples.</title>
|
||||
<sect1 id="xmlsec-examples-overview" >
|
||||
<title>XML Security Library Examples.</title>
|
||||
<para>This section contains several examples of using XML Security Library
|
||||
to sign, veiryf, encrypt or decrypt XML documents.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-examples-sign-template-file">
|
||||
<title>Signing a template file.</title>
|
||||
|
||||
&xmlsec-example-sign1;
|
||||
&xmlsec-example-sign1-tmpl;
|
||||
&xmlsec-example-sign1-res;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-examples-sign-dynamimc-template">
|
||||
<title>Signing a dynamicaly created template.</title>
|
||||
|
||||
&xmlsec-example-sign2;
|
||||
&xmlsec-example-sign2-doc;
|
||||
&xmlsec-example-sign2-res;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-examples-sign-x509">
|
||||
<title>Signing with X509 certificate.</title>
|
||||
|
||||
&xmlsec-example-sign3;
|
||||
&xmlsec-example-sign3-doc;
|
||||
&xmlsec-example-sign3-res;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-verify-with-key">
|
||||
<title>Verifying a signature with a single key.</title>
|
||||
|
||||
&xmlsec-example-verify1;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-verify-with-keys-mngr">
|
||||
<title>Verifying a signature with keys manager.</title>
|
||||
|
||||
&xmlsec-example-verify2;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-verify-with-x509">
|
||||
<title>Verifying a signature with X509 certificates.</title>
|
||||
|
||||
&xmlsec-example-verify3;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-verify-with-restrictions">
|
||||
<title>Verifying a signature with additional restrictions.</title>
|
||||
|
||||
&xmlsec-example-verify4;
|
||||
&xmlsec-example-verify4-tmpl;
|
||||
&xmlsec-example-verify4-res;
|
||||
&xmlsec-example-verify4-bad-tmpl;
|
||||
&xmlsec-example-verify4-bad-res;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-encrypt-template-file">
|
||||
<title>Encrypting data with a template file.</title>
|
||||
|
||||
&xmlsec-example-encrypt1;
|
||||
&xmlsec-example-encrypt1-tmpl;
|
||||
&xmlsec-example-encrypt1-res;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-encrypt-dynamic-template">
|
||||
<title>Encrypting data with a dynamicaly created template.</title>
|
||||
|
||||
&xmlsec-example-encrypt2;
|
||||
&xmlsec-example-encrypt2-doc;
|
||||
&xmlsec-example-encrypt2-res;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-encrypt-with-session-key">
|
||||
<title>Encrypting data with a session key.</title>
|
||||
|
||||
&xmlsec-example-encrypt3;
|
||||
&xmlsec-example-encrypt3-doc;
|
||||
&xmlsec-example-encrypt3-res;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-decrypt-with-signle-key">
|
||||
<title>Decrypting data with a single key.</title>
|
||||
|
||||
&xmlsec-example-decrypt1;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-decrypt-with-keys-mngr">
|
||||
<title>Decrypting data with keys manager.</title>
|
||||
|
||||
&xmlsec-example-decrypt2;
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-custom-keys-manager">
|
||||
<title>Writing a custom keys manager.</title>
|
||||
|
||||
&xmlsec-example-decrypt3;
|
||||
</sect1>
|
||||
</chapter>
|
||||
@ -1,104 +0,0 @@
|
||||
<chapter id="xmlsec-notes-init-shutdown">
|
||||
<title>Initialization and shutdown.</title>
|
||||
<para>XML Security Library initialization/shutdown
|
||||
process includes initialization and shutdown of the
|
||||
dependent libraries:
|
||||
<itemizedlist>
|
||||
<listitem><para>libxml library;</para></listitem>
|
||||
<listitem><para>libxslt library;</para></listitem>
|
||||
<listitem><para>crypto library (OpenSSL, GnuTLS, GCrypt, NSS, ...);</para></listitem>
|
||||
<listitem><para>xmlsec library
|
||||
(<link linkend="xmlSecInit">xmlSecInit</link>
|
||||
and <link linkend="xmlSecShutdown">xmlSecShutdown</link>
|
||||
functions);
|
||||
</para></listitem>
|
||||
<listitem><para>xmlsec-crypto library
|
||||
(<link linkend="xmlSecCryptoDLLoadLibrary">xmlSecCryptoDLLoadLibrary</link>
|
||||
to load xmlsec-crypto library dynamicaly if needed,
|
||||
<link linkend="xmlSecCryptoInit">xmlSecCryptoInit</link>
|
||||
and <link linkend="xmlSecCryptoShutdown">xmlSecCryptoShutdown</link>
|
||||
functions);
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
xmlsec-crypto library also provides a convinient functions
|
||||
<link linkend="xmlSecAppCryptoInit">xmlSecAppCryptoInit</link>
|
||||
and <link linkend="xmlSecAppCryptoShutdown">xmlSecAppCryptoShutdown</link>
|
||||
to initialize the crypto library itself but application can do it
|
||||
by itself.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Initializing application.</title>
|
||||
<programlisting><![CDATA[
|
||||
/* Init libxml and libxslt libraries */
|
||||
xmlInitParser();
|
||||
LIBXML_TEST_VERSION
|
||||
xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
||||
xmlSubstituteEntitiesDefault(1);
|
||||
#ifndef XMLSEC_NO_XSLT
|
||||
xmlIndentTreeOutput = 1;
|
||||
#endif /* XMLSEC_NO_XSLT */
|
||||
|
||||
/* Init xmlsec library */
|
||||
if(xmlSecInit() < 0) {
|
||||
fprintf(stderr, "Error: xmlsec initialization failed.\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Check loaded library version */
|
||||
if(xmlSecCheckVersion() != 1) {
|
||||
fprintf(stderr, "Error: loaded xmlsec library version is not compatible.\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Load default crypto engine if we are supporting dynamic
|
||||
* loading for xmlsec-crypto libraries. Use the crypto library
|
||||
* name ("openssl", "nss", etc.) to load corresponding
|
||||
* xmlsec-crypto library.
|
||||
*/
|
||||
#ifdef XMLSEC_CRYPTO_DYNAMIC_LOADING
|
||||
if(xmlSecCryptoDLLoadLibrary(NULL) < 0) {
|
||||
fprintf(stderr, "Error: unable to load default xmlsec-crypto library. Make sure\n"
|
||||
"that you have it installed and check shared libraries path\n"
|
||||
"(LD_LIBRARY_PATH) envornment variable.\n");
|
||||
return(-1);
|
||||
}
|
||||
#endif /* XMLSEC_CRYPTO_DYNAMIC_LOADING */
|
||||
|
||||
/* Init crypto library */
|
||||
if(xmlSecCryptoAppInit(NULL) < 0) {
|
||||
fprintf(stderr, "Error: crypto initialization failed.\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Init xmlsec-crypto library */
|
||||
if(xmlSecCryptoInit() < 0) {
|
||||
fprintf(stderr, "Error: xmlsec-crypto initialization failed.\n");
|
||||
return(-1);
|
||||
}
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title>Shutting down application.</title>
|
||||
<programlisting><![CDATA[
|
||||
/* Shutdown xmlsec-crypto library */
|
||||
xmlSecCryptoShutdown();
|
||||
|
||||
/* Shutdown crypto library */
|
||||
xmlSecCryptoAppShutdown();
|
||||
|
||||
/* Shutdown xmlsec library */
|
||||
xmlSecShutdown();
|
||||
|
||||
/* Shutdown libxslt/libxml */
|
||||
#ifndef XMLSEC_NO_XSLT
|
||||
xsltCleanupGlobals();
|
||||
#endif /* XMLSEC_NO_XSLT */
|
||||
xmlCleanupParser();
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</chapter>
|
||||
@ -1,462 +0,0 @@
|
||||
<chapter id="xmlsec-notes-new-crypto">
|
||||
<title>Adding support for new cryptographic library.</title>
|
||||
<sect1 id="xmlsec-notes-new-crypto-overview">
|
||||
<title>Overview.</title>
|
||||
<para>XML Security Library can support practicaly any cryptographic
|
||||
library. Currently, it has "out-of-the-box" support for OpenSSL,
|
||||
MSCrypto, NSS, GnuTLS and GCrypt. If your favorite library is not supported yet then
|
||||
you can write necessary code yourself. If you and your company
|
||||
(university, ...) are willing to share the results of your work I would
|
||||
be happy to add support for new libraries to the main XML Security
|
||||
Library distribution.</para>
|
||||
<para>
|
||||
The XML Security Library
|
||||
<link linkend="xmlsec-notes-structure">separates</link>
|
||||
the cryptographic library (engine)
|
||||
specific code in an "xmlsec-<crypto>" library (where "<crypto>" is
|
||||
"openssl", "mscrypt", "gnutls", "gcrypt", "nss", etc.) which includes following items:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
xmlSecCryptoApp* functions.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Cryptographic transforms and keys data implementation.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Keys store support (X509, PGP, etc.).
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
In this chapter, we will discuss
|
||||
a task of creating "xmlsec-mycrypto" library that provides support
|
||||
for your favorite "MyCrypto" cryptographic library.
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-new-crypto-skeleton">
|
||||
<title>Creating a framework from the skeleton.</title>
|
||||
<para>
|
||||
The XML Security Library contains a "skeleton" for creating new
|
||||
"xmlsec-<crypto>" libraries. In order to create "xmlsec-mycrypto"
|
||||
library framework, do the following (this example assumes that you
|
||||
are using *nix system, adjust the commands if you are using something else):
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Copy src/skeleton and include/xmlsec/skeleton folders to src/mycrypto and
|
||||
include/xmlsec/mycrypto folders:
|
||||
<example>
|
||||
<title>Coping skeleton folders:</title>
|
||||
<programlisting><![CDATA[
|
||||
cp -r src/skeleton src/mycrypto
|
||||
cp -r include/xmlsec/skeleton include/xmlsec/mycrypto
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Replace "skeleton" with "mycrypto" in the copied files (note that there
|
||||
are different possible cases here):
|
||||
<example>
|
||||
<title>Replacing "skeleton" with "mycrypto".</title>
|
||||
<programlisting><![CDATA[
|
||||
for i in `ls include/xmlsec/mycrypto/* src/mycrypto/*`; do
|
||||
echo Processing $i ..;
|
||||
sed 's/skeleton/mycrypto/g' $i | \
|
||||
sed 's/SKELETON/MYCRYPTO/g' | \
|
||||
sed 's/Skeleton/MyCrypto/g' > $i.tmp;
|
||||
mv $i.tmp $i;
|
||||
done
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Add "xmlsec-mycrypto" library to the "include/xmlsec/crypto.h" file:
|
||||
<example>
|
||||
<title>Modifying include/xmlsec/crypto.h file.</title>
|
||||
<programlisting><![CDATA[
|
||||
...
|
||||
#ifdef XMLSEC_CRYPTO_MYCRYPTO
|
||||
#include <xmlsec/mycrypto/app.h>
|
||||
#include <xmlsec/mycrypto/crypto.h>
|
||||
#include <xmlsec/mycrypto/symbols.h>
|
||||
#else /* XMLSEC_CRYPTO_MYCRYPTO */
|
||||
...
|
||||
#endif /* XMLSEC_CRYPTO_MYCRYPTO */
|
||||
...
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Add "xmlsec-crypto" library to the configure.in file (for *nix systems;
|
||||
for Windows you need to modify win32/confgure.js and win32/Makefile.msvc
|
||||
files, see win32/README.txt for details):
|
||||
<example>
|
||||
<title>Modifying configure.in file.</title>
|
||||
<programlisting><![CDATA[
|
||||
dnl ==========================================================================
|
||||
dnl See if we can find MyCrypto
|
||||
dnl ==========================================================================
|
||||
XMLSEC_MYCRYPTO_DEFINES=""
|
||||
MYCRYPTO_CONFIG="mycrypto-config" # TODO
|
||||
XMLSEC_NO_MYCRYPTO="1"
|
||||
MYCRYPTO_MIN_VERSION="0.0.0" # TODO
|
||||
MYCRYPTO_VERSION=""
|
||||
MYCRYPTO_PREFIX=""
|
||||
MYCRYPTO_CFLAGS=""
|
||||
MYCRYPTO_LIBS=""
|
||||
MYCRYPTO_LDADDS=""
|
||||
AC_MSG_CHECKING(for mycrypto libraries >= $MYCRYPTO_MIN_VERSION)
|
||||
AC_ARG_WITH(mycrypto, [ --with-mycrypto=[PFX] mycrypto location])
|
||||
if test "$with_mycrypto" = "no" ; then
|
||||
XMLSEC_CRYPTO_DISABLED_LIST="$XMLSEC_CRYPTO_DISABLED_LIST mycrypto"
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
if test "$with_mycrypto" != "" ; then
|
||||
MYCRYPTO_PREFIX=$with_mycrypto
|
||||
MYCRYPTO_CONFIG=$MYCRYPTO_PREFIX/bin/$MYCRYPTO_CONFIG
|
||||
fi
|
||||
if ! $MYCRYPTO_CONFIG --version > /dev/null 2>&1 ; then
|
||||
if test "$with_mycrypto" != "" ; then
|
||||
AC_MSG_ERROR(Unable to find mycrypto at '$with_mycrypto')
|
||||
fi
|
||||
else
|
||||
vers=`$MYCRYPTO_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
|
||||
minvers=`echo $MYCRYPTO_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
|
||||
if test "$vers" -ge "$minvers" ; then
|
||||
MYCRYPTO_LIBS="`$MYCRYPTO_CONFIG --libs`"
|
||||
MYCRYPTO_CFLAGS="`$MYCRYPTO_CONFIG --cflags`"
|
||||
MYCRYPTO_VERSION="`$MYCRYPTO_CONFIG --version`"
|
||||
XMLSEC_NO_MYCRYPTO="0"
|
||||
else
|
||||
AC_MSG_ERROR(You need at least mycrypto $MYCRYPTO_MIN_VERSION for this version of $PACKAGE)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl update crypt libraries list
|
||||
if test "z$XMLSEC_NO_MYCRYPTO" = "z0" ; then
|
||||
dnl first crypto library is default one
|
||||
if test "z$XMLSEC_CRYPTO" = "z" ; then
|
||||
XMLSEC_CRYPTO="mycrypto"
|
||||
XMLSEC_CRYPTO_LIB="xmlsec1-mycrypto"
|
||||
XMLSEC_CRYPTO_CFLAGS="$MYCRYPTO_CFLAGS -DXMLSEC_CRYPTO_MYCRYPTO=1"
|
||||
XMLSEC_CRYPTO_LIBS="$MYCRYPTO_LIBS"
|
||||
XMLSEC_CRYPTO_LDADDS="$MYCRYPTO_LDADDS"
|
||||
fi
|
||||
XMLSEC_CRYPTO_LIST="$XMLSEC_CRYPTO_LIST mycrypto"
|
||||
AC_MSG_RESULT(yes ('$MYCRYPTO_VERSION'))
|
||||
else
|
||||
XMLSEC_CRYPTO_DISABLED_LIST="$XMLSEC_CRYPTO_DISABLED_LIST mycrypto"
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(XMLSEC_NO_MYCRYPTO)
|
||||
AC_SUBST(MYCRYPTO_MIN_VERSION)
|
||||
AC_SUBST(MYCRYPTO_VERSION)
|
||||
AC_SUBST(MYCRYPTO_CONFIG)
|
||||
AC_SUBST(MYCRYPTO_PREFIX)
|
||||
AC_SUBST(MYCRYPTO_CFLAGS)
|
||||
AC_SUBST(MYCRYPTO_LIBS)
|
||||
AC_SUBST(MYCRYPTO_LDADDS)
|
||||
AC_SUBST(XMLSEC_MYCRYPTO_DEFINES)
|
||||
|
||||
...
|
||||
AC_OUTPUT([
|
||||
...
|
||||
include/xmlsec/mycrypto/Makefile
|
||||
src/mycrypto/Makefile
|
||||
...
|
||||
])
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para></listitem>
|
||||
<listitem><para>Modify "xmlsec.spec.in" file to create "xmlsec-mycrypto"
|
||||
RPM (if necessary).
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
By now you should be able to sucessfuly compile XML Security Library
|
||||
with MyCrypto library (we disable all other libraries to make sure
|
||||
that xmlsec command line utility is linked against xmlsec-mycrypto
|
||||
library):
|
||||
<example>
|
||||
<title>Compiling the results.</title>
|
||||
<programlisting><![CDATA[
|
||||
./autogen.sh --without-openssl --without-nss --without-gnutls --without-gcrypt \
|
||||
--with-mycrypto=$HOME --disable-tmpl-tests
|
||||
make
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-new-crypto-functions">
|
||||
<title>xmlSecCryptoApp* functions.</title>
|
||||
<para>
|
||||
The XML Security Library allows application to load multiple
|
||||
"xmlsec-<crypto> libraries. To prevent symbol conflicts,
|
||||
all "xmlsec-mycrypto" library names MUST start with "xmlSecMyCrypto".
|
||||
However, in some applications (for example, the xmlsec command line
|
||||
utility) that can use any crypto library, would prefer to
|
||||
use a generic function names where possible.
|
||||
The "include/xmlsec/crypto.h" and "include/xmlsec/mycrypto/symbols.h"
|
||||
include files do the magic by mapping "xmlSecMyCrypto*" to
|
||||
"xmlSecCrypto*" names using "XMLSEC_CRYPTO_*" defines.
|
||||
</para>
|
||||
<para>
|
||||
In order to build xmlsec command line utility, the
|
||||
"xmlsec-<crypto>" library must implement several functions.
|
||||
The stubs for all these functions are provided in the "skeleton"
|
||||
we've created. While these functions are not required to be
|
||||
implemented by "xmlsec-<crypto>" library, you should consider
|
||||
doing so (if possible) to simplify testing (thru xmlsec command line
|
||||
utility) and application development.
|
||||
</para>
|
||||
<para>
|
||||
In adition to xmlSecCryptoApp* functions, the xmlsec-<crypto>
|
||||
library MUST implement following xmlSecCrypto* functions:
|
||||
<table>
|
||||
<title>xmlSecCrypto* functions.</title>
|
||||
<tgroup cols="2"><tbody>
|
||||
<row><entry>xmlSecCryptoInit()</entry>
|
||||
<entry>Initializes xmlsec-<crypto> library: registers cryptographic
|
||||
transforms implemented by the library, keys, etc.
|
||||
Please note, that the application might want to intialize
|
||||
the cryprographic library by itself. The default cryprographic
|
||||
library initialization (for example, used by xmlsec utility)
|
||||
is implemented in xmlSecCryptoAppInit() function.
|
||||
</entry></row>
|
||||
<row><entry>xmlSecCryptoShutdown()</entry>
|
||||
<entry>Shuts down xmlsec-<crypto> library.
|
||||
Please note, that the application might want to shutdown
|
||||
the cryprographic library by itself. The default cryprographic
|
||||
library shutdown (for example, used by xmlsec utility)
|
||||
is implemented in xmlSecCryptoAppShutdown() function.
|
||||
</entry></row>
|
||||
<row><entry>xmlSecCryptoKeysMngrInit()</entry>
|
||||
<entry>Adds keys stores implemented by the xmlsec-<crypto> library
|
||||
to the keys manager object.
|
||||
</entry></row>
|
||||
</tbody></tgroup></table>
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-new-crypto-klasses">
|
||||
<title>Klasses and objects.</title>
|
||||
<para>The XML Security Library is written in C but it uses some OOP techniques:
|
||||
the objects in the library have "klasses" and there is "klasses" inheritance.
|
||||
(see <link linkend="xmlsec-signature-klasses">signature</link> and
|
||||
<link linkend="xmlsec-encryption-klasses">encryption</link> klasses
|
||||
diagrams). The "klass" is different from C++ "class" (btw, this is
|
||||
one of the reasons why it is spelled differently). The idea of "klasses"
|
||||
used in XML Security Library are close to one in the GLIB/GTK/GNOME
|
||||
and many other C projects. If you ever seen an OOP code written in C
|
||||
you should find everything familiar.
|
||||
</para>
|
||||
<para>XML Security Library "klass" includes three main parts:
|
||||
<itemizedlist>
|
||||
<listitem><para>"Klass" declaration structure that defines "klass" interfaces
|
||||
and global constant data (for example, the human-readable name of
|
||||
the "klass").
|
||||
<example>
|
||||
<title>Base transform "klass" and its child XPath transform "klass" structure.</title>
|
||||
<programlisting><![CDATA[
|
||||
struct _xmlSecTransformKlass {
|
||||
/* data */
|
||||
size_t klassSize;
|
||||
size_t objSize;
|
||||
const xmlChar* name;
|
||||
const xmlChar* href;
|
||||
xmlSecTransformUsage usage;
|
||||
|
||||
/* methods */
|
||||
xmlSecTransformInitializeMethod initialize;
|
||||
xmlSecTransformFinalizeMethod finalize;
|
||||
|
||||
xmlSecTransformNodeReadMethod readNode;
|
||||
xmlSecTransformNodeWriteMethod writeNode;
|
||||
|
||||
...
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
static xmlSecTransformKlass xmlSecTransformXPathKlass = {
|
||||
/* klass/object sizes */
|
||||
sizeof(xmlSecTransformKlass), /* size_t klassSize */
|
||||
xmlSecXPathTransformSize, /* size_t objSize */
|
||||
|
||||
xmlSecNameXPath, /* const xmlChar* name; */
|
||||
xmlSecXPathNs, /* const xmlChar* href; */
|
||||
xmlSecTransformUsageDSigTransform, /* xmlSecTransformUsage usage; */
|
||||
|
||||
xmlSecTransformXPathInitialize, /* xmlSecTransformInitializeMethod initialize; */
|
||||
xmlSecTransformXPathFinalize, /* xmlSecTransformFinalizeMethod finalize; */
|
||||
xmlSecTransformXPathNodeRead, /* xmlSecTransformNodeReadMethod readNode; */
|
||||
NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
|
||||
|
||||
...
|
||||
};
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>"Klass" id which is simply a pointer to the "klass"
|
||||
declaration strucutre. "Klass" id is used to bind "klass" objects
|
||||
to the "klass" declaration and to pass "klass" strucutre to functions.
|
||||
<example>
|
||||
<title>Base transform "klass" id declaration and its child XPath transform "klass" id implementation.</title>
|
||||
<programlisting><![CDATA[
|
||||
typedef const struct _xmlSecTransformKlass xmlSecTransformKlass, *xmlSecTransformId;
|
||||
|
||||
...
|
||||
|
||||
#define xmlSecTransformXPathId xmlSecTransformXPathGetKlass()
|
||||
|
||||
...
|
||||
|
||||
xmlSecTransformId
|
||||
xmlSecTransformXPathGetKlass(void) {
|
||||
return(&xmlSecTransformXPathKlass);
|
||||
}
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>"Klass" object structure that contains object specific
|
||||
data. The child object specific data are placed after the parent "klass"
|
||||
object data.
|
||||
<example>
|
||||
<title>Base transform object strucutre and its child XPath transform object.</title>
|
||||
<programlisting><![CDATA[
|
||||
struct _xmlSecTransform {
|
||||
xmlSecTransformId id;
|
||||
xmlSecTransformOperation operation;
|
||||
xmlSecTransformStatus status;
|
||||
xmlNodePtr hereNode;
|
||||
|
||||
/* transforms chain */
|
||||
xmlSecTransformPtr next;
|
||||
xmlSecTransformPtr prev;
|
||||
|
||||
...
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* XPath/XPointer transforms
|
||||
*
|
||||
* xmlSecPtrList with XPath expressions is located after xmlSecTransform structure
|
||||
*
|
||||
*****************************************************************************/
|
||||
#define xmlSecXPathTransformSize \
|
||||
(sizeof(xmlSecTransform) + sizeof(xmlSecPtrList))
|
||||
#define xmlSecXPathTransformGetDataList(transform) \
|
||||
((xmlSecTransformCheckSize((transform), xmlSecXPathTransformSize)) ? \
|
||||
(xmlSecPtrListPtr)(((unsigned char*)(transform)) + sizeof(xmlSecTransform)) : \
|
||||
(xmlSecPtrListPtr)NULL)
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-new-crypto-transforms">
|
||||
<title>Cryptographic transforms.</title>
|
||||
<para>The cryptographic transforms (digests, signatures and encryption)
|
||||
implementation is the main goal of "xmlsec-<crypto>" library.
|
||||
Most of the cryptographic <link linkend="xmlsec-notes-transforms">transforms</link>
|
||||
use default <structfield>pushBin</structfield> and <structfield>popBin</structfield>
|
||||
methods and provide custom <link linkend="xmlSecTransformExecuteMethod">execute</link> method.
|
||||
The binary transform <link linkend="xmlSecTransformExecuteMethod">execute</link> method
|
||||
processes data from the input buffer
|
||||
<structfield>inBuf</structfield> and pushes results to
|
||||
<structfield>outBuf</structfield>. The transform should try to
|
||||
consume and remove data from <structfield>inBuf</structfield> buffer
|
||||
as soon as the data became available. However, it might happen
|
||||
that current data size in the input buffer is not enough (for example,
|
||||
RSA-PKCS1 algorithm requires that all the data are available in
|
||||
one buffer). In this case, transform might keep the data in the
|
||||
input buffer till the next call to
|
||||
<link linkend="xmlSecTransformExecuteMethod">execute</link>
|
||||
method. The "last" parameter of the
|
||||
<link linkend="xmlSecTransformExecuteMethod">execute</link>
|
||||
indicates that transform MUST process all the data in the input buffer
|
||||
and return as much as possible in the output buffer. The
|
||||
<link linkend="xmlSecTransformExecuteMethod">execute</link> method
|
||||
might be called multiple times with non-zero "last" parameter until
|
||||
the transforms returns nothing
|
||||
in the output buffer. In addition, the transform implementation is
|
||||
responsible for managing the transform <structfield>status</structfield>
|
||||
variable.
|
||||
<table>
|
||||
<title>Typical transform status managing.</title>
|
||||
<tgroup cols="2"><tbody>
|
||||
<row><entry>xmlSecTransformStatusNone</entry>
|
||||
<entry>Transform initializes itself (for example, cipher transform
|
||||
generates or reads IV) and sets <structfield>status</structfield>
|
||||
variable to xmlSecTransformStatusWorking.</entry></row>
|
||||
<row><entry>xmlSecTransformStatusWorking</entry>
|
||||
<entry>Transform process the next (if "last" parameter is zero) or
|
||||
last block of data (if "last" parameter is non-zero).
|
||||
When transform returns all the data, it sets the
|
||||
<structfield>status</structfield> variable to
|
||||
xmlSecTransformStatusFinished.</entry></row>
|
||||
<row><entry>xmlSecTransformStatusFinished</entry>
|
||||
<entry>Transform returns no data to indicate that it finished
|
||||
processing.</entry></row>
|
||||
</tbody></tgroup></table>
|
||||
</para>
|
||||
<para>In adition to <link linkend="xmlSecTransformExecuteMethod">execute</link>
|
||||
methods, signature, hmac or digest transforms
|
||||
MUST implement <link linkend="xmlSecTransformVerifyMethod">verify</link> method.
|
||||
The <link linkend="xmlSecTransformVerifyMethod">verify</link> method is called
|
||||
after transform execution is finished. The
|
||||
<link linkend="xmlSecTransformVerifyMethod">verify</link> method implementation
|
||||
must set the "status" member to <link linkend="xmlSecTransformStatusOk">xmlSecTransformStatusOk</link>
|
||||
if signature, hmac or digest is successfuly verified or to
|
||||
<link linkend="xmlSecTransformStatusFail">xmlSecTransformStatusFail</link>
|
||||
otherwise.
|
||||
</para>
|
||||
<para>The transforms that require a key (signature or encryption
|
||||
transforms, for example) MUST imlpement
|
||||
<link linkend="xmlSecTransformSetKeyRequirementsMethod">setKeyReq</link>
|
||||
(prepares the <link linkend="xmlSecKeyReq">key requirements</link>
|
||||
for key search) and
|
||||
<link linkend="xmlSecTransformSetKeyMethod">setKey</link>
|
||||
(sets the key in the transform) methods.
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-new-crypto-keys">
|
||||
<title>Keys data and keys data stores.</title>
|
||||
<para>
|
||||
There are two key data types: key value data (for example, AES, DES, DSA,
|
||||
HMAC or RSA key data) and others (for example, key name, X509 or PGP data).
|
||||
The key data implementation should implement at least one of
|
||||
<link linkend="xmlSecKeyDataXmlReadMethod">xmlRead</link>
|
||||
or <link linkend="xmlSecKeyDataBinReadMethod">binRead</link> methods.
|
||||
</para>
|
||||
<para>TODO</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-new-crypto-simple-keys-mngr">
|
||||
<title>Default keys manager.</title>
|
||||
<para>Any "xmlsec-<crypto>" library implementation must provide
|
||||
a default keys store. The XML Security Library has a built-in flat
|
||||
list based <link linkend="xmlSecSimpleKeysStoreId">simple keys
|
||||
store</link> which could be used if cryptographic library does not
|
||||
have one itself.
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="xmlsec-notes-new-crypto-sharing-results">
|
||||
<title>Sharing the results.</title>
|
||||
<para>If you implemented support for new cryptographic library
|
||||
(or extended an existing one) and both you and your company/university/...
|
||||
are willing to share the code I would be glad to add your work
|
||||
to XML Security Library. Many people will thank you for this
|
||||
and will use your library. Of course, you'll get all the credits
|
||||
for your work.
|
||||
</para>
|
||||
<para>The best way to submit your enchancements is to send a pull request
|
||||
through <ulink URL="https://github.com/lsh123/xmlsec">GitHub</ulink>.
|
||||
I will try to review and merge your pool request as soon as possible.
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
|
||||
@ -1,286 +0,0 @@
|
||||
<chapter id="xmlsec-notes-sign-encrypt">
|
||||
<title>Signing and encrypting documents.</title>
|
||||
<sect1 id="xmlsec-notes-sign-encrypt-overview">
|
||||
<title>Overview.</title>
|
||||
<para>XML Security Library performs signature or encryption by processing
|
||||
input xml or binary data and a template that specifies a signature or
|
||||
encryption skeleton: the transforms, algorithms, the key selection
|
||||
process. A template has the same structure as the desired result but
|
||||
some of the nodes are empty. XML Security Library gets the key for
|
||||
signature/encryption from keys managers using the information from
|
||||
the template, does necessary computations and puts the results in
|
||||
the template. Signature or encryption context controls the whole
|
||||
process and stores the required temporary data.
|
||||
<figure>
|
||||
<title>The signature or encryption processing model.</title>
|
||||
<graphic fileref="images/sign-enc-model.png" align="center"></graphic>
|
||||
</figure>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-notes-sign" >
|
||||
<title>Signing a document.</title>
|
||||
<para>The typical signature process includes following steps:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Prepare data for signature.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Create or load signature template and select start
|
||||
<ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-Signature"><dsig:Signature/></ulink>
|
||||
node.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Create signature context <link linkend="xmlSecDSigCtx">xmlSecDSigCtx</link>
|
||||
using <link linkend="xmlSecDSigCtxCreate">xmlSecDSigCtxCreate</link> or
|
||||
<link linkend="xmlSecDSigCtxInitialize">xmlSecDSigCtxInitialize</link>
|
||||
functions.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Load signature key in <link linkend="xmlSecKeysMngr">keys manager</link>
|
||||
or generate a session key and set it in the signature context
|
||||
(<structfield>signKey</structfield> member of
|
||||
<link linkend="xmlSecDSigCtx">xmlSecDSigCtx</link> structure).
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Sign data by calling <link linkend="xmlSecDSigCtxSign">xmlSecDSigCtxSign</link>
|
||||
function.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Check returned value and consume signed data.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Destroy signature context <link linkend="xmlSecDSigCtx">xmlSecDSigCtx</link>
|
||||
using <link linkend="xmlSecDSigCtxDestroy">xmlSecDSigCtxDestroy</link> or
|
||||
<link linkend="xmlSecDSigCtxFinalize">xmlSecDSigCtxFinalize</link>
|
||||
functions.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Signing a template.</title>
|
||||
<programlisting><![CDATA[
|
||||
/**
|
||||
* sign_file:
|
||||
* @tmpl_file: the signature template file name.
|
||||
* @key_file: the PEM private key file name.
|
||||
*
|
||||
* Signs the #tmpl_file using private key from #key_file.
|
||||
*
|
||||
* Returns 0 on success or a negative value if an error occurs.
|
||||
*/
|
||||
int
|
||||
sign_file(const char* tmpl_file, const char* key_file) {
|
||||
xmlDocPtr doc = NULL;
|
||||
xmlNodePtr node = NULL;
|
||||
xmlSecDSigCtxPtr dsigCtx = NULL;
|
||||
int res = -1;
|
||||
|
||||
assert(tmpl_file);
|
||||
assert(key_file);
|
||||
|
||||
/* load template */
|
||||
doc = xmlParseFile(tmpl_file);
|
||||
if ((doc == NULL) || (xmlDocGetRootElement(doc) == NULL)){
|
||||
fprintf(stderr, "Error: unable to parse file \"%s\"\n", tmpl_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* find start node */
|
||||
node = xmlSecFindNode(xmlDocGetRootElement(doc), xmlSecNodeSignature, xmlSecDSigNs);
|
||||
if(node == NULL) {
|
||||
fprintf(stderr, "Error: start node not found in \"%s\"\n", tmpl_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* create signature context, we don't need keys manager in this example */
|
||||
dsigCtx = xmlSecDSigCtxCreate(NULL);
|
||||
if(dsigCtx == NULL) {
|
||||
fprintf(stderr,"Error: failed to create signature context\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* load private key, assuming that there is not password */
|
||||
dsigCtx->signKey = xmlSecCryptoAppKeyLoad(key_file, xmlSecKeyDataFormatPem, NULL, NULL, NULL);
|
||||
if(dsigCtx->signKey == NULL) {
|
||||
fprintf(stderr,"Error: failed to load private pem key from \"%s\"\n", key_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* set key name to the file name, this is just an example! */
|
||||
if(xmlSecKeySetName(dsigCtx->signKey, key_file) < 0) {
|
||||
fprintf(stderr,"Error: failed to set key name for key from \"%s\"\n", key_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* sign the template */
|
||||
if(xmlSecDSigCtxSign(dsigCtx, node) < 0) {
|
||||
fprintf(stderr,"Error: signature failed\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* print signed document to stdout */
|
||||
xmlDocDump(stdout, doc);
|
||||
|
||||
/* success */
|
||||
res = 0;
|
||||
|
||||
done:
|
||||
/* cleanup */
|
||||
if(dsigCtx != NULL) {
|
||||
xmlSecDSigCtxDestroy(dsigCtx);
|
||||
}
|
||||
|
||||
if(doc != NULL) {
|
||||
xmlFreeDoc(doc);
|
||||
}
|
||||
return(res);
|
||||
}
|
||||
]]></programlisting>
|
||||
<simpara><link linkend="xmlsec-example-sign1">Full program listing</link></simpara>
|
||||
<simpara><link linkend="xmlsec-example-sign1-tmpl">Simple signature template file</link></simpara>
|
||||
</example>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="xmlsec-notes-encrypt">
|
||||
<title>Encrypting data.</title>
|
||||
<para>The typical encryption process includes following steps:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Prepare data for encryption.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Create or load encryption template and select start
|
||||
<enc:EncryptedData/> node.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Create encryption context <link linkend="xmlSecEncCtx">xmlSecEncCtx</link>
|
||||
using <link linkend="xmlSecEncCtxCreate">xmlSecEncCtxCreate</link> or
|
||||
<link linkend="xmlSecEncCtxInitialize">xmlSecEncCtxInitialize</link>
|
||||
functions.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Load encryption key in <link linkend="xmlSecKeysMngr">keys manager</link>
|
||||
or generate a session key and set it in the encryption context
|
||||
(<structfield>encKey</structfield> member of
|
||||
<link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure).
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Encrypt data by calling one of the following functions:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<link linkend="xmlSecEncCtxBinaryEncrypt">xmlSecEncCtxBinaryEncrypt</link>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<link linkend="xmlSecEncCtxXmlEncrypt">xmlSecEncCtxXmlEncrypt</link>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<link linkend="xmlSecEncCtxUriEncrypt">xmlSecEncCtxUriEncrypt</link>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Check returned value and if necessary consume encrypted data.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Destroy encryption context <link linkend="xmlSecEncCtx">xmlSecEncCtx</link>
|
||||
using <link linkend="xmlSecEncCtxDestroy">xmlSecEncCtxDestroy</link> or
|
||||
<link linkend="xmlSecEncCtxFinalize">xmlSecEncCtxFinalize</link>
|
||||
functions.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Encrypting binary data with a template.</title>
|
||||
<programlisting><![CDATA[
|
||||
/**
|
||||
* encrypt_file:
|
||||
* @tmpl_file: the encryption template file name.
|
||||
* @key_file: the Triple DES key file.
|
||||
* @data: the binary data to encrypt.
|
||||
* @dataSize: the binary data size.
|
||||
*
|
||||
* Encrypts binary #data using template from #tmpl_file and DES key from
|
||||
* #key_file.
|
||||
*
|
||||
* Returns 0 on success or a negative value if an error occurs.
|
||||
*/
|
||||
int
|
||||
encrypt_file(const char* tmpl_file, const char* key_file, const unsigned char* data, size_t dataSize) {
|
||||
xmlDocPtr doc = NULL;
|
||||
xmlNodePtr node = NULL;
|
||||
xmlSecEncCtxPtr encCtx = NULL;
|
||||
int res = -1;
|
||||
|
||||
assert(tmpl_file);
|
||||
assert(key_file);
|
||||
assert(data);
|
||||
|
||||
/* load template */
|
||||
doc = xmlParseFile(tmpl_file);
|
||||
if ((doc == NULL) || (xmlDocGetRootElement(doc) == NULL)){
|
||||
fprintf(stderr, "Error: unable to parse file \"%s\"\n", tmpl_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* find start node */
|
||||
node = xmlSecFindNode(xmlDocGetRootElement(doc), xmlSecNodeEncryptedData, xmlSecEncNs);
|
||||
if(node == NULL) {
|
||||
fprintf(stderr, "Error: start node not found in \"%s\"\n", tmpl_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* create encryption context, we don't need keys manager in this example */
|
||||
encCtx = xmlSecEncCtxCreate(NULL);
|
||||
if(encCtx == NULL) {
|
||||
fprintf(stderr,"Error: failed to create encryption context\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* load DES key */
|
||||
encCtx->encKey = xmlSecKeyReadBinaryFile(xmlSecKeyDataDesId, key_file);
|
||||
if(encCtx->encKey == NULL) {
|
||||
fprintf(stderr,"Error: failed to load des key from binary file \"%s\"\n", key_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* set key name to the file name, this is just an example! */
|
||||
if(xmlSecKeySetName(encCtx->encKey, key_file) < 0) {
|
||||
fprintf(stderr,"Error: failed to set key name for key from \"%s\"\n", key_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* encrypt the data */
|
||||
if(xmlSecEncCtxBinaryEncrypt(encCtx, node, data, dataSize) < 0) {
|
||||
fprintf(stderr,"Error: encryption failed\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* print encrypted data with document to stdout */
|
||||
xmlDocDump(stdout, doc);
|
||||
|
||||
/* success */
|
||||
res = 0;
|
||||
|
||||
done:
|
||||
/* cleanup */
|
||||
if(encCtx != NULL) {
|
||||
xmlSecEncCtxDestroy(encCtx);
|
||||
}
|
||||
|
||||
if(doc != NULL) {
|
||||
xmlFreeDoc(doc);
|
||||
}
|
||||
return(res);
|
||||
}
|
||||
]]></programlisting>
|
||||
<simpara><link linkend="xmlsec-example-encrypt1">Full program listing</link></simpara>
|
||||
<simpara><link linkend="xmlsec-example-encrypt1-tmpl">Simple encryption template file</link></simpara>
|
||||
</example>
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||