diff options
| author | Stefan Hajnoczi | 2017-05-10 17:22:10 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2017-05-10 17:22:13 +0200 |
| commit | 1effe6ad5eac1b2e50a077695ac801d172891d6a (patch) | |
| tree | 1bdf2128561619bb01396d62935d9af07513a5dc /include | |
| parent | Merge remote-tracking branch 'armbru/tags/pull-qapi-2017-05-04-v3' into staging (diff) | |
| parent | crypto: qcrypto_random_bytes() now works on windows w/o any other crypto libs (diff) | |
| download | qemu-1effe6ad5eac1b2e50a077695ac801d172891d6a.tar.gz qemu-1effe6ad5eac1b2e50a077695ac801d172891d6a.tar.xz qemu-1effe6ad5eac1b2e50a077695ac801d172891d6a.zip | |
Merge remote-tracking branch 'danpb/tags/pull-qcrypto-2017-05-09-1' into staging
Merge qcrypto 2017/05/09 v1
# gpg: Signature made Tue 09 May 2017 09:43:47 AM EDT
# gpg: using RSA key 0xBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
# gpg: aka "Daniel P. Berrange <berrange@redhat.com>"
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF
* danpb/tags/pull-qcrypto-2017-05-09-1:
crypto: qcrypto_random_bytes() now works on windows w/o any other crypto libs
crypto: move 'opaque' parameter to (nearly) the end of parameter list
List SASL config file under the cryptography maintainer's realm
Default to GSSAPI (Kerberos) instead of DIGEST-MD5 for SASL
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/crypto/block.h | 6 | ||||
| -rw-r--r-- | include/crypto/random.h | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/include/crypto/block.h b/include/crypto/block.h index 4a053a3ffa..013a435f1b 100644 --- a/include/crypto/block.h +++ b/include/crypto/block.h @@ -30,22 +30,22 @@ typedef struct QCryptoBlock QCryptoBlock; * and QCryptoBlockOpenOptions in qapi/crypto.json */ typedef ssize_t (*QCryptoBlockReadFunc)(QCryptoBlock *block, - void *opaque, size_t offset, uint8_t *buf, size_t buflen, + void *opaque, Error **errp); typedef ssize_t (*QCryptoBlockInitFunc)(QCryptoBlock *block, - void *opaque, size_t headerlen, + void *opaque, Error **errp); typedef ssize_t (*QCryptoBlockWriteFunc)(QCryptoBlock *block, - void *opaque, size_t offset, const uint8_t *buf, size_t buflen, + void *opaque, Error **errp); /** diff --git a/include/crypto/random.h b/include/crypto/random.h index a101353202..a07229ce96 100644 --- a/include/crypto/random.h +++ b/include/crypto/random.h @@ -40,5 +40,14 @@ int qcrypto_random_bytes(uint8_t *buf, size_t buflen, Error **errp); +/** + * qcrypto_random_init: + * @errp: pointer to a NULL-initialized error object + * + * Initializes the handles used by qcrypto_random_bytes + * + * Returns 0 on success, -1 on error + */ +int qcrypto_random_init(Error **errp); #endif /* QCRYPTO_RANDOM_H */ |
