This file is indexed.

/usr/include/Poco/Crypto/ECKey.h is in libpoco-dev 1.8.0.1-1ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
//
// ECKey.h
//
//
// Library: Crypto
// Package: EC
// Module:  ECKey
//
// Definition of the ECKey class.
//
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier:	BSL-1.0
//


#ifndef Crypto_ECKey_INCLUDED
#define Crypto_ECKey_INCLUDED


#include "Poco/Crypto/Crypto.h"
#include "Poco/Crypto/KeyPair.h"
#include "Poco/Crypto/ECKeyImpl.h"


namespace Poco {
namespace Crypto {


class X509Certificate;
class PKCS12Container;


class Crypto_API ECKey : public KeyPair
	/// This class stores an EC key pair, consisting
	/// of private and public key. Storage of the private
	/// key is optional.
	///
	/// If a private key is available, the ECKey can be
	/// used for decrypting data (encrypted with the public key)
	/// or computing secure digital signatures.
{
public:
	ECKey(const EVPPKey& key);
		/// Constructs ECKeyImpl by extracting the EC key.

	ECKey(const X509Certificate& cert);
		/// Extracts the EC public key from the given certificate.

	ECKey(const PKCS12Container& cert);
		/// Extracts the EC private key from the given certificate.

	ECKey(const std::string& eccGroup);
		/// Creates the ECKey. Creates a new public/private keypair using the given parameters.
		/// Can be used to sign data and verify signatures.

	ECKey(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase = "");
		/// Creates the ECKey, by reading public and private key from the given files and
		/// using the given passphrase for the private key.
		///
		/// Cannot be used for signing or decryption unless a private key is available.
		///
		/// If a private key is specified, you don't need to specify a public key file.
		/// OpenSSL will auto-create the public key from the private key.

	ECKey(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream = 0, const std::string& privateKeyPassphrase = "");
		/// Creates the ECKey, by reading public and private key from the given streams and
		/// using the given passphrase for the private key.
		///
		/// Cannot be used for signing or decryption unless a private key is available.
		///
		/// If a private key is specified, you don't need to specify a public key file.
		/// OpenSSL will auto-create the public key from the private key.

	~ECKey();
		/// Destroys the ECKey.

	ECKeyImpl::Ptr impl() const;
		/// Returns the impl object.

	static std::string getCurveName(int nid = -1);
		/// Returns elliptical curve name corresponding to
		/// the given nid; if nid is not found, returns
		/// empty string.
		///
		/// If nid is -1, returns first curve name.
		///
		/// If no curves are found, returns empty string;

private:
	ECKeyImpl::Ptr _pImpl;
};


//
// inlines
//
inline ECKeyImpl::Ptr ECKey::impl() const
{
	return _pImpl;
}


inline std::string ECKey::getCurveName(int nid)
{
	return ECKeyImpl::getCurveName(nid);
}


} } // namespace Poco::Crypto


#endif // Crypto_ECKey_INCLUDED