Professional Documents
Culture Documents
wodKeys help
Table of contents
Page
Title
License Agreement
Objects
Enumerations Object
SSHKeyTypes Enumeration
10
Keys Object
11
Keys Methods
12
FromXmlString method
13
Generate method
15
Load method
17
PublicKeyLoad method
18
PublicKeySave method
19
Save method
20
ToXmlString method
21
Keys Properties
22
BitCount property
23
BubbleBabble property
24
FingerPrint property
25
FingerPrintData property
26
PrivateKey property
27
PrivateKeyData property
29
PublicKey property
30
PublicKeyData property
31
PublicKeyOpenSSH property
32
PublicKeyRSA1 property
33
PublicKeySSH property
34
Version property
35
Page 2 of 37
36
Technical information
37
Error list
Page 3 of 37
Platforms
Windows
wodKeys Introduction
Page 4 of 37
License Agreement
WeOnlyDo! SOFTWARE LICENSE AGREEMENT
This is a legal agreement between you (either an individual or an entity) and WeOnlyDo! Software ("WeOnlyDo!"). By installing the enclosed software, you are
agreeing to be bound by the terms of this Agreement. If you do not agree to the terms of this Agreement, promptly return the software and the accompanying items to
the place you obtained them for a full refund. If you need to return the software, you must prepay shipping and either insure the package or assume all risk of loss or
damage in transit.
WeOnlyDo! LICENSE
1. GRANT OF LICENSE TO USE. The WeOnlyDo! Software product that accompanies this license is referred to herein as "SOFTWARE." WeOnlyDo! Software
("WeOnlyDo") grants to you as an individual, a personal, non-exclusive license to make and use the SOFTWARE for the sole purpose of designing, developing, and
testing your software product(s). WeOnlyDo! Software grants to you the limited right to use only one copy of the Software on a single computer in the manner set forth
in this agreement. If you are an entity, WeOnlyDo! Software grants you the right to designate one individual within your organization to have the right to use the
SOFTWARE in the manner provided above. WeOnlyDo! Software reserves all rights not expressly granted.
2. UPDATES. Upon receipt of future updates of the SOFTWARE (including without limitation the Redistributable Code)(an "UPDATE"), you may use or transfer the
UPDATE only in conjunction with your then-existing SOFTWARE. The SOFTWARE and all UPDATES (including bug fixes and error corrections) shall be provided by
WeOnlyDo! To you and are licensed as a single product, and the UPDATES may not be separated from the SOFTWARE for use by more than one user at any time.
3. COPYRIGHT. The SOFTWARE is owned by WeOnlyDo! Software or its suppliers and is protected by copyright laws and international treaty provisions. Therefore,
you must treat the SOFTWARE like any other copyrighted material (e.g., a book or musical recording). You may not use or copy the SOFTWARE or any accompanying
written materials for any purposes other than what is described in this Agreement. WeOnlyDo! warrants that WeOnlyDo! is the sole owner of all patents, copyrights or
other applicable intellectual property rights in and to the SOFTWARE unless otherwise indicated in the documentation for the SOFTWARE. WeOnlyDo! shall defend,
indemnify, and hold Licensee harmless from any third party claims, including reasonable attorneys' fees, alleging that Software (including without limitation Sample
Code) licensed hereunder infringes or misappropriates third party intellectual property rights.
4. OTHER RESTRICTIONS. You may not rent or lease the SOFTWARE, but you may transfer the SOFTWARE and accompanying written materials on a permanent
basis, provided you retain no copies and the recipient agrees to the terms of this Agreement. You may not reverse-engineer, decompile, or disassemble the
SOFTWARE except to the extent such foregoing restriction is expressly prohibited by applicable law.
5. REDISTRIBUTABLE CODE. Portions of the SOFTWARE (specifically the run time modules in binary form) are designated as "Redistributable Code", subject to the
Distribution Requirements described below.
6. SAMPLE CODE. WeOnlyDo! Software grants you the right to use and modify the source code version of the included Sample Code for the sole purpose of
designing, developing, testing and supporting your software products. You may also reproduce and distribute the Sample Code in object code form along with any
modifications you make to the Sample Code, provided that you comply with the Distribution Requirements described below. For purposes of this section,
"modifications" shall mean enhancements to the functionality of the Sample Code.
7. SOURCE CODE. If you have purchased the SOFTWARE source code, you may not re-distribute the source code, nor may you copy it into your own projects.
WeOnlyDo! retains the copyright to the SOFTWARE source code. You have no right to change or use source code for 3rd party components or applications. Source
code is provided only for your storage and protection. This agreement allows you to obtain access to fix and update the software's source code under special
circumstances, such as to provide support to your end user customers to whom you have distributed Redistributable Code in conformance with Section 8 below, or
if the WeOnlyDo! Software goes out of business.
8. DISTRIBUTION REQUIREMENTS. Notwithstanding section 4 above, you are authorized to redistribute the Sample Code and/or Redistributable Code, (collectively
"REDISTRIBUTABLE COMPONENTS") as described in Sections 5 and 6, only if you
(a) distribute them in conjunction with and as part of your software product that adds primary and significant functionality to the REDISTRIBUTABLE COMPONENTS ;
(b) do not permit further redistribution of the REDISTRIBUTABLE COMPONENTS by your end-user customers ;
(c) do not use WeOnlyDo! Software's name, logo, or trademarks to market your software application product ;
(d) include a valid copyright notice on your software product ; and
(e) agree to indemnify, hold harmless, and defend WeOnlyDo! Software from and against any third party claims or lawsuits, including reasonable attorney's fees, to
the extent arising or resulting from your material breach of your obligations under this agreement.
WeOnlyDo! Software reserves all rights not expressly granted. The license in this section to distribute REDISTRIBUTABLE COMPONENTS is royalty-free, provided
that you do not make any modifications to any of the REDISTRIBUTABLE COMPONENTS. Contact WeOnlyDo! Software for the applicable royalties due and other
licensing terms for all other uses and/or distribution of the REDISTRIBUTABLE COMPONENTS.
LIMITED WARRANTY
NO WARRANTIES. WeOnlyDo! Software expressly disclaims any warranty for the SOFTWARE. The SOFTWARE and any related documentation is provided "as is"
without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability or fitness for a particular purpose. The
entire risk arising out of use or performance of the SOFTWARE remains with you.
CUSTOMER REMEDIES. Each party's entire liability under this license agreement shall not exceed the price paid for the SOFTWARE. NO LIABILITY FOR
CONSEQUENTIAL DAMAGES. In no event shall WeOnlyDo! Software, its suppliers or you be liable for any damages whatsoever (including, without limitation,
damages for loss of business profits, business interruptions, loss of business information, or any other pecuniary loss) arising out of the use or inability to use this
wodKeys License Agreement
Page 5 of 37
WeOnlyDo! Software product, even if such party has been advised of the possibility of such damages. The limitations and disclaimers set forth in this section do not
apply to
[a] either party's obligations of indemnity stated herein or
[b] to your material breach of your obligations under this license agreement.
DEMO. The demo versions of our products are intended for evaluation purposes only. You may not use the demo version to develop completed applications.
This agreement is protected by copyright laws and international treaty provisions. If you do not agree to the terms of the license agreement, you are not allowed to
use this product or any part of it. Should you have any questions concerning this product, contact WeOnlyDo! Inc.
Platforms
Windows
Page 6 of 37
Objects
Enumerations
Keys
Platforms
Windows
wodKeys Objects
Page 7 of 37
Enumerations Object
List of enumerations supported by wodKeys.
SSHKeyTypes
Platforms
Windows
wodKeys Enumerations
Page 8 of 37
SSHKeyTypes Enumeration
List of available key types used by wodKeys.
Remarks
SSH2 protocol specification defines RSAcipher as default, and it should be supported by all clients/servers, so it is advised you should use it. However, there are
servers that prefer DSAalgorithm to be used (due to RSApatent, which has in the meantime expired). EC (Elliptic Curve algorithms have been added in 2013).
Generate and Load methods support all of these types.
List of available key types used by wodKeys:
Constant
Value
Description
RSAkey
DSAkey
ECDSAkey
Platforms
Windows
Page 9 of 37
Keys Object
Main wodKeys object.
Methods
FromXmlString
Generate
Load
PublicKeyLoad
PublicKeySave
Save
ToXmlString
Properties
BitCount
BubbleBabble
FingerPrint
FingerPrintData
PrivateKey
PrivateKeyData
PublicKey
PublicKeyData
PublicKeyOpenSSH
PublicKeyRSA1
PublicKeySSH
Version
Platforms
Windows
wodKeys Keys
Page 10 of 37
Keys Methods
FromXmlString
Generate
Load
PublicKeyLoad
PublicKeySave
Save
ToXmlString
Platforms
Windows
Page 11 of 37
FromXmlString method
Reconstructs an RSA/DSAkey from an XML string.
Type
None
Syntax
Basic
object.FromXmlString XmlData
The FromXmlString method syntax has these parts:
object
XmlData
Remarks
FromXmlString method will try to decode RSA/DSAkey (both public and private, when possible) from given XML string, as it is exported by MS NET framework.
Typically, your XML representation of the key will look like this:
<RSAKeyValue><Modulus>ySvYlf2fjZTitchU0XJ4KU1jCy0O2bwaz6K3OK6NiC6Io43H7L7nCFuj+q
FwW9Mrs1CTNp8e5TAsTtAH9PMOixYghWTK8t6EqutyctNa9GEb6qdi6CuPMmF/qMbvu3EtWp80qBgt1l
........
hSE4AeOt6eS5UefNkjuJXPllYKp4znIPcC1eMWYyud6sLbeKYbsMM2e+AOqAloNR0zys9S3rhi5Nj4d+
I65gNXs9C0bNIE=</D></RSAKeyValue>
This method will replace current RSA/DSAkey with new one. You can Save this key once it is imported, or can directly use it in your applications.
To convert back to XML format, you can use ToXmlString method.
Platforms
Windows
Page 12 of 37
Generate method
Generate new pair of keys.
Type
None
Syntax
Basic
KeyType
BitCount
Optional. AVariant value. Specifies total number of bits in generated key (defaults to 1024).
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
DSAkey
ECDSAkey
Generate method should be called when you need to generate new key to be used with the server. KeyType should be set to RSAkey, DSAkey or ECDSAkey. Old (if
any) key loaded in memory will be destroyed, and new one will take it's place. It is advised that immediately after new key is generated, you should Save it to a file for
future use.
Generate method can be a lengthy process, especially if you set large BitCount value (default BitCount is 1024). It is advised you make random mouse movements,
or type on the keyboard during the keys generation, to get more random values for new keys. Possible bitcount values for generating new keys are 768, 1024
(default), 2048 and 3072 (for RSAand DSA), and 256, 384 and 521 for ECDSAkey.
If you with to transfer your existing keys from OpenSSH (or similar) SSH server, you can easily load such keys using Load method. In such case there is no need to
generate new pair of keys.
Important thing is to keep the key private and unreadable by anyone else except yourself. To help you accomplish this, storing generated keys can optionally be
protected using a Password in Save method.
Code sample
Basic
Typical scenario to deal with generating/loading/saving keys would be something like this (sample in VB):
wodKeys Keys Generate
Page 13 of 37
Platforms
Windows
Page 14 of 37
Load method
Loads keys from the file.
Type
None
Syntax
Basic
Filename
Password
Remarks
Load method will try to load in memory previously saved key using Save method, or saved using external programs such as ssh-keygen included in OpenSSH
package. File should be accessible and readable by yourself in the time when Load is requested.
If Load is successful, wodKeys will recognize key type (RSAkey, DSAkey or ECDSAkey) and overwrite old one from memory (if any). If you use more than one key, you
should call Load method more than once, specifying different file in each call.
Saved key should be in PEM format. PEM format is simply base64 encoded data surrounded by header lines (this is the format that is used in Save method) and is
widely supported by different SSH implementations. Load additionally transparently handle PKCS#8 format encrypted and unencrypted keys too. Typical structure
looks like this (for RSAKey):
-----BEGIN RSAPRIVATE KEY----Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CFB,33E78EDBC3F91072
bKxPNDjHoqW4wT46OnYnDWtJnhwhqRIh81o9IAjjrrlRRDQf9kefDFuciKBrJCqK
................................................................
(...more...)
................................................................
ViWBhtNOV1Wzm3Ifv9ekm6cd1TjPO2UP/Vi5/Xz4PQ+maA7c1QXbdXGF29fc2VFI
JQKZxKKEfirZntyOH6chDQGeYnB7mXLpRNnNb7g=
-----END RSAPRIVATE KEY----If loading fails, an error will be generating describing the error. Most common error when loading the key will occur if password does not match one that was used
when key was saved.
Besides opening PEM format, Load method will try to open Putty, Vandyke, SSH1.0, SSH.COM and F-Secure generated keys. Also, it will try to open PFX files
(PKCS#12 format) and try to find any private keys in that file. When saved, these keys will be saved in PEM format. You may need to remove passphrase from foreign
keys when you try to import them with Load method!
Note: since version 1.1.2.9 Load method can accept also string representation of the key. This allows you to keep the key in your application, rather than external file.
Only PEM format is supported this way. So, you can use code like this, it will work:
Page 15 of 37
Platforms
Windows
Page 16 of 37
PublicKeyLoad method
Loads public key from the file.
Type
None
Syntax
Basic
object.PublicKeyLoad Filename
The PublicKeyLoad method syntax has these parts:
object
Filename
Remarks
PublicKeyLoad method will try to Load public key in memory. It cannot be used directly by wodSSH/wodSFTP (or any other WeOnlyDo! product), but can be used to
convert public keys (generated by 3rd party software) to OpenSSH or SSH format, as required by SSH servers.
Public key should be in X509 PEM format. PEM format is simply base64 encoded data surrounded by header lines (this is the format that is used in Save method)
and is widely supported by different SSH implementations. Typical structure looks like this:
-----BEGIN PUBLIC KEY----bKxPNDjHoqW4wT46OnYnDWtJnhwhqRIh81o9IAjjrrlRRDQf9kefDFuciKBrJCqK
................................................................
(...more...)
................................................................
ViWBhtNOV1Wzm3Ifv9ekm6cd1TjPO2UP/Vi5/Xz4PQ+maA7c1QXbdXGF29fc2VFI
JQKZxKKEfirZntyOH6chDQGeYnB7mXLpRNnNb7g=
-----END PUBLIC KEY-----
Platforms
Windows
Page 17 of 37
PublicKeySave method
Saves public key a the file.
Type
None
Syntax
Basic
KeyType
Filename
Required. AString value. Full path to file where key should be PublicKeySaved.
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
Saves RSAkey.
DSAkey
Saves DSAkey.
ECDSAkey
Saves ECDSAkey.
PublicKeySave method will store contents of your public key from memory to file on your disk drive, in X509 PEM format.
Key is saved using PEM format, as base64 encoded data surrounded by header lines, which makes it exportable (and importable) to other SSH engines. Written file
contains only plain ASCII characters.
Platforms
Windows
Page 18 of 37
Save method
Saves keys to the file.
Type
None
Syntax
Basic
KeyType
Filename
Required. AString value. Full path to file where key should be saved.
Password
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
RSAkey is saved.
DSAkey
DSAkey is saved.
ECDSAkey
ECDSAkey is saved.
Save method will store contents of your private key from memory to file on your disk drive.
Key is saved using PEM format, as base64 encoded data surrounded by header lines, which makes it exportable (and importable) to other SSH engines. Optionally
(and is suggested) you can specify the password to be used when key is written to disk, so only you can read saved key. Don't forget to use the same password
when Loading key from disk.
Written file contains only plain ASCII characters.
Platforms
Windows
Page 19 of 37
ToXmlString method
Creates and returns an XML string representation of the current RSA/DSAkey.
Type
None
Syntax
Basic
object.ToXmlString(KeyType, IncludePrivate)
The ToXmlString method syntax has these parts:
object
KeyType
IncludePrivate
Required. ABoolean value that determine if private key is also exported. If set to False then only public part is exported.
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
Exports RSAkey.
DSAkey
Exports DSAkey.
This method will return XML string expression of public or private RSA/DSAkey, so it can be reused by MS NET framework directly.
Platforms
Windows
Page 20 of 37
Keys Properties
BitCount
BubbleBabble
FingerPrint
FingerPrintData
PrivateKey
PrivateKeyData
PublicKey
PublicKeyData
PublicKeyOpenSSH
PublicKeyRSA1
PublicKeySSH
Version
Platforms
Windows
Page 21 of 37
BitCount property
Determines number of bits in the key.
Type
An Integer value
Syntax
Basic
object.BitCount(KeyType)
The BitCount property syntax has these parts:
object
KeyType
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
DSAkey
ECDSAkey
This property will return number of bits in specified private key. Number of bits for each key is specified in Generate method when key is created. Most common
value is 1024, but for stronger encryption sometimes this value can be larger.
For ECDSAkey supported values are 256, 384 and 521.
Platforms
Windows
Page 22 of 37
BubbleBabble property
Returns BubbleBabble printout of the key, as string expression.
Type
AString value
Syntax
Basic
object.BubbleBabble(KeyType)
The BubbleBabble property syntax has these parts:
object
KeyType
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
DSAkey
ECDSAkey
This property will return BubbleBabble printout of the key. BubbleBabble is almost readable form of private key, usually in form similar to this:
xonib-lakon-gynuf-byvoz-cymuv-saseh-gimek-ripuf-vicig-madov-coxix
it is used to test key easier since text representation is similar to words.
Platforms
Windows
Page 23 of 37
FingerPrint property
Returns fingerprint of the private key, as string expression.
Type
AString value
Syntax
Basic
object.FingerPrint(KeyType, [DigestType])
The FingerPrint property syntax has these parts:
object
KeyType
DigestType
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
DSAkey
ECDSAkey
FingerPrint method will return string of length 16 or 20 characters, that hold almost unique fingerprint for the requested key.
Fingerprints are used when there is a need to determine if some keys match (are the same). Since keys can be pretty large, checking if some keys match is pretty
hard to do. Therefore when client wants to be sure of server's identity, it can connect to the server, check server's fingerprint information, and check if if match with the
value previously stored locally. If client is connecting for the first time then there's no way of checking for stored values, so the client must decide whether he will trust
received key or not. Client can ask server's maintainer (through some private channel, like telephone for example) to send fingerprint information about some key
and then on each connection test if it matches received key. 20 byte fingerprint is much easier to test than few hundreds bytes that are actually contained in each key.
Digest algorithms MD5 or SHA1 are used to calculate 20 byte fingerprint which is different for each key.
You can use this method to read fingerprint information for some key, and you can, for example, publicly announce it on your webpage (or similar place), so users
that connect can be sure that they are connecting to proper server and no one is tampering on your connection.
Instead of String expression, you can read fingerprint data also as byte array, using FingerPrintData property.
Platforms
Windows
Page 24 of 37
FingerPrintData property
Returns fingerprint of the private key, as byte array.
Type
AVariant value.
Syntax
Basic
object.FingerPrintData(KeyType, [DigestType])
The FingerPrintData property syntax has these parts:
object
KeyType
DigestType
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
DSAkey
ECDSAkey
FingerPrint method will return byte array of 16 or 20 characters length, that hold almost unique fingerprint for the requested key.
Fingerprints are used when there is a need to determine if some keys match (are the same). Since keys can be pretty large, checking if some keys match is pretty
hard to do. Therefore when client wants to be sure of server's identity, it can connect to the server, check server's fingerprint information, and check if if match with the
value previously stored locally. If client is connecting for the first time then there's no way of checking for stored values, so the client must decide whether he will trust
received key or not. Client can ask server's maintainer (through some private channel, like telephone for example) to send fingerprint information about some key
and then on each connection test if it matches received key. 20 byte fingerprint is much easier to test than few hundreds bytes that are actually contained in each key.
Digest algorithms MD5 or SHA1 are used to calculate 20 byte fingerprint which is different for each key.
You can use this method to read fingerprint information for some key, and you can, for example, publicly announce it on your webpage (or similar place), so users
that connect can be sure that they are connecting to proper server and no one is tampering on your connection.
Instead of byte array, you can read fingerprint data also as a String expression, using FingerPrint property.
Platforms
Windows
Page 25 of 37
PrivateKey property
Holds private key.
Type
AString value
Syntax
Basic
object.PrivateKey(KeyType) [= value]
The PrivateKey property syntax has these parts:
object
KeyType
Value
AString value.
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
Uses RSAkey.
DSAkey
Uses DSAkey.
ECDSAkey
Uses ECDSAkey.
PrivateKey property is used if you don't want to call internal Load and Save methods to preserve key data between sessions. Once you Generate new key, you can
retrieve it's raw data using this property, and store it somewhere depending what your needs are. Obtaining private key data this way does not encrypt it in any way you should do it by yourself when you store the key.
In later sessions, you can easily load your key internally, and put it in PrivateKey property and wodKeys will immediately be able to use it. KeyType must be specified
to determine what key is stored/retrieved.
Note that setting PrivateKey with unexpected data may result in wodKeys rejecting your key. It is advised to set PrivateKey only with data you have previously retrieved
from the same property (in previous session).
Platforms
Windows
Page 26 of 37
PrivateKeyData property
Holds private key - as byte array.
Type
An array of Byte values
Syntax
Basic
object.PrivateKeyData(KeyType) [= value]
The PrivateKeyData property syntax has these parts:
object
KeyType
value()
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
Uses RSAkey.
DSAkey
Uses DSAkey.
ECDSAkey
Uses ECDSAkey.
PrivateKeyData property is used if you don't want to call internal Load and Save methods to preserve key data between sessions. Once you Generate new key, you
can retrieve it's raw data using this property (or PrivateKey property), and store it somewhere depending what your needs are. Obtaining private key data this way
does not encrypt it in any way - you should do it by yourself when you store the key.
In later sessions, you can easily load your key internally, and put it in PrivateKeyData property and wodKeys will immediately be able to use it. KeyType must be
specified to determine what key is stored/retrieved.
Note that setting PrivateKeyData with unexpected data may result in wodKeys rejecting your key. It is advised to set PrivateKeyData only with data you have previously
retrieved from the same property (in previous session).
We have noticed that when MFC generates wrappers for wodKeys, it says it cannot generate wrapper for this member. Well, you should then just add it by yourself. In
header file, add this line:
void GetPrivateKeyData(long KeyType, SAFEARRAY **result);
void SetPrivateKeyData(long KeyType, SAFEARRAY **DataArray);
Page 27 of 37
VARIANT var;
var.vt = VT_VARIANT;
static BYTE parms[] = VTS_I4;
InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&var, parms, KeyType);
*result = (SAFEARRAY *)var.punkVal;
}
void IKeys::SetPrivateKeyData(long KeyType, SAFEARRAY **DataArray)
{
VARIANT var;
var.vt = VT_UI1 | VT_ARRAY;
var.parray = *DataArray;
static BYTE parms[] = VTS_I4 VTS_VARIANT;
InvokeHelper(0xc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, KeyType, &var);
}
Platforms
Windows
Page 28 of 37
PublicKey property
Returns public key.
Type
AString value
Syntax
Basic
object.PublicKey(KeyType)
The PublicKey property syntax has these parts:
object
KeyType
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
Uses RSAkey.
DSAkey
Uses DSAkey.
ECDSAkey
Uses ECDSAkey.
This property will return raw data for public part of previously generated (or loaded) key.
Platforms
Windows
Page 29 of 37
PublicKeyData property
Returns public key - as byte array.
Type
An array of Byte values
Syntax
Basic
object.PublicKeyData(KeyType)
The PublicKeyData property syntax has these parts:
object
KeyType
Remarks
This property will return raw data for public part of previously generated (or loaded) key. Unlike PublicKey property which returns String, this property returns byte
array.
We have noticed that when MFC generates wrappers for wodKeys, it says it cannot generate wrapper for this member. Well, you should then just add it by yourself. In
header file, add this line:
void GetPublicKeyData(long KeyType, SAFEARRAY **result);
and in wrapper implementation file, add this
void IKeys::GetPublicKeyData(long KeyType, SAFEARRAY **result)
{
VARIANT var;
var.vt = VT_VARIANT;
static BYTE parms[] = VTS_I4;
InvokeHelper(0xd, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&var, parms, KeyType);
*result = (SAFEARRAY *)var.punkVal;
}
Platforms
Windows
Page 30 of 37
PublicKeyOpenSSH property
Returns public key in OpenSSH format.
Type
AString value
Syntax
Basic
object.PublicKeyOpenSSH(KeyType)
The PublicKeyOpenSSH property syntax has these parts:
object
KeyType
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
Uses RSAkey.
DSAkey
Uses DSAkey.
ECDSAkey
Uses ECDSAkey.
PublicKeyOpenSSH will return string information that represents stored public key in format suitable for OpenSSH servers. Typically, it will look like this:
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA8AYkMFyO5RLtAtWh5/NeveIh4vv6l/p1V5gKhfnj8uz36KrEEMn..............
You can easily paste contents of this property to file on your server system that keeps public keys. Usually, this is -/.ssh/authorized_keys2 file.
Platforms
Windows
Page 31 of 37
PublicKeyRSA1 property
Returns public key in SSH1 RSAformat.
Type
AString value
Syntax
Basic
object.PublicKeyRSA1
The PublicKeyRSA1 property syntax has these parts:
object
Remarks
PublicKeyRSA1 will return string information that represents stored public key in format suitable for SSH1 servers. It can be used only for RSAkeys, since SSH1
server only support RSAcipher authenticaion.
Typically, it will look like this:
1024 35 1491447565979391620804974425532607679275854098033229 ....
You can easily paste contents of this property to file on your server system that keeps public keys (try -/.ssh/authorized_keys).
Platforms
Windows
Page 32 of 37
PublicKeySSH property
Returns public key in SSH format.
Type
AString value
Syntax
Basic
object.PublicKeySSH(KeyType)
The PublicKeySSH property syntax has these parts:
object
KeyType
Remarks
The settings for KeyType are:
Constant
Value
Description
RSAkey
Returns RSAkey.
DSAkey
Returns DSAkey.
ECDSAkey
Returns ECDSAkey.
PublicKeySSH will return string information that represents stored public key in format suitable for SSH servers. Typically, it will look like this:
---- BEGIN SSH2 PUBLIC KEY ---AAAAB3NzaC1kc3MAAACBAKzHYPgw/VvUWHooW0iyKYPYVfaTZSDlHZaUEsHOAvdln+6aQw
..........
oRi1V/3n//AAypdXkAN8BSBrsb4V4AVdzHpvXSdHh9C+TlRUH1Ls72Kl929+4jMZmWDXGw
O5ns8NPAJZvOxnZKZA==
---- END SSH2 PUBLIC KEY ---You can easily paste contents of this property to file on your server system that keeps public keys.
Platforms
Windows
Page 33 of 37
Version property
Holds component version number.
Type
AString value
Syntax
Basic
object.Version
The Version property syntax has these parts:
object
Remarks
You can find here version number of your instance of wodKeys.dll component. Please, provide us with this information if you need help from our techsupport
department.
Platforms
Windows
Page 34 of 37
Although we do not provide phone support, in case of urgency you can contact us at above phone numbers. Please take in consideration our time zone which is
GMT+1. Please do not phone call us for technical support issues. Use our forums or send us email - we will reply within 24 hours.
Platforms
Windows
Page 35 of 37
Technical information
Remarks
General
wodKeys is a COM object (wodKeys.dll), designed to be initialized dynamically from your code, and declared from within your code. It does not have user interface, it
is windowless. Usually, you will initialize it with
wodKeys.DLL
Class name
WeOnlyDo.Keys.1
Class ID
{D7BBDB40-8B0E-46D1-8D36-64828BA5564E}
Events class ID
none
Compatibility
Built with
Required DLLs
none
Documentation
Help filename
wodKeys.CHM
Distribution note
You are not allowed to distribute wodKeys.dll without accompanying product you have purchased from WeOnlyDo! Software. Please refer to distribution notes of that
product.
Platforms
Windows
Page 36 of 37
Error list
Below is the list of errors that can be fired by the component.
Value
Description
30000
30001
30002
30003
30004
30005
30006
30007
30010
30011
30012
39999
License key missing. You can not use this component in design environment.
Platforms
Windows
Page 37 of 37