()
| 143 | } |
| 144 | |
| 145 | func streamProcessors() map[string]srvconfig.StreamProcessor { |
| 146 | const ( |
| 147 | ctdDecoder = "ctd-decoder" |
| 148 | basename = "io.containerd.ocicrypt.decoder.v1" |
| 149 | ) |
| 150 | decryptionKeysPath := filepath.Join(defaults.DefaultConfigDir, "ocicrypt", "keys") |
| 151 | ctdDecoderArgs := []string{ |
| 152 | "--decryption-keys-path", decryptionKeysPath, |
| 153 | } |
| 154 | ctdDecoderEnv := []string{ |
| 155 | "OCICRYPT_KEYPROVIDER_CONFIG=" + filepath.Join(defaults.DefaultConfigDir, "ocicrypt", "ocicrypt_keyprovider.conf"), |
| 156 | } |
| 157 | return map[string]srvconfig.StreamProcessor{ |
| 158 | basename + ".tar.gzip": { |
| 159 | Accepts: []string{images.MediaTypeImageLayerGzipEncrypted}, |
| 160 | Returns: ocispec.MediaTypeImageLayerGzip, |
| 161 | Path: ctdDecoder, |
| 162 | Args: ctdDecoderArgs, |
| 163 | Env: ctdDecoderEnv, |
| 164 | }, |
| 165 | basename + ".tar": { |
| 166 | Accepts: []string{images.MediaTypeImageLayerEncrypted}, |
| 167 | Returns: ocispec.MediaTypeImageLayer, |
| 168 | Path: ctdDecoder, |
| 169 | Args: ctdDecoderArgs, |
| 170 | Env: ctdDecoderEnv, |
| 171 | }, |
| 172 | } |
| 173 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…